Open aritec opened 4 months ago
Thanks for logging this and providing a helpful amount of detail. I can see how the timer wrap behaviour would cause this issue. We're currently updating the library over the next few weeks and will look into this. It will need some external counter to monitor time greater than the timer period.
It seems out other MAC implementations might have the same issue so glad you reported this.
Using lib_ethernet with RGMII interface causes random sending delays up to 21s. The reason for this is on the rgmii_10_100_master_tx_pins task:
ifg_time is calculated at the end of the last sent buffer. If there is a idle time between buffers for more than 21 seconds, the timerafter(ifg_time) adds another (up to 21 seconds) delay before handling the buffer! tmr is a 2^32 bit 100MHz counter but timerafter() can only handle delays up to 2^31 ticks. Longer delays are handelt after a "rollover" of 42 seconds.
See: https://www.xcore.com/viewtopic.php?t=8771