summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-11-15 14:39:32 +1100
committerDamien George <damien@micropython.org>2021-11-22 11:57:37 +1100
commitdfa75f33a5a2cb1737e5278f198d0dac0a5867eb (patch)
tree2abb0ad1066f152653742439c4483e71419a257e
parente83aa252f7c58db3d1a95b399c1bcdf791dcf819 (diff)
stm32/sdio: Don't explicitly disable DMA2 on deinit of SDIO.
Because DMA2 may be in use by other peripherals, eg SPI1. On PYBD-SF6 it's possible to trigger a bug in the existing code by turning on WLAN and connecting to an AP, pinging the IP address from a PC and running the following code on the PYBD: def spi_test(s): while 1: s.write('test') s.read(4) spi_test(machine.SPI(1,100000000)) This will eventually fail with `OSError: [Errno 110] ETIMEDOUT` because DMA2 was turned off by the CYW43 driver during the SPI1 transfer. This commit fixes the bug by removing the code that explicitly disables DMA2. Instead DMA2 will be automatically disabled after an inactivity timeout, see commit a96afae90f6e5d693173382561d06e583b0b5fa5 Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/stm32/sdio.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/ports/stm32/sdio.c b/ports/stm32/sdio.c
index 3fb84a4d8..bedafcb13 100644
--- a/ports/stm32/sdio.c
+++ b/ports/stm32/sdio.c
@@ -134,9 +134,6 @@ void sdio_init(uint32_t irq_pri) {
void sdio_deinit(void) {
SDMMC_CLK_DISABLE();
- #if defined(STM32F7)
- __HAL_RCC_DMA2_CLK_DISABLE();
- #endif
}
void sdio_reenable(void) {