STMicroelectronics / STM32CubeF4

STM32Cube MCU Full Package for the STM32F4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
824 stars 408 forks source link

STM32F4 STBITERR incorrectly handled #152

Closed keck9939 closed 7 months ago

keck9939 commented 1 year ago

In the file stm32f4xx_hal_sd.c, in the routine HAL_SD_ReadBlocks, if the flag SDIO_FLAG_STBITERR is set in the controller, the transfer will stop (assuming it ever really started), but the error is not correctly returned to the caller. There needs to be another else if down below the comment /* Get error state */ to handle this case. As it is, if a STBITERR occurs, the return value will be HAL_OK and the caller will think the routine completed successfully when in fact it failed. The same error also occurs in HAL_SD_WriteBlocks.

HBOSTM commented 1 year ago

ST Internal Reference: 146826

HBOSTM commented 1 year ago

Hello @keck9939 ,

Thank you for your contribution. This point has been reported to our development teams. I will get back to you as soon as I have any updates.

With Regards,

TOUNSTM commented 7 months ago

Hello @keck9939,

I hope you are fine. The issue you reported has been fixed in the frame of version v1.28.0 of the STM32CubeF4 published recently on GitHub. Thank you again for having reported.

With regards,