<?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>nRF52840 SDK16 - USB MSC Example - What is happenning when the external flash memory get full?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70444/nrf52840-sdk16---usb-msc-example---what-is-happenning-when-the-external-flash-memory-get-full</link><description>Hi everyone, 
 I am using the nRF52840 DK and I am experimenting with the USB MSC example. My purpose is to record data from an IMU device and store them in files. Then to read the files and transmit the data over bluetooth to the central. 
 I have two</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Jan 2021 09:41:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70444/nrf52840-sdk16---usb-msc-example---what-is-happenning-when-the-external-flash-memory-get-full" /><item><title>RE: nRF52840 SDK16 - USB MSC Example - What is happenning when the external flash memory get full?</title><link>https://devzone.nordicsemi.com/thread/290419?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 09:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:186d0cb8-a2ce-4312-86bf-b9c0960e97d8</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;I&amp;#39;m happy I could help Nikos. Thanks for&amp;nbsp;sharing the documentation reference, that makes it pretty clear &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - USB MSC Example - What is happenning when the external flash memory get full?</title><link>https://devzone.nordicsemi.com/thread/289407?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 12:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:affac0b6-0c45-4e9a-b119-c35961be7ec5</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Thank you for your effort ovrebekk,&lt;/p&gt;
&lt;p&gt;Just for reference, I&amp;#39;ve just found that your procedure to check full disk also described &lt;a href="http://elm-chan.org/fsw/ff/doc/write.html"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - USB MSC Example - What is happenning when the external flash memory get full?</title><link>https://devzone.nordicsemi.com/thread/289398?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 12:07:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:311afa7e-370a-4f44-b6a7-6cc63f37d60d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nikos&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did some testing to see what would happen, and it seems you don&amp;#39;t get an error, but you will see that you are not able to write more bytes into the file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;UINT buffer_length = 64;
UINT bytes_written;
ff_result = f_write(&amp;amp;file, data_write_buffer, buffer_length, &amp;amp;bytes_written);
if(bytes_written &amp;lt; buffer_length || ff_result != FR_OK)
{
    NRF_LOG_ERROR(&amp;quot;File write error: bytes %i, result %i&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the f_write function reports less bytes written than you ask for it means there is no more room for data on the drive.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - USB MSC Example - What is happenning when the external flash memory get full?</title><link>https://devzone.nordicsemi.com/thread/289288?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 16:54:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:514a2201-27c8-47fe-9f53-c93b7a3cc2f5</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Hi ovrebekk and thank you for your responce,&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/70444/nrf52840-sdk16---usb-msc-example---what-is-happenning-when-the-external-flash-memory-get-full/289276#289276"]At some point you will not be able to&amp;nbsp;create any more to files, and the file interface will return an error.&amp;nbsp;[/quote]
&lt;p&gt;Do you know what error it will return? I have to handle this error&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - USB MSC Example - What is happenning when the external flash memory get full?</title><link>https://devzone.nordicsemi.com/thread/289276?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 15:47:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be028bb3-d747-42ff-9cf2-38ac32bc277e</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nick&lt;/p&gt;
&lt;p&gt;1. The fatfs file system library used in the USB MSC example uses fat32, which has a file size limit of 4GB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. At some point you will not be able to&amp;nbsp;create any more to files, and the file interface will return an error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>