The underlying capacity via GET CAPACITY type query, for file system you'd have to navigate the structure and find free space. FATFS provided for a method to get used/free space.
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Is there an example? In the libraries in my code I have found USBH_MSC_SCSI_ReadCapacity(), but I didn't managed to make it work.
I initialized USB with MX_USB_HOST_Init() and in the while(1) loop I use MX_USB_HOST_Process(). But I see that in the libraries the function USBH_MSC_SCSI_ReadCapacity() is called inside USBH_StatusTypeDef USBH_MSC_Process(USBH_HandleTypeDef *phost)
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.