cancel
Showing results for 
Search instead for 
Did you mean: 

(programmed) STM32F030 stucks in the startup (xx.s ) forever. defective batch ??

AScha.3
Chief III

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:

0693W00000Uo3uMQAR.png10 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 ??

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

Accepted Solutions
AScha.3
Chief III

Thanks to all for your help . so finally i found it ...

  1. C6 chip has only 4k ram, so using same bin as with C8 version using > 4k ram going mad
  2. using optimizer (-O2) made the chip starting the program (but program stuck in While-loop)
  3. 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).

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

View solution in original post

24 REPLIES 24

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

Watch for correct spelling of IRQHandler, matching those in vector table.

For C++ or .cpp compilation for name mangling, use extern "C" form ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AScha.3
Chief III

@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 .

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

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

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.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AScha.3
Chief III

ok, i do next Tuesday, when at work again.

for now thanks for the advice.

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

so - here we are:

old (1..2 years) board: C8T6 variant

0693W00000UoFrKQAV.png 

with new chip: C6T6 (because C8 not available)

0693W00000UoFuOQAV.png 

and ID : (in cubeIde )

0693W00000UoFuYQAV.png 

and SCB_ICSR :

0693W00000UoFunQAF.png 

VECTACTIVE:

0693W00000UoFvRQAV.png(what is vect 3 ? WWDG ? )

and registers at infinite loop:

0693W00000UoFvWQAV.png 

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 ?

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

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.

AScha.3
Chief III

Ooo...i was not aware , that is RAM also different size . ****.

i try...

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