Skip to Content
Block descriptionsFDCANFDCAN Receive

FDCAN Receive

This block handles receiving messages via the FDCAN bus in STM microcontrollers.



FDCAN Receive block

Table of Contents

Inputs

This block does not have any inputs.

Outputs

Output NameTypeDescription
Statusuint8Transmission status. Returns:
1 transmission successful
0 transmission failed
IDuint32ID number of the received message.
DLCuint8Data length of the received frame.
Data[ ]uint8Data from the received frame.

Block Parameters

ParameterDescription
Module numberCAN module number
ID TypeMessage ID number type:
Standard ID - standard number (11 bits)
Extended ID - extended number (29 bits)
Init filter in loopEnables initialization of the filter on every block execution loop
TypeMessage filtering method selection:
FDCAN_FILTER_RANGE - by range from First ID to Last ID
FDCAN_FILTER_DUAL - by ID1 or ID2 numbers
FDCAN_FILTER_MASK - by ID and Mask
Config FIFOReceive buffer configuration:
FDCAN_FILTER_TO_RXFIFO0 - filtered messages are received into FIFO 0 buffer
FDCAN_FILTER_TO_RXFIFO1 - filtered messages are received into FIFO 1 buffer
FDCAN_FILTER_TO_RXFIFO0_HP - filtered messages are received into FIFO 0 buffer with high priority assigned
FDCAN_FILTER_TO_RXFIFO1_HP - filtered messages are received into FIFO 1 buffer with high priority assigned
First IDConditional Parameter
Message ID number used for filtering. This setting is visible if the Type parameter is configured as FDCAN_FILTER_RANGE.
Last IDConditional Parameter
Message ID number used for filtering. This setting is visible if the Type parameter is configured as FDCAN_FILTER_RANGE.
ID1Conditional Parameter
Message ID number used for filtering. This setting is visible only if the Type parameter is configured as FDCAN_FILTER_DUAL.
ID2Conditional Parameter
Message ID number used for filtering. This setting is visible if the Type parameter is configured as FDCAN_FILTER_DUAL.
IDConditional Parameter
Message ID number used for filtering. This setting is visible if Type is configured as CAN_FILTERMODE_IDMASK.
MaskConditional Parameter
Mask used for message filtering. This setting is visible if Type is configured as CAN_FILTERMODE_IDMASK.
Data length (bytes)Maximum data length per frame (in bytes)
Num of bufferNumber of receive buffers. This setting affects the amount of messages that can be stored in the receive buffer before being processed.
Data output modeWay data from the received frame is represented:
Matrix - data is represented as a matrix
Vectors - data is represented as vectors
TimeoutHow long the system will wait for the block execution
Sample time [s]Function refresh rate


Block parameters for FDCAN Receive

Configuration of CubeMX for a Given MCU

The configuration for FDCAN can be found on the CubeMX Configuration for a Given MCU subpage.

See Also

Last updated on