Teensy 4.1 ethernet "receiver not active" error

Status
Not open for further replies.

PhilK

Member
Hello, there is a bit of code inside the teensy41_ethernet.ino sketch which is:

if (!(ENET_RDAR & ENET_RDAR_RDAR)) {
print("receiver not active\n");
}


I have been finding that under various situations and environments, this message is sometimes thrown repeatedly, depending on the current ethernet traffic, etc. Does anyone know what exactly this message means, and what the "ENET_RDAR" and "ENET_RDAR_RDAR" flags imply? What conditions make this flag be raised? Are there some steps one must take to 'activate' the receiver?

Many thanks,
Phil
 
I have studied the problem a bit more, and suspect that it occurs under conditions where the Teensy is flooded with incoming packets right at the moment of startup. My working theory (perhaps entirely off-base) is that the Receive Ring gets instantly filled with incoming packets as soon as the Teensy powers up and once its MAC becomes enabled, but if the software side is busy for a few microseconds before handling those packets, the ring gets filled, ENET_RDAR becomes cleared, and then somehow the MAC never recovers from this state. It appears that once in this state, just emptying the packets from the ring is not enough to get it re-functioning as a receiver. Still studying...
 
Thank you!!! I will try that. If I can't always prevent the overflow, once the ring buffer is full, is there some special step I have to do to get it un-stuck and back into normal operation (do I have to set the ENET_RDAR register?)

Much Appreciated!
 
Thank you!!! I will try that. If I can't always prevent the overflow, once the ring buffer is full, is there some special step I have to do to get it un-stuck and back into normal operation (do I have to set the ENET_RDAR register?)

Much Appreciated!

check the T4 ref manual (41.6.3). you need to handle/consume the ring buffer and reset the buffer flag. Just writing RDAR clears it, ENET_RDAR = ENET_RDAR;

see FNET RDAR usage FNET/src/port/netif/fec/fnet_fec.c
 
Last edited:
Status
Not open for further replies.
Back
Top