Closed jjhuff closed 6 years ago
Hmmm, may there is a missing destructor for for Ethernet class. Softreset set all registers back to the default values of the chip, so it makes only sense if you have done a configuration initialized with the .begin function. Is Hardreset a solution?
The case I run into:
So, the w5500 is configured, but the CPU isn't aware.
Yes, hardreset will be an option once we have our final hardware. The softreset is a fairly minor issue -- and I'm more or less ok with my hack.
On Arduino, I think the cpu reset causes also an hardware reset on the ethernetshield.
I'm currently using the Adafruit Feather boards. However, my custom board will have hardware reset. Is calling w5500.init() safe after begin? If not, maybe softreset can check if init has been called and call it?
begin calls w5500.int(), generally after a soft reset (have a look to the manual if it also for hardreset) you must call the begin() function to give the registers all the necessray infos. I have tested the procedure extensively but I can't find the code example. The function calls the MR register of the chip.
In few cases I've needed to call
softreset()
upon startup. Right now, I have to do something like:Not sure what the best solution is here. Maybe have
softreset
callw5500.init()
?