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
  • Hello,

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

    I have not tested this. 

    before enable_usb_device_next() - but it does not work.

    How does it not work? Does it build? Does some API return an error? Or are you still able to write to it?

    Best regards,

    Edvin

  • local i can update file on fat from zephyr - when i "enable_usb_device_next()" and cable connected to my labtop (usb host) -

    a drive can be seen i can write and files from PC - so in general MSC do work.

    But i do NOT want the PC the write files to FAT drive. - what should i do to achieve this -

    i hope there is a setting so the whole fat dist can be set as  read only on runtime - any guidance will be very helpfull.

Reply
  • local i can update file on fat from zephyr - when i "enable_usb_device_next()" and cable connected to my labtop (usb host) -

    a drive can be seen i can write and files from PC - so in general MSC do work.

    But i do NOT want the PC the write files to FAT drive. - what should i do to achieve this -

    i hope there is a setting so the whole fat dist can be set as  read only on runtime - any guidance will be very helpfull.

Children
No Data
Related