gts87
Newbie level 1
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:
Any ideas?
Thank you and best regards,
Tarek
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:
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