2021-11-05 03:18 AM
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???
Solved! Go to Solution.
2021-11-10 07:46 AM
Hi @ULehm.1 ,
Thanks for highlighting these issues.
I'll bring them to the attention of both reference manual responsible as well as STM32CubeIDE team in order to take relevant corrective actions.
Internal ticket number: 117331 (PS: This is an internal tracking number and is not accessible or usable by customers)
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-11-05 04:02 AM
Is there an switch, I can prevent breakpoint from working?
Now also the program deos'nt stop at line 269 inside the DMA1_CH1_IRQHandler,
something which has worked before!
Has there something to be present in "Actions" for a breakpoint
(I've no idea, how I have delteted it, if something was present)?
Can I switch from "Debug" to "Release" inside STM32CubeIDE
or will switching automatic done by selecting "Run" or "Debug"?
2021-11-05 06:02 AM
Look at the VECTACTIVE bits to determine what IRQ the system is in.
Ensure the IRQ order in the startup file matches that in the reference manual (in NVIC).
Don't assume newer is better.
2021-11-05 06:21 AM
It seems I've accidentally hit the Ctrl+Alt+B !!!
Now breakpoints will work again!
2021-11-05 06:29 AM
It remains: STM32CubeIDE Version: 1.7.0 produce an erroneous startup file when
a STM32 Project with "empty" Target Projekt Type will be creatied.
2021-11-05 06:37 AM
2021-11-05 07:38 AM
That's absurd, and it begs the real question of which order is in the silicon? Also bizarre that the capitalization is off. I'm sure the CubeMX guy making the startup file just did what was in the RM and didn't ask questions.
2021-11-05 07:54 AM
Order in silicon is according to the description!
2021-11-10 07:46 AM
Hi @ULehm.1 ,
Thanks for highlighting these issues.
I'll bring them to the attention of both reference manual responsible as well as STM32CubeIDE team in order to take relevant corrective actions.
Internal ticket number: 117331 (PS: This is an internal tracking number and is not accessible or usable by customers)
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.