Wake On Lan by wake up frame

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Wake On Lan by wake up frame

1,583 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Krishnakumar on Thu Sep 18 02:46:36 MST 2014
Hi everybody,

I'm configuring WOL feature on lpc4330.

Wake on lan by magic packet is working fine. But I have problem with wake up frame. I want to know how the particular pattern is decided by the remote wakeup frame filter register and how the crc_16 is calculated?

I found that there are different kinds of CRC_16 like IBM, CCITT, DECT, DNP. The manual is also not provided with the information regarding the which CRC_16 it's going to be calculated and also there is no reference example of wake up frame like it's given for magic packet.


Thanks and regards,

Krishnakumar K.
标签 (1)
0 项奖励
回复
2 回复数

1,319 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gts87 on Sun Apr 19 07:59:28 MST 2015
Hello Jürgen,

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 you could maybe 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...

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
0 项奖励
回复

1,319 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jh.hoegerle@gmx.de on Mon Dec 15 14:34:34 MST 2014
Hello Krishnakumar,

I am using LPC1768. I think the ETH-PHY is very similar. You have just to set RxFilterCtrl, e.g. you have to enable: RxFilterEnWoL and AcceptBroadcastEn or AcceptPerfectEn (and if required AcceptUnicastEn, AcceptMulticastEn). This is working on my LPC very well. But the more strict magic pattern filter is not working!
Do you have an working example? I am very interested in!

For CRC calculation (32 bit) there is a pseudo code example in NXP specification UM10360 in chapter "10.19 CRC calculation" (Generation the FCS at the end of the Ethernet frame.).

Best regards
Jürgen
0 项奖励
回复