From b49a2f34fda633f90cffaecdc487e4e6c64b9058 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 27 Oct 2018 07:14:04 +0000 Subject: Added a check into the MAC driver to optionally disable TX FIFO flushing. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12391 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'os/hal/ports/STM32/LLD/MACv1') diff --git a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c index 820f93263..505951f43 100644 --- a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c +++ b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c @@ -364,10 +364,14 @@ void mac_lld_start(MACDriver *macp) { /* DMA general settings.*/ ETH->DMABMR = ETH_DMABMR_AAB | ETH_DMABMR_RDP_1Beat | ETH_DMABMR_PBL_1Beat; + /* Check because errata on some devices. There should be no need to + disable flushing because the TXFIFO should be empty on macStart().*/ +#if !defined(STM32_MAC_DISABLE_TX_FLUSH) /* Transmit FIFO flush.*/ ETH->DMAOMR = ETH_DMAOMR_FTF; while (ETH->DMAOMR & ETH_DMAOMR_FTF) ; +#endif /* DMA final configuration and start.*/ ETH->DMAOMR = ETH_DMAOMR_DTCEFD | ETH_DMAOMR_RSF | ETH_DMAOMR_TSF | -- cgit v1.2.3