(programmed) STM32F030 stucks in the startup (xx.s ) forever. defective batch ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 1:57 AM
the hole batch of F030C6T6 has same behavior :
can access with ST-Link , program, verify - all ok. read core registers, option bytes...ok.
but then no program start ! chip stays in startup here:
10 tested boards ihave identical behavior. chips coming from PCB assembler , as usual.
I replaced one with a (suspect source , from aliexpress dealer) F030 , then board running as it should.
- can i do anything, to get these boards running?
- if chips have all same defect, how is it possible to passing the wafer test ??
Solved! Go to Solution.
- Labels:
-
ST-Link
-
STM32F0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-20 1:23 AM
Thanks to all for your help . so finally i found it ...
- C6 chip has only 4k ram, so using same bin as with C8 version using > 4k ram going mad
- using optimizer (-O2) made the chip starting the program (but program stuck in While-loop)
- making all warnings away and using "volatile" for variables, modified in interrupt, get it running.
(program is old, transferred from other chip and never made in good/correct C-style )
-> chips are not defective, with optimized program for C6 version all running fine now.
but crazy, that the cpu stall in startup code, without showing some useful error (illegal adress or so).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 2:24 AM
Try to debug as usually, i.e. observe, which interrupt caused to enter the default handler (SCB_ICSR.VECTACTIVE) and if it's HardFault, observe the stacked registers etc.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 2:30 AM
Watch for correct spelling of IRQHandler, matching those in vector table.
For C++ or .cpp compilation for name mangling, use extern "C" form ​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 4:17 AM
@Community member​ , there is no "normal" debug possible, first and only thing is start und stuck at : b Infinite_Loop . restart, reset always comes to this line in startup.s no stepping or anything else than leaving debug session is possible. ok, reading registers, flash etc is ok, but no step in program execution.
@Community member​ , program is pure C, and was running ( about 2 years) always without any problem - until now, with these chips from last order. (same PCB, same .bin as before)
with first board, i was thinking : probably damaged chip by static discharge / bad handling.
but 10 tested boards with 100% identical problem - cannot be discharge accident .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 5:00 AM
Then read out the SCB_ICSR register and find out what is the current interrupt number in VECTACTIVE field of that register, then proceed accordingly to that.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 5:26 AM
Read the DEVID, might be a different stepping of the IC, or one where ST has changed the die.
Pictures of working and non working parts might also be instructive.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-14 5:48 AM
ok, i do next Tuesday, when at work again.
for now thanks for the advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-18 2:21 AM
so - here we are:
old (1..2 years) board: C8T6 variant
with new chip: C6T6 (because C8 not available)
and ID : (in cubeIde )
and SCB_ICSR :
VECTACTIVE:
(what is vect 3 ? WWDG ? )
and registers at infinite loop:
so seems WWDG is doing this - but is off.
i had this idea, because WWDG_IRQ shown, but setting option bytes to Hardware and back changes nothing.
any idea ... or kick them to trash ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-18 4:02 AM
C6 has only one half RAM and FLASH then C8. If you use bin files for C8, the stack si in nonexisting RAM memory. I would compile whole project for C6 MCU and use this bin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-18 4:39 AM
Ooo...i was not aware , that is RAM also different size . ****.
i try...
