<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52271/sdk-15-3-usb-msc-can-not-modify-file-in-pc</link><description>Hi. 
 I use SDK15.3 (PCA10056 NRF52840) USB MSC example. 
 
 i can enumerate disk, creat file and delete file. but i can not edit file. 
 When I edited the file, re-plugged the USB and opened the file I just edited again. pc display file does not exist</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Sep 2019 09:50:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52271/sdk-15-3-usb-msc-can-not-modify-file-in-pc" /><item><title>RE: SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/thread/210664?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 09:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35f94d6f-dcff-4820-b773-89c3d1a15c84</guid><dc:creator>pyh0603</dc:creator><description>&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have add&amp;nbsp;this code at the beggining of block_dev_qspi_uninit:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4861.1111.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;as a result.&amp;nbsp;&amp;nbsp;Disk initialization success. the log as follow:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.000,000] &amp;lt;info&amp;gt; app: Initializing disk 0 (QSPI)...
[00:00:00.000,000] &amp;lt;info&amp;gt; qspi: Init
[00:00:00.000,000] &amp;lt;info&amp;gt; app: Mounting volume...
[00:00:00.000,000] &amp;lt;info&amp;gt; app: 
Listing directory: /
   &amp;lt;DIR&amp;gt;   SYSTEM~1
        0  000041C6.TXT
        5  123.TXT
[00:00:00.000,000] &amp;lt;info&amp;gt; app: Entries count: 4
[00:00:00.000,000] &amp;lt;info&amp;gt; app: Creating random file: 000041c6.txt ...
[00:00:00.000,000] &amp;lt;info&amp;gt; app: done
[00:00:00.000,000] &amp;lt;info&amp;gt; app: USBD MSC example started.
[00:00:00.000,000] &amp;lt;info&amp;gt; app: USB power detected
[00:00:00.000,000] &amp;lt;info&amp;gt; app: Un-initializing disk 0 (QSPI)...
[00:00:00.000,000] &amp;lt;info&amp;gt; qspi: IOCtl: Cache flush
[00:00:00.000,000] &amp;lt;info&amp;gt; qspi: Uninit
[00:00:00.000,000] &amp;lt;info&amp;gt; app: USB ready
[00:00:00.000,000] &amp;lt;info&amp;gt; qspi: Init
[00:00:00.000,000] &amp;lt;info&amp;gt; qspi: IOCtl: Cache flush
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: IOCtl: Cache flush
[00:00:00.009,063] &amp;lt;info&amp;gt; app: USB power removed
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: Uninit
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: Uninit wait_for_idle
[00:00:00.009,063] &amp;lt;info&amp;gt; app: Initializing disk 0 (QSPI)...
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: Init
[00:00:00.009,063] &amp;lt;info&amp;gt; app: Mounting volume...
[00:00:00.009,063] &amp;lt;info&amp;gt; app: USB power detected
[00:00:00.009,063] &amp;lt;info&amp;gt; app: Un-initializing disk 0 (QSPI)...
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: IOCtl: Cache flush
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: Uninit
[00:00:00.009,063] &amp;lt;info&amp;gt; app: USB ready
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: Init
[00:00:00.009,063] &amp;lt;info&amp;gt; qspi: IOCtl: Cache flush
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but, When I re-plugged the USB and viewed the edited file, the file could not be viewed on the PC again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;picture like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2222.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;wait for reply. thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/thread/210632?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 08:38:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a38677e3-3211-4e53-aad2-31bb25645da2</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello again,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve been testing and digging more into this. It seems that this a known bug which has been reported internally. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/36654/usbd_msd-disk-initialization-fails-in-usb-unplug-with-sdk15-0"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you connect to your board via a terminal, you will get the output of the example similar to this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.000,000] &amp;lt;info&amp;gt; app: Initializing disk 0 (QSPI)...

[00:00:00.000,000] &amp;lt;info&amp;gt; app: Mounting volume...

[00:00:00.000,000] &amp;lt;info&amp;gt; app: 

Listing directory: /

        0  000041C6.TXT

Entries count: 2

Creating random file: 000041c6.txt ...done

[00:00:00.000,000] &amp;lt;info&amp;gt; app: USBD MSC example started.

Creating random file: 0000167e.txt ...done

[00:00:00.000,000] &amp;lt;info&amp;gt; app: 

Listing directory: /

        0  000041C6.TXT

        0  0000167E.TXT

Entries count: 3

[00:00:00.000,000] &amp;lt;info&amp;gt; app: USB power detected

[00:00:00.000,000] &amp;lt;info&amp;gt; app: Un-initializing disk 0 (QSPI)...

[00:00:00.000,000] &amp;lt;info&amp;gt; app: USB ready

[00:00:00.039,581] &amp;lt;info&amp;gt; app: USB power removed

[00:00:00.039,581] &amp;lt;info&amp;gt; app: Initializing disk 0 (QSPI)...

[00:00:00.039,581] &amp;lt;error&amp;gt; app: Disk initialization failed.

[00:00:00.039,581] &amp;lt;info&amp;gt; app: USB power detected

[00:00:00.039,581] &amp;lt;info&amp;gt; app: Un-initializing disk 0 (QSPI)...

[00:00:00.039,581] &amp;lt;info&amp;gt; app: USB ready

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The issue&amp;nbsp;is&amp;nbsp;connected to the error &amp;quot;Disk initialization failed&amp;quot;. Not sure when to expect a fix. I have asked the responsible team and will get back to you.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/thread/210574?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 02:39:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5261e0c7-fd2a-4238-8dd2-144d9d3cc756</guid><dc:creator>pyh0603</dc:creator><description>&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;i&amp;nbsp;&amp;nbsp;&lt;span&gt;puts the data to the extern flash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/WeChat-Screenshot_5F00_20190919103824.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Looking forward to further reply. thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/thread/210573?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 02:36:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15e30cb4-27b1-426f-a01e-92c2f63ada3a</guid><dc:creator>pyh0603</dc:creator><description>&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;i do not get any error message when i running the example.&amp;nbsp; and three buttons function normally.&lt;/p&gt;
&lt;p&gt;my&amp;nbsp; question is &lt;span&gt;similar&lt;/span&gt; to&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37634/fatfs-fa_open_append-destroy-first-file-content/145235#145235"&gt;[FATFS] FA_OPEN_APPEND destroy first file content&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have modified the bug as prompted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, after I modified the file, I still can&amp;#39;t read the file normally after re-plugging the USB.&lt;/p&gt;
&lt;p&gt;wait for reply. thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/thread/210406?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 12:40:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdbe0d6d-df27-4308-8c2e-6d356a744f87</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Looks like you used the example that just puts the data in the controller&amp;#39;s RAM (G: is only 170KB).&lt;/p&gt;
&lt;p&gt;This will of course vanish when the power is turned off (or the MCU was otherwise reset).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3 USB MSC can not modify file in pc.</title><link>https://devzone.nordicsemi.com/thread/210393?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 12:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08e4ac5f-0ba8-4179-b455-9c5b55e03831</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The USB MSC example should work &amp;quot;out of the box&amp;quot;. Have you tried to debug while running the example? Are you getting any type of error message?&amp;nbsp;&lt;br /&gt;What happens when you press any of the following (from the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/usbd_msc_example.html"&gt;USB MSC example docs&lt;/a&gt;)?&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Button 1 creates a randomly named file in the root directory.&lt;/li&gt;
&lt;li&gt;Button 2 lists the root directory.&lt;/li&gt;
&lt;li&gt;Button 3 creates a file system (equivalent of the format command).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>