cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L051K8U6 - Larger current consumption scaling with clock than in datasheet

OSilv.1
Associate II

Hello,

I've designed a board with the MCU above. The board has the following peripherals/configurations:

-i2c

-spi

-gpioA

-gpioB

-EXTI and timer interrupts

-serial wire debug

-timers (tim2, tim21, tim22)

The board has some ICs that are all in their lowest power state. I estimate a total of 100uA spent on these ICs.

The code itself initializes the peripherals and sets SPI and I2C devices into their lowest power states before entering the main loop, which is empty.

I acknowledge that the other IC's on the board and the peripherals that are not associated with a clock will drain a roughly constant current. My confusion is regarding how the consumption of the board scales with the MSI clock. Below is my data.

Clock speed (kHz) | Board current (uA)

4194 | 2330

1048 | 1275

524 | 850

As you can see, the current consumption appears to be something like:

current = M*clock + static drainage, where M is much larger (~4X) than the datasheet suggests.

Any suggestions would be greatly appreciated.

Best,

Oliver

3 REPLIES 3

Try first with an empty loop, no peripherals initialized.

JW

Hi JW,

I've removed all code such that  SystemClock_Config(); and  HAL_Init(); are the lines run before an empty loop. Here is my results:

4mhz = 1603

1mhz = 1217

0.5mhz = 1150

If I add the gpio initialize and set the board ICs into their lowest power mode (via gpio outputs) I obtain:

4mhz: 1365

1mhz: 929

0.5mhz: 856

These sorts of changes are consistent with the datasheet, with the gpio version understandably having slightly higher changes. We can also see from the tests that the non-mcu IC's use roughly 250uA more when not powered down.

I have two questions from here:

1) Why are the peripherals using so much current? The STM32CubeIDE tool shows that the peripherals should draw, for example, 130uA at 4mhz, not 727 uA.

2) The board itself should not be using 800uA in its powered down state. Are there sources of constant current draw within the mcu that I can optimize?

Thank you.

Best,

Oliver

Hi Oliver,

I don't want to delve into the particularities of your design, that's your job.

Try a Nucleo board as a "known good" reference point.

Set the mcu to some of the lowest-consumption "sleep" modes to compare consumption with rest of the board. Don't forget that debugging may be intrusive also in low power modes and may influence consumption (not only in those modes).

Try to disconnect/remove parts (or add them incrementally) to find out what causes the excessive current.

Try adding/removing handling of peripherals for the same purpose.

JW