I faced a problem while building a UI application using the ChibiOS/GFX library, whenever I used the touchscreen [the TSC IC is connected on SPI1], I couldn't read from the SD Card as long as the touch screen was on. The application was freezing randomly, and while debugging, I found that FS_DISK_ERR was occurring. As long as I was not using the touchscreen, I could read from the SD card fine.
I later traced the problem to both the SPI1_TX and SDIO sharing the same DMA stream STM32_DMA_STREAM_ID(2, 3).
The issue was resolved, in my case, by changing in sdc_lld.h:
Code: Select all
#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)to
Code: Select all
#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)Regards
Abhishek