cancel
Showing results for 
Search instead for 
Did you mean: 

What is wrong with the interrupt processing

MAmem.1
Associate III

Hi,

I migrated a firmware initially written for a STM32F303 to a STM32G474.

The firmware runs perfectly on the STM32F303.

It also runs on the STM32G474. But after a moment the program get stuck and the FDCAN in Classic Mode runs out and the FIFO gets overflowed resulting in lost of messages.

I'm trying to find out what is causing the classic FDCAN communication to get weird.

The FDCAN clock is 36 Mhz with the following settings:

 hfdcan2.Instance = FDCAN2;

 hfdcan2.Init.ClockDivider = FDCAN_CLOCK_DIV1;

 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 = 1;

 hfdcan2.Init.NominalSyncJumpWidth = 18;

 hfdcan2.Init.NominalTimeSeg1 = 53;

 hfdcan2.Init.NominalTimeSeg2 = 18;

 hfdcan2.Init.DataPrescaler = 3;

 hfdcan2.Init.DataSyncJumpWidth = 9;

 hfdcan2.Init.DataTimeSeg1 = 14;

 hfdcan2.Init.DataTimeSeg2 = 9;

 hfdcan2.Init.StdFiltersNbr = 2;

 hfdcan2.Init.ExtFiltersNbr = 0;

 hfdcan2.Init.TxFifoQueueMode = FDCAN_TX_FIFO_OPERATION;

On the interrupt Log Summary, I'm getting some blanks interrupts without any indication.

Is there another interruption making the FDCAN to run bad ?

Thanks for your help.

3 REPLIES 3
S.Ma
Principal

Smells like interrupt vector table mismatch somewhere...

If the interrupt is not properly serviced it will keep reentering and no further foreground execution will occur.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MAmem.1
Associate III

The interrupt vector table has been relocated to 0x8005000 in order to keep some space to a bootloader in 0x8000000. And the vector relocation has been declared in the beginning of the main().

 /* Change vector table */

 NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x5000);