cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32g431 Strange isr entry

TFasc.1
Associate II

Atm im facing the Problem, that the mcu enters a previously activated isr but not as intended. Im setting up Timer and gpio interrupts but ending in an fdcan isr which redirects to the default Handler. Its Worth mentioning im Using hal/ll driver and doing almost no register access by myself. The interrupt triggers during the setup process, it Seems that somehow the low Level drivers interrupt handling is inconsistent with the vector table... Do you guys have any ideas how to tackle this issue?

3 REPLIES 3
TDK
Guru

How do you know it's ending up in an FDCAN ISR as opposed to any other interrupt which redirects to the default handler? Look at the VECTACTIVE bits and subtract 16 to determine which ISR it's in. Maybe the interrupt it wants to be in just isn't implemented or linked correctly.

Unlikely that the vector table is incorrect, but make sure you're #including the correct header file.

If you feel a post has answered your question, please click "Accept as Solution".

Ive Took a Look at the nvic bits and saw that its in the fdcan interrupt as well as all the other flags Set to enable the fdcan isr. The Problem is ive never activated it, its some Form of malfunction of the ll driver api. And i have no ideal how and why

TDK
Guru

> its some Form of malfunction of the ll driver api

Or a bug in your code. I know which one my money is one.

Put a hardware watchpoint on the FDCAN interrupt enable flags and see what hits it. Alternatively, put breakpoints in your code to narrow down where it occurs. Could be an out of bounds write.

If you feel a post has answered your question, please click "Accept as Solution".