cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L431VCT6 Reset does not work on basic project created by STM32CubeMx

mich35
Associate III

Hello,

I am using a sTM32L430 with a JTAG access through ST LINK V2 and STM32CubeIDE.

This project was created with STM32CubeMx and mainly contains a while(1) loop toggling a led.

After a power the program starts correctly (led toggles and current consumption is around 2mA)

After a reset the program does not start and the current consumption is around 16mA.

I checked the reset signal state with an oscilloscope and the waveform is correct.

Do you have any idea?

Best regards

Mich

2 REPLIES 2
Bob S
Principal

Starting a program from the IDE "run" button is different than by hardware reset or power-on.  The IDE will force the PC to the "Reset_Handler" address in the elf file (comes from the startup_stm32Lxxxxxx.s file) - ignoring the PC value in the vector table.  I don't recall off hand what it does with the stack pointer.  Hardware reset or power-on will use the vector table entries for SP and PC.

So you may have some issues with the vector table.  See if you have USER_VECT_TAB_ADDRESS defined to non-zero in system_stm32l4xx.c.

Other than that, use the debugger to set breakpoints in main() and in the assembly startup code then press the reset button and see what the code does.

mich35
Associate III

It seems that it is an hardware issue with this hand soldered prototype.

I soldered a 2nd PCBA and there is not such issue.