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(); ... } |
Hi Tarek,
I also tried again to get the magic packet wakeup running on LPC1768. I studied everything about filtering and wakeup...
It simply does not work...
In the end I think the problem is caused by the CRC calculation.
What I have found out is that the CRC is calculated not according RFC3309, see UM10360 Chapter Ethernet/CRC calculation.
The ethernet controller matches the CRC on magic packet frames, too. And that will fail on a RFC3309 CRC.
Best regards
Jürgen