2017-12-02 07:56 AM
I tried to use the FAT file system with a SD card and the SDIO protocol, but with the v1.18.00 of stm32Cube for F4 MCU's doesn't work correctly, I discovered the next issues.
1.- Inside of the FATFS configuration if the DMA tamplate is enable this module doesn't work
2.- BSP_SD_Init() isn't called nowhere endded I need to call manually after MX_FATFS_Init().
3.- DMA template is mandatory if FreeRTOS is enable.
Now, this issues didn't watch in the version v1.17.00 of
stm32Cube for F4. The same programe is funcional in this version but not in the v1.18.00.
Any idea regarding this topic? Is necessary to enable the DMA module to work with the protocol SDIO ?
Solved! Go to Solution.
2018-02-06 10:09 AM
I have been annoy by this problem for several days, and thank Roman very very much for that after i follow Roman's solution I fix my problem and the SD card with FATFS can work with dma in RTOS correctly.In addition, I think that the SD initialization code and queue creating code should add to the sd_diskio.c -> DSTATUS SD_initialize(BYTE lun), And the key is modify two function name:
void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsd)
a
nd
void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsd)
.
2018-02-12 10:08 AM
Need to fix again some parts also on 4.24 version:
Rename following functions:
From void BSP_SD_WriteCpltCallback(void) to void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsd)
From void BSP_SD_ReadCpltCallback(void) to void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsd)
2018-02-25 10:57 AM
Hello
st.mcu
I have tested with proposed configuration (CubeMX version (4.24) and last STM32CubeF4 package version (1.19)
). With fix proposed by Roman it works, but without it works only in configuration without DMA. When can we expect new update?)2018-02-26 01:52 AM
Hello,
The issue that is still being faced even with last STM32CubeMX version (4.24) will be reported internally again.
For those who look for a complete solution, please refer to guidelines suggested by
bardeenlai
inhttps://community.st.com/0D70X000006SsfnSAC
.-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-04-09 02:08 PM
Hello,
it is sufficient to remove the __weak in the bsp_driver_sd.h file for BSP_SD_ReadCpltCallback and BSP_SD_ReadCpltCallback. The good thing is that this is persistent even when updating the project with CubeMX. The __weak in the header file is a known problem for quite a few frameworks.
st.mcu
When will CubeMX be updated to fix this issue? I took me quite a while to figure it out;
found that thread just when I discovered the problem by myself ... really annyoing.
As this is described for F4 it, I had it with STM32L4R9I.Best regards
Steffen