Closed keck9939 closed 7 months ago
ST Internal Reference: 146826
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,
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,
In the file
stm32f4xx_hal_sd.c
, in the routineHAL_SD_ReadBlocks
, if the flagSDIO_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 anotherelse if
down below the comment/* Get error state */
to handle this case. As it is, if aSTBITERR
occurs, the return value will beHAL_OK
and the caller will think the routine completed successfully when in fact it failed. The same error also occurs inHAL_SD_WriteBlocks
.