Skip to main content
Visitor II
May 18, 2021
Question

how can i configure the SD card as write protected on the board to be detected by PC through USB Device mode(MSC Mode)

  • May 18, 2021
  • 2 replies
  • 899 views

Hi,

I'm using STM32F469 CONTROLLER for my application.

I was able to configure the USB as mass storage device by interfacing in MSC Mode.

I am able to see the storage when connected to PC through USB.

But I want the storage to be write protected.

Can you help me in solving this issue.

    This topic has been closed for replies.

    2 replies

    Graduate II
    May 18, 2021

    It uses SCSI commands.

    The MODE SENSE/SELECT have a WP (Write Protect) bit, report this properly, the OS should adapt properly.

    Attempts to WRITE, FORMAT, etc should fail with a suitable SENSE CODE indicating that the media isn't writable.

    SNULUAuthor
    Visitor II
    May 19, 2021

    thank you for the response.

    I have tried doing the same, but not worked.

    Can you please let me know which function or structure to be modified clearly.