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 --- ...F769I-DISCOVERY (OpenOCD, Flash and Run).launch | 104 ++++++++++----------- os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c | 4 + 2 files changed, 56 insertions(+), 52 deletions(-) diff --git a/demos/STM32/RT-STM32F769I-DISCOVERY/debug/RT-STM32F769I-DISCOVERY (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F769I-DISCOVERY/debug/RT-STM32F769I-DISCOVERY (OpenOCD, Flash and Run).launch index 25e64adf8..dd530767a 100644 --- a/demos/STM32/RT-STM32F769I-DISCOVERY/debug/RT-STM32F769I-DISCOVERY (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F769I-DISCOVERY/debug/RT-STM32F769I-DISCOVERY (OpenOCD, Flash and Run).launch @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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