hi, I'm trying to get the LPC2468 into a power down mode and I want to stay in this power down section of code until an usb interrupt occurs to wake the processor.
What I want to do is set the power down bit of the PCON register (0x2) and then poll on it while it is high until is it cleared by the USB interrupt which wakes up the processor.
Here is my code:
#if POWERDOWN_MODE_USB_WAKEUP if ( WakeupFlag == 1 ) { WakeupFlag = 0; ConfigurePLL(); USB_Init(); USB_Connect(TRUE); /* USB Connect */ } /* bit 8 on USN_INT_STAT is USB NeedClk bit. */ if ( SuspendFlag == 1 ) { if ( timer0_counter > 200 ) { OTG_CLK_CTRL = 0x00; while ( USB_INT_STAT & (1 << 8) ); WakeupFlag = 1; PCON = 0x2; } } #endif
but i cant able to go into power down mode. what i noticed is USB_NEED_CLK is not going low.
Anyone has experience with this? Please help...