Other Parts Discussed in Thread: HALCOGEN
Tool/software:
During a test implementation of EMAC on the Hercules Development Kit, some errors occured when the RX data rate was near to the maximum speed.
Especially frames with minimum size at maximum speed bring the µC to stop frame reception completely. After some measurments, I figured out, that this behaviour is caused by the RX ISR which takes longer than there is time until the next frame arrives. For this reason, the µC is running out of buffer and setting the RX Header Descriptor Pointer to zero. As mentioned in the reference manual, the EOQ bit should indicate this. However, in my case, it seems, that sometimes the HDP gets zero without setting the EOQ bit. This results in the ISR not being executed anymore. Why don't we see the EOQ bit?
We partially solved the problem by testing whether the HDP is zero in the EMACReceive function. If the HDP is zero, we set it to the free_head pointer. Thus, the µC can recover after such an overload.
After doing this, a slightly different error occured: We reveice new frames and they trigger the ISR as expected. But for some reason, the OWNER bit is still set in the active_head frame.
My aim is not, to prevent package loss completely as this is impossible, but that the µC can recover from such overloads in every case.
With kind regards
Georg Hermann