2021-09-22 09:57 PM
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;