USB Mass storage class

HI,

I am trying to write some local files on internal FAT on spi flash - which works.

now i will enable_usb_device_next()   (like the MSC example -- using the next usb stack)

But i want the fat fs to be mounted as Read only

i have tried some flags (FS_MOUNT_FLAG_READ_ONLY | FS_MOUNT_FLAG_NO_FORMAT)

before enable_usb_device_next() - but it does not work.

So i wonder if there is no support for a read only usb mass storage device on?

 

Parents Reply Children
  • Probably not, I don't see support for read only disks in the usb_next stack from 2.9.1 SDK.YMMV for other SDK versions.

    You needed to change stuff in the mode sense(6) or mode sense(10) command response when the medium is supposed to be read only.

    There also were programs that flat out ignored those magic bits and called the write commands directly. The SD Formatter tool (from sdcard.org) was one of the examples, but I have not tested recent versions at all.

Related