Closed fjpanag closed 1 year ago
@fjpanag maybe there could be some more graceful recover from this supposed issue. It is strange because there are people using Ethernet on STM32F407 with NuttX for years without facing these issues you are facing.
Look that ethernet_watchdog function: https://lists.gnu.org/archive/html/lwip-users/2012-09/msg00053.html basically it just resume the DMA operation when some issue is reported on DMASR. Please test this approach, maybe it could solve your issue.
While browsing the STM32F4 reference manual, I noticed this note in page 1166:
I checked the Ethernet driver, these errors are checked here.
However, there is no error handling at all!
The check is enabled only when
CONFIG_DEBUG_NET
is enabled, and only does some logging.This is not very good, and it can be related to a bug that I experience occasionally (the MAC dies completely).
I am thinking that the best course of action would be to cause an
ifdown
.Higher layers of the software will be able to detect this, and request a new
ifup
, effectively resetting the interface. Similar handling to simply disconnecting the cable, for example.How can the low-level driver cause such an event (without compromising the OS architecture)?
Or is there any suggestion of better handling this?