Skip to Content
Block descriptionsFDCANCubeMX Configuration for the given MCU Model

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.

CubeMX Settings

No.NamePathSettingDescriptionScreenshot
1FDCAN ModePinout & Configuration > Connectivity > FDCAN* > ModeActivatedEnables the FDCAN module.FDCAN Mode
2FDCAN ClockClock Configuration > FDCAN Clock MuxValue depends on the target CAN bus frequencySetting the clock source for the CAN interface. This value depends on the target CAN bus frequency and the system clock configuration.FDCAN Clock
3Frame FormatPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Frame FormatClassic modeSets the operating mode of the FDCAN controller to classic.FDCAN Format
4ModePinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > ModeNormal modeSets the operating mode of the FDCAN controller to normal.FDCAN Normal
5Auto RetransmissionPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Auto RetransmissionEnabledEnables automatic retransmission in case of a failure.FDCAN Auto Retransmission
6- Nominal Prescaler,
- Nominal Sync Jump Width,
- Nominal Time Seg1,
- Nominal Time seg2
Pinout & Configuration > Connectivity > FDCAN* > Parameter SettingsDepends on target transmission speedTransmission speed parameters. To select the values, you can use a calculator, e.g.: http://www.bittiming.can-wiki.info/ FDCAN Bit Timing
FDCAN SJW
7Std Filters NbrPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Std Filters Nbr128Number of filters for standard ID numbers.FDCAN Std Filters
8Rx Fifo0 Elmts NbrPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo0 Elmts Nbr64Number of elements in FIFO 0 buffer.FDCAN FIFO0
9Rx Fifo0 Elmts SizePinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo0 Elmts Size8 bytes data fieldElement size of FIFO 0 buffer.FDCAN FIFO0 Size
10Rx Fifo1 Elmts NbrPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo1 Elmts Nbr64Number of elements in FIFO 1 buffer.FDCAN FIFO1
11Rx Fifo1 Elmts SizePinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Rx Fifo1 Elmts Size8 bytes data fieldElement size of FIFO 1 buffer.FDCAN FIFO1 Size
12Tx Buffers NbrPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Tx Buffers Nbr16Number of transmit buffers.FDCAN Tx Buffers
13Tx Fifo Queue Elmts NbrPinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Tx Fifo Queue Elmts Nbr16Number of FIFO queue elements for transmit buffers.FDCAN Tx Queue
14Tx Fifo Queue ModePinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > Tx Fifo Queue ModeFIFO modeOperating mode of the FIFO queue for transmit buffers.FDCAN Tx Queue Mode
15TX Elmt SizePinout & Configuration > Connectivity > FDCAN* > Parameter Settings > Basic Parameters > TX Elmt Size8 bytes data fieldElement size of the FIFO queue for transmit buffers.FDCAN Tx Queue Size
16FDCAN* interrupt 0Pinout & Configuration > Connectivity > FDCAN* > NVIC Settings > FDCAN* interrupt 0EnabledEnables the interrupt for message reception into the FIFO0 buffer.FDCAN Interrupt
17FDCAN* interrupt 1Pinout & Configuration > Connectivity > FDCAN* > NVIC Settings > FDCAN* interrupt 1EnabledEnables the interrupt for message reception into the FIFO1 buffer.FDCAN Interrupt
18Maximum output speedPinout & Configuration > Connectivity > CAN* > GPIO Settings > click on the pin and enter the configuration window > Maximum output speedVery HighSetting the pin operating speed.CAN pin setting

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