cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the FDCAN speed with parameter in CubeIDE?

otcagon
Associate II

I want to change the CAN speed with changed parameter which is defined in rom.c file. SY_CANBD = 1. But the FDCAN(Classic CAN mode) do not send the defined CAN data. If I starts the debugging mode, it starts to transmit the data.

/* FDCAN2 init function */

void MX_FDCAN2_Init(void)

{

 /* USER CODE BEGIN FDCAN2_Init 0 */

 /* USER CODE END FDCAN2_Init 0 */

 /* USER CODE BEGIN FDCAN2_Init 1 */

 /* USER CODE END FDCAN2_Init 1 */

 hfdcan2.Instance = FDCAN2;

 hfdcan2.Init.FrameFormat = FDCAN_FRAME_CLASSIC;

 hfdcan2.Init.Mode = FDCAN_MODE_NORMAL;

 hfdcan2.Init.AutoRetransmission = DISABLE;

 hfdcan2.Init.TransmitPause = DISABLE;

 hfdcan2.Init.ProtocolException = DISABLE;

 hfdcan2.Init.NominalPrescaler = 4*SY_CANBD; If I set 4 instead of 4*SY_CANBD there is no problem.

Are there any solution to solve this?

 hfdcan2.Init.NominalSyncJumpWidth = 8;

0 REPLIES 0