<?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>USB Mass Storage Sample Application and external SPI NOR flash device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88332/usb-mass-storage-sample-application-and-external-spi-nor-flash-device</link><description>I&amp;#39;m working to implement a USB Mass Storage device which uses an external flash memory to store my application&amp;#39;s data. I have an nrf52833 DK and a W25Q64FV NOR flash memory. My work started from the USB Mass Storage sample in the NCS v1.9.1 (ncs\v1.9</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Jun 2022 08:12:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88332/usb-mass-storage-sample-application-and-external-spi-nor-flash-device" /><item><title>RE: USB Mass Storage Sample Application and external SPI NOR flash device</title><link>https://devzone.nordicsemi.com/thread/370354?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 08:12:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de8b4c69-d78e-4360-925d-9cbac089ab97</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Andrea&lt;/p&gt;
&lt;p&gt;It should be possible to use your SPI NOR device by using the &amp;quot;jedec,spi-nor&amp;quot; driver, like you do in your overlay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The circuitdojo_feather_nrf9160 board is doing something similar (see &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/4c5893f9683681bc7c63312a18a0f7af39a483ce/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_common.dts#L143"&gt;here&lt;/a&gt;), as it has a W25Q32JV flash device (should be comparable to the one you are using).&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/4c5893f9683681bc7c63312a18a0f7af39a483ce/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_common.dts#L143"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I was able to get the mass example to build by using your overlay, setting&amp;nbsp;&lt;span&gt;CONFIG_APP_MSC_STORAGE_FLASH_FATFS&lt;/span&gt;&lt;span&gt;=y in the project configuration file, and by removing the &amp;quot;if NORDIC_QSPI_NOR&amp;quot; and corresponding &amp;quot;endif&amp;quot; in the Kconfig file.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE configuration is not used by the SPI NOR driver, and you should be able to just remove this from the Kconfig file.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user=""]I asked and read on this forum about the flash memory support in the NCS and someone &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/88000/what-about-the-actual-flash-support-in-nrf-connect-sdk"&gt;responsed &lt;/a&gt;me that the NCS supports only QSPI NOR flash memory and not NAND.[/quote]
&lt;p&gt;&lt;span&gt;The QSPI interface in the nRF devices supports the NOR instruction set only, not the instructions used by NAND devices, and this is the main reason there is no support for NAND devices in NCS.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NAND devices require a more complex driver as&amp;nbsp;you can not access data as easily as for NOR devices, and you need algorithms for error correction since NAND devices are inherently less reliable.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Over SPI it is technically possible to access NAND devices (if the NAND device supports SPI), but you would need a driver for it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;br /&gt;Torbjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>