OpenSprinkler Forums Hardware Questions OpenSprinkler Controller lockups / crashes with wired Ethernet module Reply To: Controller lockups / crashes with wired Ethernet module

#70356

Water_my_lawn
Participant

Well my hang condition went away for no known reason. I was able
to capture one hang with my debug code and have the data from the hang.

When hung this is the state of the registers that I am logging:
EIR 0x09 TXIF (transmit done), RXERIF (receive aborted, buffer overrun)
ESTAT 0x41 BUFER (read or write buffer error), CLKRDY (clock is OK)
ECON1 0x04 RXEN (receive enable)

At this stage the recovery counter (n_reinits) is at 3. This means that
a hang condition has been detected and the recovery code has executed
3 times but the Ethernet interface is still hung. This recovery code
is not in the standard release code. Ray has it turned off.

I turned the debug flag on which enabled the recovery code. I have
added some additional logging code to further try to understand why
the recovery process does not work. Otherwise this debug version
is identical to the latest release of Ray’s firmware: 2.1.9 (7).

I have attached a firmware binary with the additional debug logging.
If anyone is experiencing the same hang with a hardwired Ethernet
connection using the ENC28J60 module I ask that you would give my
firmware a try and report back what is says.

The debug code prints two lines on the OLED display. One line
appears above the standard messages and the other line appears
below the standard messages.

The top line is formatted as such:
XX|XX|XX|XX
The XX is the value in the EIR register, the ESTAT register,
the ECON1 register, and the recovery counter.

The bottom line is formatted as such:
XX|XX|XX XX|XX|XX
The EIR register, ESTAT register, ECON1 register, the EIR register,
ESTAT register, ECON1 register.
The apparent duplication is because the registers are read two
times at different places in the code.

If I could get all of this information after a Ethernet hang
it would help me figure out this very elusive bug.

Thanks.

Attachments: