cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 + STLINK2 SWD => overconsumption

Mich1
Associate III

Hello,

I have a STM32L476 board. This board consumes 4µA.

When I reprogram the board by SWD from TrueStudio, after deconnecting the STLINK2, the board consumes 800µA. If I reset the board, the current consumption is still 800µA, which is not acceptable for a battery product. The only way to have a normal current consumption (4µA) is to remove the battery, wait the condensators to discharge then re-solder the battery.

Is there another tool which permit to program the STM32L476 without producing this current overconsumption?

It is a real problem to always unsolder-wait-resolder the battery.

Best regards

Mich

9 REPLIES 9
Geoffrey1
Associate III

Was this a board with a "blank" part ? The reason I ask is that the mechanism that decides whether to enter the boot loader isn't cleared by a simple reset after programming.

Mich1
Associate III

What do you call a "blank part"? It is a stm32nucleo. The BOOT0 pin is set to 0V.

Geoffrey1
Associate III

I meant a part from the factory on a custom board. If it's a nucleo board, you have to consider all the other components -- where are you measuring current ? Through the idd jumper provided ? What battery are you talking about -- the nucleo board doesn't have one. As you can tell, I'm a bit confused about your physical hardware configuration.

The problem I was referring to relates to programming a part that has not previously been programmed. In this situation, the processor will reset to the boot loader after programming unless you --

1) remove the power, or

2) Clear the appropriate bits in the flash memory controller.

Uwe Bonnes
Principal III

For miminal consumption, remove at least the jumper between STLINK NRST and Target NRST. Otherwise the NRST Pullup will back power the Stlink STM32F103. Check also any other line between Stlink and Target.

Geoffrey1
Associate III

Uwe is absolutely correct about the possible current sinks (also SWDIO has a pullup in the target, but that's not active in the stop/standby/shutdown states). In general, Nucleo boards are not a good start for building a low-power system other than basic code development because of the extraneous components.

Mich1
Associate III

I did a few change to the nucleo board:

I broke the board to remove the STLINK part and I use an external STLINK2

I changed the U4 regulator to a real low power LDO: the native one consummes 20µA

I can put either a battery or a accurate laboratory power supply on JP5. This external power supply permits to measure the current consumption.

My main concern is that the debug core of the STM32L476 does not shutdown when the debug session finishes. We plan to use this microcontroller on battery supply device but this debug issue will be a real problem each time we will have to re-program the device.

I already use competitor µcontroller which do not have this behaviour.

So my request is: is there any other tool than the STLINK2 with TrueStudio which permits to download the binary without producing this overcurrent when the debug session is finished? Or is there an option in TrueStudio which permits to shutdown the debug core at the session end?

Geoffrey1
Associate III

Yes, the debug core is a problem I have run into. I use openocd to program through stlink which doesn't suffer from this issue.

Mich1
Associate III

Thanks a lot for this tip.

Must I use it standalone or can I use it inside TrueStudio?

Geoffrey1
Associate III

It's a standalone tool. I'm a command line kind of guy.