I've developed some code for the STM32F4 on the Discovery and before starting on my own hardware design I'd like to trim the code for minimal power consumption. I already played around with different values for STM32_HPRE and STM32_PPRE1, but obviously I can't go below STM32_PPRE1 == STM32_PPRE1_DIV1. So far, the lowest setting I can use without losing the peripherals (even GPIO) is 168/4 = 42 MHz (STM32_HPRE = STM32_HPRE_DIV4, STM32_PPRE1 = STM32_PPRE1_DIV1). According to the STM32F417 manual, the power consumption should be between 16mA (30MHz) and 30mA (60MHz) in that configuration and it actually reads at 23mA for me (good, I would say). However, when I try to tune it down further (STM32_HPRE > DIV4), I'm losing the peripherals somehow, so I can't even check via GPIO and blinking LEDs wether the CPU is still running, and I also don't see the power consumption to drop according to the user manual. So, 2 questions:
- Does anyone have experience with running ChibiOS on the STM32F4 at clock frequencies < 42MHz and if yes, can you please share?
- I guess that while trying to set the clock frequency below 42MHz, I actually locked the CPU somehow, so it's not able to execute any GPIO pull up/down code for proper termination. That would explain why I don't see lower power consumption below <42MHz. Maybe someone can confirm that what I tried will lock the CPU?
Best,
STYLON