AnsweredAssumed Answered

Wakeup LPC1768 with Magic Packet

Question asked by lpcware Employee on Jun 15, 2016
Latest reply on Feb 23, 2017 by Juergen Hoegerle
Content originally posted in LPCWare by gts87 on Tue Apr 21 06:06:47 MST 2015
Hello everyone,

I'm currently working with a LPC1768. I want to use the wake-on-lan functionality with a magic packet, but until now I have some problems and I hope somebody can help me out.

Waking up the device works fine as long as I use only the RxFilterEnWoL. But as soon as I activate the MagicPacketEnWoL bit in the RxFilterCtrl register the microcontroller keeps sleeping...

FYI: I checked my magic packet with wireshark, it should be fine.

Here's my code:




extern "C" void MyEthernetHandler(void) {
printf("...:::Ethernet Interrupt Handler!:::...\r\n");
}


//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 = 0;
*RxFilterCtrl |= (1 << MagicPacketEnWoL); //let only a Magic Packet wakeup the device
*RxFilterCtrl |= (1 << AcceptPerfectEn);

__WFI();

...
}




Any ideas?


Thank you and best regards,

Tarek

Outcomes