<?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>Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41920/nor-memory-qspi-efficient-data-logging</link><description>Dear Nordic, 
 
 For my application I am now using a NOR memory with my nRF52840. 
 This memory needs the FAT file system as my device implements USB MSC and uses regular files. 
 
 My app needs to log data every second (about 20 bytes per write), and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jan 2019 14:05:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41920/nor-memory-qspi-efficient-data-logging" /><item><title>RE: Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/thread/166010?ContentTypeID=1</link><pubDate>Wed, 16 Jan 2019 14:05:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c2bc594-83f0-4380-ac7e-e479af6774c6</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hmm the&amp;nbsp;Page program time (256 bytes) is a maximum of 1800µs according to its datasheet.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;quot;The data that is saved is a copy of the data used by the program, which indeed is used in A LOT of floating point operations. But what would be the relation to the issue ?&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;-I&amp;#39;m just wondering if you&amp;#39;re including the data processing in your flash write routine.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Do you have a scope of the SPI lines?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/thread/165780?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 14:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8c165f0-81c3-4fdd-bd8e-d05f15e8b0cb</guid><dc:creator>vincent.golle</dc:creator><description>&lt;p&gt;The NOR chip is running at 4MHz (MT25QL128 from Micron) in a classic SPI mode (single data lines).&lt;/p&gt;
&lt;p&gt;The data that is saved is a copy of the data used by the program, which indeed is used in A LOT of floating point operations. But what would be the relation to the issue ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/thread/165745?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 13:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b093d755-6822-49e1-b0e5-9e1ea97de296</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;One source of QSPI write errors is not using lengths of 4 bytes (32-bit word alignment).&lt;br /&gt;&lt;br /&gt;121ms to write 120 floats seems a bit too long.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What&amp;#39;s your QSPI frequency?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Are you running single, dual, or quad data lines?&lt;/li&gt;
&lt;li&gt;What is the specified write speed of the NOR memory?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Are you running any floating point operations on your data?&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/thread/165601?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 21:52:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6259dc08-7a96-4594-a9d7-529d71090463</guid><dc:creator>vincent.golle</dc:creator><description>&lt;p&gt;Yes I do !&lt;/p&gt;
&lt;p&gt;I have a fixed size&amp;nbsp;struct array that I use to store data (in a floating point format).&lt;/p&gt;
&lt;p&gt;One&amp;nbsp;struct contains 6 floating points values.&lt;/p&gt;
&lt;p&gt;This buffer is printed to the file as soon as it is full&amp;nbsp;(using snprintf followed by a f_write).&lt;/p&gt;
&lt;p&gt;With my current QSPI flash parameters I measured:&lt;/p&gt;
&lt;p&gt;73ms for the write of a buffer of size 1 (i.e. 6 floats)&lt;/p&gt;
&lt;p&gt;121ms&amp;nbsp;&lt;span&gt;for the write of a buffer of size&amp;nbsp;20 (i.e.&amp;nbsp;120 floats)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I currently append the data as a newline at the end of the file. I also noticed that this operation can crash my system...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I currently have not implemented anything to check the available space on the memory before writing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;for (size_t i=0; i&amp;lt; nb_pos; i++) {
		// print histo
		int to_wr = snprintf(g_bufferWrite, sizeof(g_bufferWrite), &amp;quot;%f;%f;%f;%lu;%d\r\n&amp;quot;,
				att[i].loc.lat, att[i].loc.lon,
				att[i].loc.alt, att[i].date.secj,
				att[i].pwr);

		if (to_wr &amp;gt; 0 &amp;amp;&amp;amp; to_wr &amp;lt; (int)sizeof(g_bufferWrite)) {
			f_write(&amp;amp;g_fileObject, g_bufferWrite, to_wr, NULL);
		} else {
			APP_ERROR_CHECK(0x2);
		}

		perform_system_tasks();
		//yield();
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/thread/163709?ContentTypeID=1</link><pubDate>Thu, 03 Jan 2019 11:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:449d93ac-cfa4-469d-b1fa-9b0fd0c883f0</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;&amp;quot;&lt;span&gt;I have noticed that using a file in append mode in the NOR memory takes (very) long processing times... and can also crash the system !&amp;quot;&lt;br /&gt;&lt;br /&gt;Do you have any more information to share on this issue?&lt;br /&gt;&lt;br /&gt;Are you buffering any of the data before writing it to the memory chip?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nor memory QSPI efficient data logging</title><link>https://devzone.nordicsemi.com/thread/163154?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 10:26:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd1845e3-c4a4-4f53-8b54-88fcaf98b52b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Dear customer,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Due to limited staff during the holiday period, we unfortunately can&amp;#39;t&amp;nbsp;handle your case before we get back to the&lt;span&gt;&amp;nbsp;&lt;/span&gt;normal&lt;span&gt;&amp;nbsp;&lt;/span&gt;staff by the first week of January 2019. We are sorry indeed for the delay. We wish you a great holiday and a Happy New Year 2019.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Nordic&lt;span&gt;&amp;nbsp;&lt;/span&gt;Tech&lt;span&gt;&amp;nbsp;&lt;/span&gt;Support&lt;span&gt;&amp;nbsp;&lt;/span&gt;Team&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>