2019-03-18 02:58 AM
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
2019-03-18 04:30 AM
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.
2019-03-18 05:25 AM
What do you call a "blank part"? It is a stm32nucleo. The BOOT0 pin is set to 0V.
2019-03-18 05:58 AM
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.
2019-03-18 06:17 AM
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.
2019-03-18 06:23 AM
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.
2019-03-18 07:22 AM
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?
2019-03-18 07:30 AM
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.
2019-03-18 07:37 AM
Thanks a lot for this tip.
Must I use it standalone or can I use it inside TrueStudio?
2019-03-18 07:39 AM
It's a standalone tool. I'm a command line kind of guy.