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".
24 REPLIES 24
AScha.3
Chief III

new project with C6 version (is really small program):

0693W00000UoKLJQA3.png--- but still same effect: stalled in startup...

0693W00000UoKMvQAN.pnghere pic - looks original - right ?

0693W00000UoKP1QAN.png

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

I would try to connect MCU to Cube Programmer and process complete erase of MCU. I suppose you dont use some HW which is not in C6 version.

AScha.3
Chief III

ok, mass erase, full chip erase, prog. verify ok. nothing different.

stall in startup. :sad_but_relieved_face:

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

Could you send registers values table in infinite loop?

AScha.3
Chief III

see in my post from yesterday, registers at loop. (in black area)

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

But they are from another bin file. We need from new bin file (for C6 MCU).

AScha.3
Chief III

aaa. ok. BUT : now cpu is running !!

debug waits at program start in "main" , as usual.

just i dont know why...i set optimizer on -O2 (was -O0 );

i tried some times...now again stall in startup.

registers :

0693W00000UoLXkQAN.png 

confusing...

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

It si weird. Stack pointer (sp) has value 8160byte. Like there is 8kb memory set.

Check linker script (.LD)

Top-of-Stack needs to be 0x20001000 (4KB) or below. Check first vector.

Right now you're faulting directly out of reset, and perhaps into a catch-all handler everything points too.

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

from .LD :

>>>

/* Entry Point */

ENTRY(Reset_Handler)

/* Highest address of the user mode stack */

_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */

_Min_Heap_Size = 0x200 ; /* required amount of heap */

_Min_Stack_Size = 0x400 ; /* required amount of stack */

/* Memories definition */

MEMORY

{

 RAM   (xrw)   : ORIGIN = 0x20000000,  LENGTH = 4K

 FLASH   (rx)   : ORIGIN = 0x8000000,  LENGTH = 32K

}

/* Sections */

SECTIONS

{

 /* The startup code into "FLASH" Rom type memory */

 .isr_vector :

 {

   . = ALIGN(4);

   KEEP(*(.isr_vector)) /* Startup code */

   . = ALIGN(4);

 } >FLASH

<<<

and in IDE shows:

0693W00000UoM3qQAF.png 

looking ok for me.... or not ?

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