cancel
Showing results for 
Search instead for 
Did you mean: 

LPTIM current consumption

R.uy
Associate

Hello,

 

For my research work I want to characterize how much current the LPTIM of a STM32U575ZIT6Q consumes when in compare match mode (counting from 0 to 65535 repeatedly).

I prorgrammed two very simple codes, one where the counter is not initialized and the code goes to a while(1) after intialization of basic functions (clock and GPIO). The second program does the same but before the while(1) the timer is initialized and set-up. The core is running at 10 MHz, and the timer at 1MHz.

To get the current consumption my idea was to power the MCU with an SMU with the timer on and then with timer off and get the current consumption by the difference of both values. While doing this I found two strange things:

1-The current doesnt seem to be steady even when stucked in the while loop (see picture), what can explain this turning on and off of some other cicuitry? Maybe other peripherals?

2-When I did the measurements with the timer off the average value was very close to 7 mA, which is higher than with the timer on, so this method doesnt seem to work. How can I measure the current consumption? AFAIK it is not reported in datasheets.MCU current.jpeg

Thanks!

R

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> AFAIK it is not reported in datasheets.

The datasheet goes into great detail about current consumption under various scenarios, including LPTIM.

TDK_0-1705980728771.png

Lots of things affect current consumption, including temperature. 6.899 to ~6.905 is not really a wide range, about 0.08% difference.

Running code from ram rather than flash might make it more consistent. Expect some amount of uncertainty due to the complexity of the core. I'd just rely on the datasheet.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

1 REPLY 1
TDK
Guru

> AFAIK it is not reported in datasheets.

The datasheet goes into great detail about current consumption under various scenarios, including LPTIM.

TDK_0-1705980728771.png

Lots of things affect current consumption, including temperature. 6.899 to ~6.905 is not really a wide range, about 0.08% difference.

Running code from ram rather than flash might make it more consistent. Expect some amount of uncertainty due to the complexity of the core. I'd just rely on the datasheet.

If you feel a post has answered your question, please click "Accept as Solution".