2022-10-14 01: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.
Solved! Go to Solution.
2022-10-20 01:23 AM
Thanks to all for your help . so finally i found it ...
(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).
2022-10-14 02: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
2022-10-14 02: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
2022-10-14 04: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 .
2022-10-14 05: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
2022-10-14 05: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.
2022-10-14 05:48 AM
ok, i do next Tuesday, when at work again.
for now thanks for the advice.
2022-10-18 02: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 ?
2022-10-18 04: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.
2022-10-18 04:39 AM
Ooo...i was not aware , that is RAM also different size . ****.
i try...