2017-07-27 01:56 AM
Hi,
I use stm32f745 processor and SDMMC (SD 4 bits Wide bus ) at CubeMx. While sd card is writing data at every one minute, sometimes code is stopping at SD_FindSCR function in stm32f7xx_hal_sd.c library. This event is happening random.
Exactly, the place which code stopped at SD_FindSCR function,
while(!__HAL_SD_SDMMC_GET_FLAG(hsd, SDMMC_FLAG_RXOVERR | SDMMC_FLAG_DCRCFAIL | SDMMC_FLAG_DTIMEOUT | SDMMC_FLAG_DBCKEND))
{ if(__HAL_SD_SDMMC_GET_FLAG(hsd, SDMMC_FLAG_RXDAVL)) { *(tempscr + index) = SDMMC_ReadFIFO(hsd->Instance); index++; } }void SD_HAL_Init(void){
sdParameter.sdHandle.Instance = SDMMC1;
sdParameter.sdHandle.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; sdParameter.sdHandle.Init.ClockBypass = SDMMC_CLOCK_BYPASS_DISABLE; sdParameter.sdHandle.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; sdParameter.sdHandle.Init.BusWide = SDMMC_BUS_WIDE_1B; sdParameter.sdHandle.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; sdParameter.sdHandle.Init.ClockDiv = 0;}
How can I solution this problem at sd card?