Crazy Things / STM32CubeIDE Version: 1.7.0 Build: 10852_20210715_0634
STM32G474RET / FDCAN1
When I create with a STM32 Project, there will be creatied different
startup files (startup_stm32g474retx.s) depending wether I select
Target Projekt Type "STM32Cube" or "empty"!
- STM32Cube => startup_stm32g474retx.s with Copyright (c) 2019
- empty => startup_stm32g474retx.s with Copyright (c) 2020
This files are differ from eahc other, especially some names of
interrupt vectors differ - furthermore more odrder of FDCAN1
interrupt vecotrs differ (0 <==> 1) !!!
I've created a STM32 Project with an empty Target Projekt Type and
use therefore the newer startup file.
When I let run my small programm and "Suspend" it, after a
CAN message has been transmitted (it has been received by
PCAN-View on the PC), it seems, the CPU loops in the
Default_Handler.
When I change order of interrupt vectors from
.word fdcan1_intr1_it_IRQHandler /* FDCAN1 interrupt */
.word fdcan1_intr0_it_IRQHandler /* FDCAN1 interrupt */
to
.word fdcan1_intr0_it_IRQHandler /* FDCAN1 interrupt */
.word fdcan1_intr1_it_IRQHandler /* FDCAN1 interrupt */
this will not occur.
I expect, my small programm will stop at breakpoint at line 182 or at
least at line 188 inside the fdcan1_intr0_it_IRQHandler, but this
doesn't occur!
When I "Suspend" the program after the CAN message has been transmitted
it seems, the fdcan1_intr0_it_IRQHandler has beeen called, because
TC bit (bit 7) in IR register has been cleared (suspend1.jpg)
When I comment out line 191 in fdcan1_intr0_it_IRQHandler and
"Suspend" the program after the CAN message has been transmitted,
it seems, the cpu will permanently call fdcan1_intr0_it_IRQHandler,
but the program will not stop at the breakpoints!
Anyone an idea, why???
