Harold Hallikainen
2017-09-23 18:57:49 UTC
In the Microchip Library for Applications ENCX24J600.c, there is the
following code:
// Validate the data returned from the ENC624J600 Family device. Random
// data corruption, such as if a single SPI/PSP bit error occurs while
// communicating or a momentary power glitch could cause this to occur
// in rare circumstances. Also, certain hardware bugs such as violations
// of the absolute maximum electrical specs can cause this. For example,
// if an MCU with a high slew rate were to access the interface, parasitic
// inductance in the traces could cause excessive voltage undershoot.
// If the voltage goes too far below ground, the ENCx24J600's internal
// ESD structure may activate and disrupt the communication. To prevent
// this, ensure that you have a clean board layout and consider adding
// resistors in series with the MCU output pins to limit the slew rate
// of signals going to the ENCx24J600. 100 Ohm resistors is a good value
// to start testing with.
if(header.NextPacketPointer > RXSTOP ||
((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0 ||
header.StatusVector.bits.Zero || header.StatusVector.bits.ZeroH ||
header.StatusVector.bits.CRCError ||
header.StatusVector.bits.ByteCount > 1522u ||
!header.StatusVector.bits.ReceiveOk)
{
Reset();
}
In several products using both parallel and SPI interfaces to the ECN,
I've found that this condition occurs causing a system reset when the
network is very busy. Some of these products are on very small PCBs where
I do not believe overshoot or undershoot is an issue. What I'd like is a
graceful way of recovering from this condition without rebooting the
system. I don't really know which of the ORd conditions is causing the
reset. Is there a way of recovering without resetting the system, maybe
without even breaking an existing TCP connection?
Thanks!
Harold
following code:
// Validate the data returned from the ENC624J600 Family device. Random
// data corruption, such as if a single SPI/PSP bit error occurs while
// communicating or a momentary power glitch could cause this to occur
// in rare circumstances. Also, certain hardware bugs such as violations
// of the absolute maximum electrical specs can cause this. For example,
// if an MCU with a high slew rate were to access the interface, parasitic
// inductance in the traces could cause excessive voltage undershoot.
// If the voltage goes too far below ground, the ENCx24J600's internal
// ESD structure may activate and disrupt the communication. To prevent
// this, ensure that you have a clean board layout and consider adding
// resistors in series with the MCU output pins to limit the slew rate
// of signals going to the ENCx24J600. 100 Ohm resistors is a good value
// to start testing with.
if(header.NextPacketPointer > RXSTOP ||
((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0 ||
header.StatusVector.bits.Zero || header.StatusVector.bits.ZeroH ||
header.StatusVector.bits.CRCError ||
header.StatusVector.bits.ByteCount > 1522u ||
!header.StatusVector.bits.ReceiveOk)
{
Reset();
}
In several products using both parallel and SPI interfaces to the ECN,
I've found that this condition occurs causing a system reset when the
network is very busy. Some of these products are on very small PCBs where
I do not believe overshoot or undershoot is an issue. What I'd like is a
graceful way of recovering from this condition without rebooting the
system. I don't really know which of the ORd conditions is causing the
reset. Is there a way of recovering without resetting the system, maybe
without even breaking an existing TCP connection?
Thanks!
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist