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

Table of Contents
Inputs
| Input Name | Type | Description |
|---|---|---|
| Data[ ] | uint8 | Data to send. The number of bytes at the input depends on the input or parameter Data length. |
| Set ExtID | bool | Optional input ID number type of the message to send (Standard or Extended). This input is optional and depends on the Enable input ID type parameter. |
| ID | uint32 | Optional input ID number of the message to send. This input is optional and depends on the Enable input ID parameter. |
| Data length | uint8 | Optional input Amount of data to send. This input is optional and depends on the Enable input length of data parameter. |
Outputs
| Output Name | Type | Description |
|---|---|---|
| Status | uint8 | Transmission status. Returns:1 transmission successful0 transmission failed |
Block Parameters
| Parameter | Description |
|---|---|
| Module number | CAN module number |
| Frame format | Frame format selection:FDCAN_CLASSIC_CAN - classic frame formatFDCAN_FD_CAN - FDCAN frame format |
| Enable bitrate switching (BRS) | Enables bit rate switching in FDCAN frames. This setting is visible if the Frame format parameter is set to FDCAN_FD_CAN. |
| Add message to | Selection of the queue where the message will be added:FIFO - FIFO queueBUFFER - buffer |
| Enable input ID type | Enables the Set ExtID input |
| ID Type | Conditional Parameter Message ID number type: Standard ID - standard number (11 bits)Extended ID - extended number (29 bits)This parameter is available if the Enable input ID type option is disabled. |
| Enable input ID | Enables the ID input |
| ID message | Conditional Parameter ID number of the message to send. This parameter is available if the Enable input ID option is disabled. |
| Enable input length of data | Enables the Data length input |
| Data length | Conditional Parameter Maximum data length per frame (in bytes). This parameter is available when the Enable input length of data option is disabled. |
| Frame repeat | Number of repetitions of the same frame. This setting allows the sent frame to be automatically repeated a specified number of times without needing to call the block again. |
| Send options | Conditional Parameter Specifies how new frames are handled when the transmission queue is full: Non-blocking (abort new) – the transmit function immediately returns an error, and the new frame is discarded.Non-blocking (overwrite) – the transmit function returns immediately, and the new frame replaces an existing frame in the queue.Blocking (abort new) – the transmit function waits for the time specified in the Timeout parameter for space to free up in the queue; if it is not possible to add the frame, the new frame is discarded.Blocking (overwrite) – the transmit function waits for the time specified in the Timeout parameter for space to free up or overwrites an existing frame according to the driver configuration. |
| Wait for end sending | Executes the block until data is sent or the time set in the Timeout parameter expires. If this option is enabled, the block returns a success status immediately after placing the message in the transmission queue, without waiting for its actual transmission. |
| Timeout | Conditional Parameter How long the system will wait to send the frame. This parameter is available when the Send options option is set to Blocking (abort new) or Blocking (overwrite). |
| Timeout | Conditional Parameter How long the system will wait for the block execution. This parameter is available when the Wait for end sending option is disabled. |
| Sample time [s] | Function refresh rate |

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