Hi sabinabruce !
I have modified standart lpc example where DIR and FMCCR registers is printed before and after power down mode.
Entering Powerdown [Reset to wakeup] ...
+Port0 DIR - 0x0, PIN - 0x60001024, SET - 0x0, CLR - 0x0
+Port1 DIR - 0xD0, PIN - 0x40200, SET - 0x40200, CLR - 0x0
+SYSCON->FMCCR - 0x103A
Press any key to confirm to enter the power down mode and wakeup the device by press s1 key on board.
Gin event occurs
-Port0 DIR - 0x0, PIN - 0x60001004, SET - 0x0, CLR - 0x0
-Port1 DIR - 0x0, PIN - 0x402C0, SET - 0x402C0, CLR - 0x0
-SYSCON->FMCCR - 0x101A
Wakeup.
You can see that DIR and prefetch bit are lost.
Those finding are not clearly mentioned in UM and need to be clarified if this some wrong configuration
or just some errata or expected behaviour. But official NXP reply required.
Regards,
Eugene
PS. I haven't found how-to attach file to this post but exact modification for file power_manager_lpc :
"
#if (defined(FSL_FEATURE_SYSCON_HAS_POWERDOWN_MODE) && FSL_FEATURE_SYSCON_HAS_POWERDOWN_MODE)
case kPmu_PowerDown: /* Enter power down mode. */
{
/* Led initialized and set ON */
LED_RED_INIT(0);
LED_BLUE_INIT(0);
LED_GREEN_INIT(0);
PRINTF("+Port0 DIR - 0x%X, PIN - 0x%X, SET - 0x%X, CLR - 0x%X\r\n", GPIO->DIR[0], GPIO->PIN[0], GPIO->SET[0], GPIO->CLR[0]);
PRINTF("+Port1 DIR - 0x%X, PIN - 0x%X, SET - 0x%X, CLR - 0x%X\r\n", GPIO->DIR[1], GPIO->PIN[1]), GPIO->SET[1], GPIO->CLR[1];
SYSCON->FMCCR |= 0x30; // enable prefetch, acceleration is enabled by default
PRINTF("+SYSCON->FMCCR - 0x%X\r\n", SYSCON->FMCCR);
PRINTF(
"\r\nPress any key to confirm to enter the power down mode and wakeup the device by press s1 key on "
"board.\r\n\r\n");
GETCHAR();
#if (defined(FSL_FEATURE_POWERLIB_EXTEND) && FSL_FEATURE_POWERLIB_EXTEND)
#if (defined(DEMO_WAKEUP_WITH_GINT) && DEMO_WAKEUP_WITH_GINT)
DEMO_PreLowPower();
POWER_EnterPowerDown(APP_EXCLUDE_FROM_POWERDOWN, 0x7FFF,
WAKEUP_GPIO_GLOBALINT0 | WAKEUP_GPIO_GLOBALINT1, 1);
DEMO_PowerDownWakeup();
APP_InitWakeupPin();
PRINTF("-Port0 DIR - 0x%X, PIN - 0x%X, SET - 0x%X, CLR - 0x%X\r\n", GPIO->DIR[0], GPIO->PIN[0], GPIO->SET[0], GPIO->CLR[0]);
PRINTF("-Port1 DIR - 0x%X, PIN - 0x%X, SET - 0x%X, CLR - 0x%X\r\n", GPIO->DIR[1], GPIO->PIN[1]), GPIO->SET[1], GPIO->CLR[1];
PRINTF("-SYSCON->FMCCR - 0x%X\r\n", SYSCON->FMCCR);
#endif
#else
POWER_EnterPowerDown(APP_EXCLUDE_FROM_POWERDOWN);
#endif
}
break;
#endif