Skip to content
Snippets Groups Projects
Commit 88153dc5 authored by Damien George's avatar Damien George
Browse files

stmhal/sdcard: Fix initialisation of DMA TX so that writes work.

Addresses issue #2034.
parent cbbeb786
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment