Question
STM32F407VG: Reduce power consumption by disabling ports clock
Posted on May 04, 2016 at 10:02
Hi all.
I am trying to reduce power consumption in my device by disabling the GPIOs ports clocks. I did it by writing '0' in theRCC_AHB1ENR
register at the required locations. However, It did not work... Then, I did a little experiment: at the start of the main() I added these lines: RCC->AHB1ENR |= XX;while(1)
{
}
and measured the power consumption. I got these unexpected results: when XX = 0 I get 52.1 mA (Assume that the PCB consume some of the power) XX = 1 I get 64.5 mA (port A itself consume 12 mA???) XX = 3 I get 64.5 mA (nothing??) XX = 7 I get 64.7 mA (?) XX = F I get 64.7 mA (?) XX = 1F I get 63.8 mA (port E produce power? nobel prize...) XX = 3F I get 65.7 mA XX = FF I get 66.1 mA XX = 1FF I get 54.3 mA (All the ports together consume less???) I am really confused... Am I doing mistake? Thank in advance for every reply... Yonatan Sade