I see LPC5411x SDK provides some Power APIs. There is a function called POWER_SetLowPowerVoltageForFreq in SDK, and its description is "Set voltage levels for low power regulation mode". However, the description still confuses me with the scope of influence. Does this function regulate power just in Sleep/Deep-sleep mode or also in Active mode? Where shall I use this function in application?
Actually, I have tried this function in my code, like that (this is an application used HWVAD and Watchdog oscillator in Deep-sleep mode):
// using FRO 12 MHz clock as main clock now
// okay here
POWER_EnterDeepSleep(SYSCON_PDRUNCFG_PDEN_SRAM0(1) | SYSCON_PDRUNCFG_PDEN_WDT_OSC(1)); // only keep Watchdog oscillator running and power down FRO
// cannot get here
It seems like okay immediately after POWER_SetLowPowerVoltageForFreq, but when it tries to get into Deep-sleep mode, the DMIC seems unclocked and never wakes up the cores. When I remove the call of POWER_SetLowPowerVoltageForFreq, it gets back to normal.
I also try to change the source of main clock to Watchdog oscillator before it gets into Deep-sleep mode, it seems like okay immediately after this operation, but when HWVAD wakes up the cores and the source of main clock is changed back to FRO 12 MHz it also fails. I would like to know what happen in this function.
In short, please inform me how to use POWER_SetLowPowerVoltageForFreq, and (if permitted) its principle. Thank you.