You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to a bug in ST's driver code that's still there today in the latest "cube" release. They managed to demonstrate an awareness of the issue by correctly declaring the CardCapacity member of the HAL_SD_CardInfoTypedef structure as a uint64_t. Unfortunately they don't understand that the width of the type being assigned to is not taken into account until after the calculation on the right-hand side is done, and that calculation is done at 32-bit width. Result: overflow on this line:
This is due to a bug in ST's driver code that's still there today in the latest "cube" release. They managed to demonstrate an awareness of the issue by correctly declaring the
CardCapacity
member of theHAL_SD_CardInfoTypedef
structure as auint64_t
. Unfortunately they don't understand that the width of the type being assigned to is not taken into account until after the calculation on the right-hand side is done, and that calculation is done at 32-bit width. Result: overflow on this line:The fix can be done in a few ways, here's the one I chose:
The text was updated successfully, but these errors were encountered: