2023-10-30 12:09 PM
When first programming a New STM32L431KC, it does not program or run unless mass erase is performed first.
I use IAR and STLINK/V2
From IAR, I try:
a) Download program - uC does not run, even after reset
b) Start debugging session - Does not execute code. Gets stuck "hang" on HAL_Delay(xx) statement.
When I use STM32MXProgrammer and ERASE all flash, then the programming works, and I can download from IAR.
Any help appreciated.
Solved! Go to Solution.
2023-10-31 01:42 AM
I don't use IAR but you can try to power-cycle the board after first programming.
Alternatively, change explicitly the 0x0000'0000 remap to user FLASH at the beginning of your program; or, maybe better, set VTOR to 0x0800'0000.
JW
2023-10-31 01:42 AM
I don't use IAR but you can try to power-cycle the board after first programming.
Alternatively, change explicitly the 0x0000'0000 remap to user FLASH at the beginning of your program; or, maybe better, set VTOR to 0x0800'0000.
JW
2023-11-01 04:47 AM
Thanks, and yes that works.
The F051, L051, L052 and others does not do that.
The only difference on the boards is the on the L431 I use a 32KHz resonator.
Perhaps that is it.