Skip to main content
TBone
Associate
January 30, 2021
Question

STM32L431KCU STM32Cube IDE with j-link needs power cycling after flash to run the program. Why?

  • January 30, 2021
  • 1 reply
  • 1005 views

Hi,

I'm using STM32L431KCU6 in a battery powered application running on custom hardware. The clock frequency is set to 72MHz after init, then it goes to stop mode and consumes less then 10uA. The battery is soldered to the PCBA.

As I flash the code to the MCU and removing the programming header it consumes about 10mA, which looks still running on 72MHz and not going to sleep. Otherwise the code looks running correctly. If I disconnect and reconnect the battery the consumption drops to 10uA as needed and the code is running correctly.

I tried to check every settings for the j-link but nothing helps.

Since in this application the battery is soldered to the board it looks problematic to cycle the power.

I'm just new to CubeIDE and mainly hw engineer, so it should be some banal mistake. I haven't seen such thing on other brand ARMs.

Anyone has any idea what to do?

Thanks,

T

This topic has been closed for replies.

1 reply

Vangelis Fortounas
Associate II
January 31, 2021

Hello

A reset after programming, starts the program. No need to disconnect the battery

In JLink connector should exist the NRST pin

In Keil IDE to start the device after programming, is an option.

TBone
TBoneAuthor
Associate
January 31, 2021

Thanks I tried it doesn't help.​

Vangelis Fortounas
Associate II
January 31, 2021

Seems that some data from backup used by new program for configurationare not valid.

Need to make some code called "factory settings" to be called some way not only after POR.