AnsweredAssumed Answered

LPC55S69 : power_manager_lpc example

Question asked by Eugene Hiihtaja on Jan 25, 2020
Latest reply on Feb 11, 2020 by Felipe García

Hi !

 

It is not so clear why few lines are really need  before entering to PowerDown mode.

 

For what reason SystemClock set to 32768 Hz before entering to PowerDown mode ?

It should go to it directly from any clock.

Or in this case it more relaible way ? Or some errata ?

 

Regards,

Eugene

 

void DEMO_PreLowPower(void)
{
/*!< Configure RTC OSC */
POWER_EnablePD(kPDRUNCFG_PD_XTAL32K); /*!< Powered down the XTAL 32 kHz RTC oscillator */
POWER_DisablePD(kPDRUNCFG_PD_FRO32K); /*!< Powered the FRO 32 kHz RTC oscillator */
CLOCK_AttachClk(kFRO32K_to_OSC32K); /*!< Switch OSC32K to FRO32K */

CLOCK_SetFLASHAccessCyclesForFreq(32768U); /*!< Set FLASH wait states for core */

/*!< Set up dividers */
CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 1U, false); /*!< Set AHBCLKDIV divider to value 1 */

/*!< Set up clock selectors - Attach clocks to the peripheries */
CLOCK_AttachClk(kOSC32K_to_MAIN_CLK); /*!< Switch MAIN_CLK to OSC32K */

/*< Set SystemCoreClock variable. */
SystemCoreClock = 32768U;
}

 

  DEMO_PreLowPower();
POWER_EnterPowerDown(APP_EXCLUDE_FROM_POWERDOWN, 0x7FFF,
WAKEUP_GPIO_GLOBALINT0 | WAKEUP_GPIO_GLOBALINT1, 1);

Outcomes