Page 1 of 1
ENC28J60 lock ups
Posted: Sun Sep 25, 2016 5:52 pm
by Roy Johnston
I have a problem with this component,
it randomly locks up. I have proved it not to be the microchip (18F4550) a flashing series of leds has done this for me.
not even a watchdog time out sorts out the problem. I have to literally remove and apply the power.
can somebody help me to force a reset on this component, I have tried pulling down the reset pin this does not help.
is there any C instructions that I can send to the component to reset it.
any help will be appreciated.
Re: ENC28J60 lock ups
Posted: Mon Sep 26, 2016 12:15 pm
by Benj
Hi Roy,
Pulling the ENC28J60's reset pin low should be performing a hardware reset. If this is not working then it sounds like something else is going wrong.
Could the voltage be dipping causing a brown out? The ENC module requires a fair bit of current to function. The datasheet should state exactly how much is needed for reliable operation. Extra capacitance on the power rails may also help to supply the module when current usage is high.
As the hardware reset is not working it's unlikely you can do anything in software as a work around.
Could it maybe be an issue with a specific ENC module or have you replicated this problem on multiple modules?
Re: ENC28J60 lock ups
Posted: Mon Sep 26, 2016 7:24 pm
by Roy Johnston
Evening Ben,
I managed to sort it out.
the pcb board is my own design, it incorporates the Hanrun board onto my own pcb.
the PCB boards are mounted at boreholes up to 6 Km away from the PC, it uses outdoor Wi-Fi access points.
and here is the problem if comms is interrupted whilst sending or receiving data it locks up, this is a good possibility due to the circumstances.
to solve the problem I activated the watchdog, and the very first thing I do before initializing the component force the reset to low for 3 seconds then raise it high and finaly I initialize it. this worked to reset the component. however winsock had also locked up, so all I do is send a command instruction to clear the ARP table."netsh interface ip delete arpcache"
the above has resolved all my problems
I have attached a working copy of my MS Access VBA project as well as flowcode, in case any body else wants to learn how I did it.
Re: ENC28J60 lock ups
Posted: Tue Sep 27, 2016 5:35 pm
by Roy Johnston
Further feed back , I found the source of the lockups,
the whole system comprises of one PC, one switch, eight Nano power beams and 4 cards spread around a 1500 hectare farm.
the power beams are 100M , the pc is 1000M , the switch is auto, and the cads are 10m.
as soon as I slowed down the pc to 100M the lockups stopped.