‎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-19 12:25 AM
new project with C6 version (is really small program):
--- but still same effect: stalled in startup...
here pic - looks original - right ?
‎2022-10-19 01:50 AM
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.
‎2022-10-19 02:47 AM
ok, mass erase, full chip erase, prog. verify ok. nothing different.
stall in startup. :sad_but_relieved_face:
‎2022-10-19 03:31 AM
Could you send registers values table in infinite loop?
‎2022-10-19 03:36 AM
see in my post from yesterday, registers at loop. (in black area)
‎2022-10-19 04:06 AM
But they are from another bin file. We need from new bin file (for C6 MCU).
‎2022-10-19 04:38 AM
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 :
confusing...
‎2022-10-19 05:21 AM
It si weird. Stack pointer (sp) has value 8160byte. Like there is 8kb memory set.
‎2022-10-19 06:21 AM
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.
‎2022-10-19 06:29 AM
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:
looking ok for me.... or not ?