This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to make MSC - Write Protect

Expert 2780 points
Hi
Use the Mass Storage Class(MSC) of the CSL, I'd like to realize a write-protected, but how can I get it?

Also, if in spite of being write-protected, the write request comes, how will the treatment may be carried out?

I have are using the CSL3.03.00.
 
 
regard
 
  • Hi,

    Your request is taken up and it would be addressed as soon as possible.

    Thanks & regards,

    Sivaraj K

  • Are you trying to write to an SD card which has the "LOCK" on? Which example are you using?

    Regards.

  • Hi Yes, I am attempting to write to what you LOCK the SD.

    I am sure in the next sample. > CSL_USB_MSC_dmaExample

    Regearts.

  • CSL USB MSC driver uses SCSI commands to exchange information with host. MODE SENSE command is used to inform the host that storage device is write protected.

    When the storage media is write-protected and host tries to write data, MSC driver should terminate write operation with error and update the mode sense data. USB host driver on receiving the error code for write operation requests MODE SENSE data and MSC driver should send the sense data with media write-protect information.

    You may refer to the switch case 'CSL_MSC_MEDIACCESS_WRITEPROTECT' in MSC_ExecuteWrite() of CSL MSC driver (csl_msc.c) for more details on handling write-protect case.

    - Pratap

  • As a result of the check sample program, writing is instructed from the host, even in the Write Protect, it has become a description that would be written as it is.

    The Write Protect Error because do not seem to be defined in the return value, but it has not been described that can return the Write Protect Error.

    We are going to check MODE SENSE is updated or by modifying this part.

    Regards