cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Current consumption versus clock speed

If I reduce the clock speed on a STM32F4 from 168Mhz to 96Mhz, with bus speeds reduced accordingly.

Should the current consumption of the processor be reduced.

I've been trying to take some current measurements, and there does not seem to be any reduction in current consumption of my board when I reduce the clock speed.

By comparison, I have another board which uses a NXP / Freescale MK22 MCU, and to save power we reduce the clock speed to 16Mhz when the board is idle

I can't use low power modes, becuase I need to maintain PWM on pins for things like backlight intensity, so reducing the clock speed was our only option

But with the STM32F4 I'm not seeing any reduction in current, even if I reduce clock speed to 16MHz, and use the maximum dividers on all the busses.

6 REPLIES 6

Sorry. I didn't realise that I needed to type more details into another box

Here is the reduced clock speed screengrab, i.e at 96hz

but even at 16Mhz I don't see any reduction in current :(

0693W00000SvdWHQAZ.png

AScha.3
Chief III

so you reduce clock at an cmos-cpu from 168 to 16 MHz - and see no effect ?

  1. your current probe is defective
  2. you test something else on the table
  3. your cpu is dead , take a new one.
  4. you didnt change the clock on chip

without joking: just test what cube tells you about current of soc , simulation only, but gives you an idea, what will happen in real world;

here test on my H743 audio player: from 400 to 300 MHz down:

0693W00000SvdXAQAZ.png

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

OK.

I have the whole board being powered via bench PSU with a digital multimeter in series to measure the current.

I am seeing some reduction in current when I reduce the clock speed but not as much as I've seen with other manufacturers MCUs

Running from HSI the board is consuming 52mA, and in normal operation (168Mhz), the current is 73mA.

I added a while(true); statement into the start of the main application code, after the HAL init is complete.

So these values hopefully are not affected by any of the application code.

I should probably try putting a while(true);  at the top of main() before HAL_Init() so I can measure the current at that point in the code

I wonder if this has something to do with the application code being run by a bootloader, which already sets up its own clock configuation.

Perhaps I need to add some code before the HAL clock init runs, to reset the clock registers back to a default state. ??

Doing some more tests on the board, which includes its own voltage regultor to be powered via a 7.4V Lipo battery

If I add

__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);

HAL_PWR_EnterSTANDBYMode();

while (true);

To the start of main()

The board consumes 14mA.

This will be the various other bits of hardware on this board, including several regulators, which are consuming the current, as the STM32F4 should be consuming only a few microamps.

Hence the difference in current at 168Mhz, of about 60mA, will be the MCU including all the perhiperals

Looking at the current calculator tool, I should see a reduction of around 15mA by reducing the clock from 168Mhz to 96Mhz, but I'm not seeing that at the moment.

Hence why I think potentially there is a problem by using the bootloader

Piranha
Chief II

Also read and take into account this:

https://community.st.com/s/question/0D53W00001bnh8dSAA/how-to-enter-standby-or-shutdown-mode-on-stm32

One of the issues described there also consumes additional few mA of current.

Thanks

Stop modes would only be useful to me when the user didn't need the backlight PWM to be running.

I may use them, but they are not top of my list of power saving measures at the moment.