Wakeup LPC1768 with Magic Packet

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Wakeup LPC1768 with Magic Packet

1,176件の閲覧回数
lpcware
NXP Employee
NXP Employee
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
ラベル(1)
0 件の賞賛
返信
1 返信

844件の閲覧回数
hansjuergenhoeg
Contributor I

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

0 件の賞賛
返信