cancel
Showing results for 
Search instead for 
Did you mean: 

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

AScha.3
Chief II

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".
24 REPLIES 24

As Clive said above: show beginning of vector table i.e. first couple of words after 0x0800'0000.

But that may be inconclusive, too, the startup code may change SP at its will. It probablyy comes from some "magic" in the startup code, which is given by your toolchain. I wouldn't be surprised if it is result of setting the particular STM32 model in some well hidden window of the IDE.

JW

AScha.3
Chief II

funny: now (still same program, changed nothing intentional ) starting normal, cpu registers now:

0693W00000UoMF8QAN.png but...i run compiler again , just to see: 0 warnings , 0 errors .

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

Expand the isr_vector so we can SEE the content, ie what the processor is actually loading into it's registers at startup, and what over handlers are pointing too.

Check the _estack symbol

That is typically loaded by the processor, and often loaded a second time into SP in ST's startup.s code.

Processor will fault the first time anything pushes onto the stack, ie PUSH LR and then the processor's going to have all kinds of issues because it will try an push context onto the stack, basically double faulting.

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 II

isr_vector ...in IDE ?

0693W00000UoMMYQA3.pngor where to look ?

+

_estack symbol -- is where ?

+ i have to go home now, tomorrow i can check ....

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

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