CubeMX Configuration for a Given MCU
Below is an example of how to configure the FDCAN interface in CubeMX for a given STM32 microcontroller. The settings may vary depending on the specific requirements of your application.
H7
CubeMX Settings
| No. | Name | Path | Setting | Description | Screenshot |
|---|---|---|---|---|---|
| 1 | FDCAN Mode | Pinout & Configuration > Connectivity > FDCAN* > Mode | Activated | Enables the FDCAN module. | ![]() |
| 2 | FDCAN Clock | Clock Configuration > FDCAN Clock Mux | Value depends on the target CAN bus frequency | Setting the clock source for the CAN interface. This value depends on the target CAN bus frequency and the system clock configuration. | ![]() |
| 3 | Frame Format | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Frame Format | Classic mode | Sets the operating mode of the FDCAN controller to classic. | ![]() |
| 4 | Mode | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Mode | Normal mode | Sets the operating mode of the FDCAN controller to normal. | ![]() |
| 5 | Auto Retransmission | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Auto Retransmission | Enabled | Enables automatic retransmission in case of a failure. | ![]() |
| 6 | - Nominal Prescaler, - Nominal Sync Jump Width, - Nominal Time Seg1, - Nominal Time seg2 | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings | Depends on target transmission speed | Transmission speed parameters. To select the values, you can use a calculator, e.g.: http://www.bittiming.can-wiki.info/ | ![]() ![]() |
| 7 | Std Filters Nbr | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Std Filters Nbr | 128 | Number of filters for standard ID numbers. | ![]() |
| 8 | Rx Fifo0 Elmts Nbr | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo0 Elmts Nbr | 64 | Number of elements in FIFO 0 buffer. | ![]() |
| 9 | Rx Fifo0 Elmts Size | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo0 Elmts Size | 8 bytes data field | Element size of FIFO 0 buffer. | ![]() |
| 10 | Rx Fifo1 Elmts Nbr | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo1 Elmts Nbr | 64 | Number of elements in FIFO 1 buffer. | ![]() |
| 11 | Rx Fifo1 Elmts Size | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo1 Elmts Size | 8 bytes data field | Element size of FIFO 1 buffer. | ![]() |
| 12 | Tx Buffers Nbr | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Tx Buffers Nbr | 16 | Number of transmit buffers. | ![]() |
| 13 | Tx Fifo Queue Elmts Nbr | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Tx Fifo Queue Elmts Nbr | 16 | Number of FIFO queue elements for transmit buffers. | ![]() |
| 14 | Tx Fifo Queue Mode | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Tx Fifo Queue Mode | FIFO mode | Operating mode of the FIFO queue for transmit buffers. | ![]() |
| 15 | TX Elmt Size | Pinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > TX Elmt Size | 8 bytes data field | Element size of the FIFO queue for transmit buffers. | ![]() |
| 16 | FDCAN* interrupt 0 | Pinout & Configuration > Connectivity > FDCAN* > NVIC Settings > FDCAN* interrupt 0 | Enabled | Enables the interrupt for message reception into the FIFO0 buffer. | ![]() |
| 17 | FDCAN* interrupt 1 | Pinout & Configuration > Connectivity > FDCAN* > NVIC Settings > FDCAN* interrupt 1 | Enabled | Enables the interrupt for message reception into the FIFO1 buffer. | ![]() |
| 18 | Maximum output speed | Pinout & Configuration > Connectivity > CAN* > GPIO Settings > click on the pin and enter the configuration window > Maximum output speed | Very High | Setting the pin operating speed. | ![]() |
FDCAN* — the asterisk symbol (*) represents the number of the FDCAN module used in the model, e.g., FDCAN1, FDCAN2, etc.
The parameters above represent a configuration example. They must be adjusted to meet the requirements of your specific application.
Last updated on


















