cancel
Showing results for 
Search instead for 
Did you mean: 

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

SNULU
Associate II

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.

2 REPLIES 2

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SNULU
Associate II

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.