<?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_msc example on a custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64400/usb_msc-example-on-a-custom-board</link><description>Hello, i would like to test usb_msc example on a custom board, and i have few questions: 
 - will this QSPI flash chip work with nRF52840 QSPI interface, and is it sufficient as a QSPI block device: Microchip SST26VF064B 
 - where in the code (i mean</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 01 Aug 2020 17:30:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64400/usb_msc-example-on-a-custom-board" /><item><title>RE: usb_msc example on a custom board</title><link>https://devzone.nordicsemi.com/thread/262660?ContentTypeID=1</link><pubDate>Sat, 01 Aug 2020 17:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4496fe8d-a7d6-4757-a701-5cc790e38e0b</guid><dc:creator>Shahar</dc:creator><description>&lt;p&gt;The QSPI module interface can&amp;#39;t be used as a normal SPI AFAIK, so I assume it is separate from the other SPI interfaces.&lt;/p&gt;
&lt;p&gt;But in any case, even if they shared a resource, the QSPI will only consume one SPI instance, as it uses 4 data lines, not 4 SPI instances.&lt;/p&gt;
&lt;p&gt;But a simple test can verify this for you. Take the Nordic USB MSC example and enable the 4 SPI master instances on various pins on the DevKit (you can use 3 pin SPI to save on GPIOs).&lt;/p&gt;
&lt;p&gt;You can actually use the LEDs GPIOs as the SPI Clock, they will give you a visual indication of outgoing SPI (just make sure to disable the BSP_LED init, so you can use the GPIOs)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: usb_msc example on a custom board</title><link>https://devzone.nordicsemi.com/thread/262641?ContentTypeID=1</link><pubDate>Sat, 01 Aug 2020 10:16:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b398b200-5b55-4446-be87-6ee50cf31ea1</guid><dc:creator>woytekm</dc:creator><description>&lt;p&gt;Thank you for comprehensive information Shahar, this should allow me to&amp;nbsp;test this chip with usb_msc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yet another question, maybe you will be able to answer, or maybe someone else will know the answer:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;-&amp;nbsp; nRF52840 data sheet says that it is able to do &amp;quot;up to 4x SPI master&amp;quot; - if i&amp;#39;m using QSPI flash, am i using all of these SPI master hardware up? In my project, i have more SPI chips, and i need to be able to interact with them using one of these four SPI masters.&lt;/p&gt;
&lt;p&gt;- if that is the case (QSPI is using all four SPI masters, and there is no SPI bus left for other peripherial chips), can i use usb_msc example in 1x SPI mode? If yes - how to adjust the code to achieve this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;W&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: usb_msc example on a custom board</title><link>https://devzone.nordicsemi.com/thread/262611?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 15:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdb83101-5338-484b-9721-57828de7dcc8</guid><dc:creator>Shahar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I had similar requirements on my project. Here&amp;#39;s how I approached it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;- QSPI&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll need couple of changes. First is to add support for this chip.&lt;/p&gt;
&lt;p&gt;Make a copy of your own for nrf_serial_flash_params.c - and add to the array of known flash chips, the required ID for your QSPI flash (with the relevant parameters)&lt;/p&gt;
&lt;p&gt;This is&amp;nbsp;a snippet of the relevant part from one of my projects:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static const nrf_serial_flash_params_t m_sflash_params[] = {

    // MXIC MX25R6435F
    {
        .read_id      = {0xC2, 0x28, 0x17},
        .capabilities = 0x00,
        .size         = 8 * 1024 * 1024,
        .erase_size   = 4 * 1024,
        .program_size = 256,
    },

    // Winbond W25Q128JV-IQ/JQ
    {
        .read_id      = {0xEF, 0x40, 0x18},
        .capabilities = 0x00,
        .size         = 16 * 1024 * 1024,
        .erase_size   = 4 * 1024,
        .program_size = 256,
    },

    // Winbond W25Q128JV-IM/JM
    {
        .read_id      = {0xEF, 0x70, 0x18},
        .capabilities = 0x00,
        .size         = 16 * 1024 * 1024,
        .erase_size   = 4 * 1024,
        .program_size = 256,
    },
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;as you can see I added support for the&amp;nbsp;Winbond ones. Look at the Datasheet of your chip, or simply put a breakpoint inside&amp;nbsp;nrf_serial_flash_params_get to see what the values are.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Make sure to include &lt;span style="text-decoration:underline;"&gt;only&lt;/span&gt; your modified&amp;nbsp;nrf_serial_flash_params.c file in your build.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;- Pins&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Look at sdk_config.h for the followings:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NRFX_QSPI_PIN_SCK
#define NRFX_QSPI_PIN_CSN
#define NRFX_QSPI_PIN_IO0
#define NRFX_QSPI_PIN_IO1
#define NRFX_QSPI_PIN_IO2
#define NRFX_QSPI_PIN_IO3&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;- Limit on GPIOs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Never had an issue with a specific GPIO I can remember ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>