2017-04-04 08:15 AM
Dear ST support team,
I found minor bug on CubeF7 v1.6.0.
Bug found at ./STM32Cube_FW_F7_V1.6.0/Projects/STM32746G-Discovery/Applications/USB_Device/MSC_Standalone/Src/usbd_storage.cdiff -urN b/usbd_storage.c a/usbd_storage.c
--- b/usbd_storage.c 2016-12-31 02:35:58 +0900
+++ a/usbd_storage.c 2017-04-04 23:57:44 +0900
@@ -124,7 +124,7 @@
{
BSP_SD_GetCardInfo(&info);
- *block_num = info.LogBlockNbr - 1;
+ *block_num = info.LogBlockNbr;
*block_size = info.LogBlockSize;
ret = 0;
}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
In STORAGE_GetCapacity(),it should return ''total sector number''.
Thus it is not suitable to return ''last sector address''(by info.LogBlockNbr - 1) here.
''Last sector address'' returns on SCSI_ReadCapacity10() or SCSI_ReadformatCapacity() in
./STM32Cube_FW_F7_V1.6.0/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.cI noticed this bug while evaluating industrial SDCard with S.M.A.R.T.
AFAIK,CubeF4 also have this bug(maybe other Cubes...). Please fix until next release.Best regards,
Nemui. #usb-msc2017-04-04 09:44 AM
Hi
Nemui.Trinomius
,Thank you for your reported issue. I will check this and report it internally if confirmed.
Regards
Imen
2018-09-21 12:51 AM
Hello,
This issue is confirmed on the project file MSC_Standalone/Src/usbd_storage.c, and it will be fixed in the coming releases of the CubeF7 firmware package.
With Regards,
Imen.