USB MSC recognized under windows but not on mac and android
Hi
I have a sensor board with USB MSC and an EMMC memory chip. Under windows every thing works fine but not under MAC or Android.
I am using FATFS and format the card with fomat option = #define FM_ANY 0x07.
Does any one have a clue what is going wrong?
I assume I have wrong settings:
I need to make the card read only for Windows/mac/android, but read/write from STM32 firmware.
So in ffconf.h I write:
#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
And in usbd_storage_if.c I write.
int8_t STORAGE_IsWriteProtected_HS(uint8_t lun)
{
/* USER CODE BEGIN 12 */
return (USBD_FAIL);
/* USER CODE END 12 */
}
This fine with windows but not with mac/android.
My card is detected (and works fine) on all platform when it is not write protected. Probably I dont know how to implement write protection.
Actually this post suggests to set a write protect bit in uint8_t Mode_Sense10_data[]. But it doesnt work for me either.
Thx
