summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/sdcard.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-06 10:53:25 +0100
committerDamien George <damien.p.george@gmail.com>2016-05-06 10:53:25 +0100
commit88153dc56a03938473fca8c0de46535f8ae3109b (patch)
tree4f2d8ca8f55232c968ce37cc4fd0dbb80acc4e30 /stmhal/sdcard.c
parentcbbeb786d74ef28b60233ac818112fbeb64bf86d (diff)
downloadmicropython-88153dc56a03938473fca8c0de46535f8ae3109b.tar.gz
micropython-88153dc56a03938473fca8c0de46535f8ae3109b.zip
stmhal/sdcard: Fix initialisation of DMA TX so that writes work.
Addresses issue #2034.
Diffstat (limited to 'stmhal/sdcard.c')
-rw-r--r--stmhal/sdcard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/sdcard.c b/stmhal/sdcard.c
index 88969413b2..ae98c328af 100644
--- a/stmhal/sdcard.c
+++ b/stmhal/sdcard.c
@@ -244,8 +244,8 @@ mp_uint_t sdcard_write_blocks(const uint8_t *src, uint32_t block_num, uint32_t n
if (query_irq() == IRQ_STATE_ENABLED) {
// we must disable USB irqs to prevent MSC contention with SD card
uint32_t basepri = raise_irq_pri(IRQ_PRI_OTG_FS);
-\
- dma_init(&sd_rx_dma, &dma_SDIO_0_TX, &sd_handle);
+
+ dma_init(&sd_tx_dma, &dma_SDIO_0_TX, &sd_handle);
sd_handle.hdmatx = &sd_tx_dma;
err = HAL_SD_WriteBlocks_BlockNumber_DMA(&sd_handle, (uint32_t*)src, block_num, SDCARD_BLOCK_SIZE, num_blocks);