sstaub / Ethernet3

Ethernet library for Arduino and Ethernetshield2 / WIZ550io / WIZ850io / USR-ES1 with Wiznet W5500 chip
Other
76 stars 34 forks source link

In wol mode, w5500 can't wake up after sending a magic packet #17

Closed lanzhihao closed 6 years ago

lanzhihao commented 6 years ago

with this library, I use

set IMR and MR register

digitalWrite(10, LOW); // send in the address and value via SPI: SPI.transfer((IMR & 0x00FF0000)>>16); SPI.transfer((IMR & 0x0000FF00)>> 8); SPI.transfer((IMR & 0x000000F8) + 4); SPI.transfer(0x10); // take the SS pin high to de-select the chip: digitalWrite(10, HIGH);

Ethernet.WoL(true);

after that , I send magic packet but w5500 doesn't wake up and INT is still high

sstaub commented 6 years ago

I don't know what you do before calling Ethernet.WoL(true), but I think you must call the function before Ethernet.begin(). I never tested it with a "Magic Packet"

lanzhihao commented 6 years ago

It is ok to realize that functionality.