<?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>External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57708/external-flash-with-usbd_msc-example</link><description>Dear All, 
 I need your help because I created a PCB with the nrf52840 and a flash connected exactly as the one on the dev-board. 
 The only difference is that the one on the dev-board is a 64Mb 80MHz and the new one is a 256Mb 120MHz (both NOR). 
 If</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Mar 2020 07:32:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57708/external-flash-with-usbd_msc-example" /><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/237320?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 07:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e31033dc-e3e5-4b6d-83a9-c40b22a9a95a</guid><dc:creator>ticinoluca</dc:creator><description>&lt;p&gt;Dear Simonr,&lt;/p&gt;
&lt;p&gt;I am trying to understand a bit better how the flash works.&lt;/p&gt;
&lt;p&gt;Therefore I have some questions:&lt;/p&gt;
&lt;p&gt;1) I see that inside the main I have to set the flash block size with the function&amp;nbsp;NRF_BLOCK_DEV_QSPI_CONFIG.&lt;/p&gt;
&lt;p&gt;The default size is 512 but how can I check that this size is also ok for my new flash memory?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2) The function&amp;nbsp;MSC_WORKBUFFER_SIZE is used to set the buffer size.&lt;/p&gt;
&lt;p&gt;The default size is 1024&amp;nbsp;&lt;span&gt;but how can I check that this size is also ok for my new flash memory?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3) I understood what id and size parameters means inside&amp;nbsp;static const nrf_serial_flash_params_t m_sflash_params[].&lt;/p&gt;
&lt;p&gt;Can you please explain what are the other parameters (.capabilities = 0x00,&amp;nbsp;.erase_size = 4 * 1024, and&amp;nbsp;.program_size = 256) and where I can find these information about my flash so that I can set them correctly?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Because I am using the flash memory to continuously save data.&lt;/p&gt;
&lt;p&gt;I create a new file every 5 minutes and every file is about 750kB (kilobytes).&lt;/p&gt;
&lt;p&gt;If I save data for 1 hour and 45 minutes it is all ok and by connecting the board to the PC I can see the memory that is almost half full (105 minutes means 21 files that is almost 16MB).&lt;/p&gt;
&lt;p&gt;But if I save data for 2 hours my PC can&amp;#39;t read the memory and asks only if I want to format it.&lt;/p&gt;
&lt;p&gt;I think that is because the parameters or initialization is not set correctly but I am not sure.&lt;/p&gt;
&lt;p&gt;Can you please help me?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Currently I am using the&amp;nbsp;&lt;span&gt;MX25L25673GZNI-08G flash model.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank youvery much.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/234169?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 12:29:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:860184d6-4aa8-4e49-a14b-454872b16c9f</guid><dc:creator>ticinoluca</dc:creator><description>&lt;p&gt;Dear Simon,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re right, I didn&amp;#39;t see that the flash memory was shown in Mega-Bits in the datasheet but I was watching inside it with windows that shows the memory in MegaBytes.&lt;/p&gt;
&lt;p&gt;Therefore my memory of 256Mb has to be correctly set with .size = 32*1024*1024 as for your first suggestion and windows shows it correctly as 32MB.&lt;/p&gt;
&lt;p&gt;I am sorry for the misunderstanding but I thought that I was watching at the same measure unit.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/234139?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 09:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c386359-4ff9-43cf-af57-4bf6fa56463e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;I think we might be confusing MB and Mb. I thought you meant Mega-bit (one eighth of a MegaByte) when writing Mb. So if your external flash is 256 MegaByte, you would have to set .size =256*1024*1024.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/234135?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 09:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe6efce7-b54a-4755-9c82-2c7b2264738c</guid><dc:creator>ticinoluca</dc:creator><description>&lt;p&gt;Dear Simon,&lt;/p&gt;
&lt;p&gt;Thank you very much for your reply.&lt;/p&gt;
&lt;p&gt;Unfortunately by writing 8*1024*1024 and opening the memory via USB I can see only 8MB free space (by right clicking on the U: disk and selecting proprities). And by putting 64*1024*1024 I can see 64Mb.&lt;/p&gt;
&lt;p&gt;How I have to do to see 256Mb free space inside the proprieties?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/234132?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 09:28:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e44c1ebe-9f97-4422-a32b-1edd8fadf0b1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The default size (8*1024*1024) is 64Mb, as the 8 represents Bytes in this context. So in order to modify this to fit a 256Mb, you&amp;#39;ll have to set .size = 32*1024*1024.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/234038?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 15:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de6750f2-20b8-497c-a335-a884a928f169</guid><dc:creator>ticinoluca</dc:creator><description>&lt;p&gt;Than you very much.&lt;/p&gt;
&lt;p&gt;In fact by simply changing the .read_id with the correct one I can see the memory content via USB.&lt;/p&gt;
&lt;p&gt;I still have a question.&lt;/p&gt;
&lt;p&gt;I have a 256Mb Flash but by changing the .size inside nrf_serial_flash_params.c I can reach up to 64Mb. (from .size = 8*1024*1024 to .size = 64*1024*1024),&lt;/p&gt;
&lt;p&gt;What is the correct modification to increase the size to the maximum 256Mb?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Flash with USBD_MSC example</title><link>https://devzone.nordicsemi.com/thread/234010?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 14:20:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c05602ef-caaf-4310-8e5e-3d7b654bb1fe</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think you&amp;#39;ll need to edit the parameters in nrf_serial_flash_params_t in the &lt;strong&gt;nrf_serial_flash_params.c&lt;/strong&gt; file to match your external flash.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>