9 years, 7 months ago.

Wakeup with Magic Packet LPC1768

I'm trying to wakeup a LPC1768 from sleep-mode with a magic packet. But somehow the device is not waking up.

FYI: the device wakes up when I enable the "Wakeup at any packet"-option.

Where is my error here?

//Interrupt Enable Register
int *IntEnable = (int*) 0x50000FE4;
#define WakeupIntEn 13	

//Receive Filter Control Register
int *RxFilterCtrl = (int*) 0x50000200;
#define RxFilterEnWoL 		13		
#define MagicPacketEnWoL 	12

int main() {

NVIC_EnableIRQ(ENET_IRQn);
NVIC_SetVector(ENET_IRQn, (uint32_t) MyEthernetHandler);

*IntEnable |= (1 << WakeupIntEn);
*RxFilterCtrl = (1 << MagicPacketEnWoL);

__WFI();

...
}
Be the first to answer this question.