aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-01-31 10:15:11 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-01-31 10:15:11 +0000
commitc63901b6b6b80ea74e77a5c7865189505bd3909a (patch)
treee1d69d8f44fe29a6c19fb3016de72e47347f8179
parenteb9e20c1dcf32713d41d969c07d1e947ad3a40a4 (diff)
downloadChibiOS-c63901b6b6b80ea74e77a5c7865189505bd3909a.tar.gz
ChibiOS-c63901b6b6b80ea74e77a5c7865189505bd3909a.tar.bz2
ChibiOS-c63901b6b6b80ea74e77a5c7865189505bd3909a.zip
Fixed bug #815.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10075 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c6
-rw-r--r--readme.txt2
2 files changed, 8 insertions, 0 deletions
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 637871255..84b71ce5d 100644
--- a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c
+++ b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c
@@ -472,6 +472,9 @@ void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) {
STM32_TDES0_IC | STM32_TDES0_LS | STM32_TDES0_FS |
STM32_TDES0_TCH | STM32_TDES0_OWN;
+ /* Wait for the write to tdes0 to go through before resuming the DMA.*/
+ __DSB();
+
/* If the DMA engine is stalled then a restart request is issued.*/
if ((ETH->DMASR & ETH_DMASR_TPS) == ETH_DMASR_TPS_Suspended) {
ETH->DMASR = ETH_DMASR_TBUS;
@@ -550,6 +553,9 @@ void mac_lld_release_receive_descriptor(MACReceiveDescriptor *rdp) {
/* Give buffer back to the Ethernet DMA.*/
rdp->physdesc->rdes0 = STM32_RDES0_OWN;
+ /* Wait for the write to rdes0 to go through before resuming the DMA.*/
+ __DSB();
+
/* If the DMA engine is stalled then a restart request is issued.*/
if ((ETH->DMASR & ETH_DMASR_RPS) == ETH_DMASR_RPS_Suspended) {
ETH->DMASR = ETH_DMASR_RBUS;
diff --git a/readme.txt b/readme.txt
index f6eaffd28..13d4a94cc 100644
--- a/readme.txt
+++ b/readme.txt
@@ -159,6 +159,8 @@
- NIL: Added STM32F7 demo.
- HAL: Fixed STM32 OTGv1 driver not serving interrupts for endpoints > 5
(bug #816)(backported to 16.1.8).
+- HAL: Fixed STM32 MAC driver needs __DSB() for STM32F7 when operating in
+ SRAM1/2 (bug #815)(backported to 16.1.8).
- VAR: Fixed BYTE_ORDER redefined in lwip_bindings/arch/cc.h (bug #814)
(backported to 16.1.7).
- HAL: Fixed setting alternate mode in STM32 GPIOv3 and GPIOv3 drivers can fail