<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software SolutionsのトピックRe: How to handle write protection/errors in MSD in unified USBv2 stack?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-handle-write-protection-errors-in-MSD-in-unified-USBv2/m-p/600065#M16668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Coljia:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think current USB stack not supports this feature. You need to implement it by yourself.&lt;/P&gt;&lt;P&gt;I would suggest you check SCSI command spec which described detailed command transferred on USB bulk endpoints. KSDK USB stack implemented SCSI command protocol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The medium present and write protect information should be in the sense data which can be returned when you issue request sense command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2016 04:50:17 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2016-12-14T04:50:17Z</dc:date>
    <item>
      <title>How to handle write protection/errors in MSD in unified USBv2 stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-handle-write-protection-errors-in-MSD-in-unified-USBv2/m-p/600064#M16667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the usb_v2 stack in a MQX4.2-based project on K70 with a SD card slot. Let's say it's an USB card reader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to allow the USB host access to the SD card content in two different modes: Read-only for access to drivers and documentation of the product, and Read/Write for writing setup and parametrization data. But the MSD implementation in the stack seems to support only Read/Write and no error handling?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no possibility to communicate to the host whether there is a medium present at all and whether it is write-protected?? Everything in this regard is hardcoded. The TEST_UNIT_READY handler in msc_test_unit_ready_command() doesn't call any custom callback. The callback for WRITE doesn't check for any errors during the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any hints for me how to add such functionality or derivatives of the USB stack that already support it, I'd really appreciate it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Kolja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 09:35:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-handle-write-protection-errors-in-MSD-in-unified-USBv2/m-p/600064#M16667</guid>
      <dc:creator>kawk</dc:creator>
      <dc:date>2016-12-12T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle write protection/errors in MSD in unified USBv2 stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-handle-write-protection-errors-in-MSD-in-unified-USBv2/m-p/600065#M16668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Coljia:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think current USB stack not supports this feature. You need to implement it by yourself.&lt;/P&gt;&lt;P&gt;I would suggest you check SCSI command spec which described detailed command transferred on USB bulk endpoints. KSDK USB stack implemented SCSI command protocol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The medium present and write protect information should be in the sense data which can be returned when you issue request sense command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 04:50:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-handle-write-protection-errors-in-MSD-in-unified-USBv2/m-p/600065#M16668</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-12-14T04:50:17Z</dc:date>
    </item>
  </channel>
</rss>

