cancel
Showing results for 
Search instead for 
Did you mean: 

HAL bug hanging when an error occurs

Osto
Senior
Posted on September 18, 2015 at 19:36

Hi,

There is a bug in function SD_CmdResp1Error. Whe using FatFS with SDIO, when mount fails but the f_open is called, the system hangs in following function:

static HAL_SD_ErrorTypedef SD_CmdResp1Error(SD_HandleTypeDef *hsd, uint8_t SD_CMD)

{

  HAL_SD_ErrorTypedef errorstate = SD_OK;

  uint32_t response_r1;

 

  while(!__HAL_SD_SDIO_GET_FLAG(hsd, SDIO_FLAG_CCRCFAIL | SDIO_FLAG_CMDREND | SDIO_FLAG_CTIMEOUT))

  {

  }

 

  if(__HAL_SD_SDIO_GET_FLAG(hsd, SDIO_FLAG_CTIMEOUT))

.......................

The system hangs in while loop and come never out of it (only after reset). I dont know the exact reason but this HAL-Code seems to be forgotten to write.

Osto
0 REPLIES 0