<?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>QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50534/qspi-block-device-issue-with-s25fs-flash-part</link><description>I am trying to modify the nrf_block_dev_qspi.c to work with S25FS256 flash part in our project. However, i am facing issues. When trying to understand the code I see some things that I don&amp;#39;t quite understand. 
 
 In the above snippet of code, &amp;quot;p_work</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Oct 2022 06:19:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50534/qspi-block-device-issue-with-s25fs-flash-part" /><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/389110?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 06:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c02cdf9-8f8b-4b69-817f-9a8561b3ae3c</guid><dc:creator>bartoszmichalak19</dc:creator><description>&lt;p&gt;I am reproducing simmilar problems on nrf52840 devkit (PCA10056) with qspi memory&amp;nbsp;&lt;span&gt;MX25R6435F. The result is that if I write something(block size=256)&amp;nbsp; to 16 block and then write something to 17 block the previous one(16 block) is corrupted (full of zeros). I dont reproduce this behavior on any of other blocks (I checked almost all flash memory space). The solution you proposed seems to fix this issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;bypassing unnecessary write when&amp;nbsp;&lt;/span&gt;&lt;b&gt;erase_unit_dirty_blocks&lt;/b&gt;&lt;span&gt;&amp;nbsp;is zero, the IRQ should reload&amp;nbsp;&lt;/span&gt;&lt;b&gt;erase_unit_idx&lt;/b&gt;&lt;span&gt;&amp;nbsp;with the correct value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please replace your qspi_block dev driver file with the below&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am using sdk 15.3.0. As I see the most important diff from your solution is in&amp;nbsp;block_dev_qspi_write_start function (the rest are additional asserts).&amp;nbsp; I checked that any of further SDK versions does not contain this fix. My question is if you already fixed this issue in futher SDK&amp;#39;s &amp;gt;15.3 ? If yes could you point me how? I am wondering whether fix you proposed 3 years ago is final solution or I should upgrade something else in my sdk version?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/236164?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 08:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e286b90-3975-484c-bafd-162f3967f6a7</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;Yesterday I tried the solutions suggested by the links and everything worked out.&lt;/p&gt;
&lt;p&gt;In addition, I would like to suggest the following change to the file nrf_block_dev_qspi.c.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ret_code_t block_dev_qspi_init(nrf_block_dev_t const * p_blk_dev,
                                      nrf_block_dev_ev_handler ev_handler,
                                      void const * p_context)
{
    ...
    // Enable 32bit address mode if need
    #if QSPI_CONFIG_ADDRMODE == 1
        #if QSPI_FLASH_USE_EN4B_CMD == 1
            // in sdk_config or another place
            #define QSPI_STD_CMD_EN4B  0xB7 // for example for mx66u2g45g
    
            nrf_qspi_cinstr_conf_t cinstr_cfg = {
                    .opcode    = QSPI_STD_CMD_EN4B,
                    .length    = NRF_QSPI_CINSTR_LEN_1B,
                    .io2_level = true,
                    .io3_level = true,
                    .wipwait   = true,
                    .wren      = true
            };
            
            uint32_t err_code = nrf_drv_qspi_cinstr_xfer(&amp;amp;cinstr_cfg, NULL, NULL);
            APP_ERROR_CHECK(err_code);
        #endif
    #endif
    
     /* Get 3 byte identification value */
    uint8_t rdid_buf[3] = {0, 0, 0};
    cinstr_cfg.opcode = QSPI_STD_CMD_READ_ID;
    cinstr_cfg.length = NRF_QSPI_CINSTR_LEN_4B;
    ret = nrf_drv_qspi_cinstr_xfer(&amp;amp;cinstr_cfg, NULL, rdid_buf);
    if (ret != NRF_SUCCESS)
    {
        NRF_LOG_INST_ERROR(p_qspi_dev-&amp;gt;p_log, &amp;quot;QSPI get 3 byte id error: %&amp;quot;PRIu32&amp;quot;&amp;quot;, ret);
        return ret;
    }
    ...
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The universality of the driver is preserved, but it is becoming more flexible. Now the developer can specify the instructions for switching to 32-bit mode, if necessary.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Nordic team,&lt;/strong&gt; when to expect the correct driver version with unchecked changes:&lt;/p&gt;
&lt;p&gt;/ * Bypass write .... * / ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/235779?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 16:11:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2413b02c-5083-494f-82cb-965df89e7e81</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;This seems related to&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/56928/qspi-32bit-addressing-mode"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/56928/qspi-32bit-addressing-mode&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/235702?ContentTypeID=1</link><pubDate>Fri, 21 Feb 2020 12:19:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:794cc924-5793-4b0c-9632-a5fa0fbd7501</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;Hi Susheel,&lt;/p&gt;
&lt;p&gt;I have a similar problem, but with a different memory chip (Macronix, mx66u2g45g, 1 Gb):&lt;br /&gt;when viewing the contents of the disk through the utility &amp;quot;WinHex&amp;quot;, I see that the data is repeated every 16 MB (offset 0x0100 0000).&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/487x326/__key/communityserver-discussions-components-files/4/duplication_5F00_write.png" /&gt;&lt;/p&gt;
&lt;p&gt;e.g. original file location is 0x0004 6000, but in memory address 0x0104 6000,&amp;nbsp;&lt;span&gt;0x0204 6000, ...&lt;/span&gt;&amp;nbsp;are located dublicate of my file.&lt;/p&gt;
&lt;p&gt;This patch solves the problem of repeating the file table during formatting, but does not solve the problem of writing files.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, at some point, the record is made in sector 0 and grinds the file table. Because of this, the data on the map is not available.&lt;/p&gt;
&lt;p&gt;When testing, I used SDK 16.0.0&lt;br /&gt;I really hope for an ambulance in this matter, since a batch of devices has already been made ...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Additional information, after full disk format&amp;nbsp;some sectors have the correct content (for NAND flash) for the cleared state (FF), others have an incorrect value (00).&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/473x350/__key/communityserver-discussions-components-files/4/3835.erase.png" /&gt;&lt;/p&gt;
&lt;p&gt;best Regards,&lt;/p&gt;
&lt;p&gt;Max&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/215406?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 06:41:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcb5748b-003f-4b8a-803d-13822b3abb7d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sumanth,&lt;/p&gt;
&lt;p&gt;64KB erase unit size is something we haven&amp;#39;t tested. The implementation assumes that the erase unit is stored in RAM and not sure if you are seeing any behaviour that could be caused by data overflows in RAM.&amp;nbsp;&lt;span&gt;Additionally this implementation supports (maximum) 32 write blocks inside one erase unit. It means that&amp;nbsp;block_size fields in&amp;nbsp;qspi_bdev_config has to be set to 2kB&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It should theoretically work but like I mentioned, we haven&amp;#39;t tested those sizes yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/214921?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 19:07:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d3137d0-6844-45bf-920a-f39a99866b6a</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;Hi Susheel,&lt;/p&gt;
&lt;p&gt;Thanks for the update. However i still see issues when i change the&amp;nbsp;NRF_BLOCK_DEV_QSPI_ERASE_UNIT_SIZE to 64KB and&amp;nbsp;m_sflash_params.erase_size = 64KB.&lt;br /&gt;&lt;br /&gt;For some reason the code only works for 4KB erase unit size. The flash part we are using has 64 KB erase size. Any idea why?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/213164?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 10:29:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:865f66f6-989e-4f91-afc9-94984a6da7f2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Sumanth,&lt;/p&gt;
&lt;p&gt;All the concerns you had with wrong initialization values were converging into a bug where there could be unnecessary write writes. So we opted for a simple solution now to avoid unnecessarily writes and adding a few more checks.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;erase_unit_idx&lt;/b&gt;&lt;span&gt;&amp;nbsp;initialized with&amp;nbsp;&lt;/span&gt;&lt;b&gt;-1&lt;/b&gt;&lt;span&gt;&amp;nbsp;could provide extra write to memory, but now with bypassing unnecessary write when&amp;nbsp;&lt;/span&gt;&lt;b&gt;erase_unit_dirty_blocks&lt;/b&gt;&lt;span&gt;&amp;nbsp;is zero, the IRQ should reload&amp;nbsp;&lt;/span&gt;&lt;b&gt;erase_unit_idx&lt;/b&gt;&lt;span&gt;&amp;nbsp;with the correct value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please replace your qspi_block dev driver file with the below&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cb3966005c9c4bb4b7f944efe69418f7/nrf_5F00_block_5F00_dev_5F00_qspi.c"&gt;devzone.nordicsemi.com/.../nrf_5F00_block_5F00_dev_5F00_qspi.c&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The team is also reconsidering to refactor most of the code, but that is something that is long on the roadmap, so please do not wait for that in the near term.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Susheel&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/213069?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2019 19:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9afea5e3-0ea4-49ec-9f2d-3ad710bdda24</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;Any ETA? Also can we get the patch so we can try it out?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/211921?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 20:25:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b206965e-46a2-4e42-9f58-617c41aad4e6</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;They have found the root cause and understood the issue. This issue may have a broader impact on the behavior of the driver.&amp;nbsp;They need a few more days to prepare software test harness, investigation and solving the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/211272?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2019 13:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2729905-ed82-4afc-b6d9-4619bb72bf15</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi, latest is that we expect to have a fix tomorrow.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/210769?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 16:12:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2093d5e-687e-4659-9708-0566382e3a71</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;This is taking longer than anticipated, I likely won&amp;#39;t have an update until next week.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/210290?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 07:26:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3f1d7d8-4a02-464a-9c53-001eeca24d84</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I will ping the team again. Sorry for the delay.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/210255?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 03:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7844f583-cfd0-4826-a239-00f991498ae4</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;Any updates??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/208718?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 13:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecea337a-874b-46a0-8c05-2e9063144140</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The SDK team is looking into this this week.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/208051?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2019 21:00:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38e3b219-7b24-43a7-8c60-4f7f7bbdca3d</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;Any update on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/204641?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2019 07:07:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cde58350-078c-4e1f-a20c-b463c8f5d815</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Sumanth, The SDK team said they will look into this querry as soon as they get some time (with escalated priority)&lt;br /&gt;I will update you as soon as I get some information from them.&lt;/p&gt;
&lt;p&gt;Sorry for the inconvenience caused by these delays.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/202798?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 10:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aa9b1d8-9e0f-4413-887f-77572d759e40</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Unfortunately, this is taking longer to get a response from the team. Please contact&amp;nbsp;clay.hine@nordicsemi.no (your Regional Sales Manager)&amp;nbsp; to escalate this if it is very urgent for you to get an answer for this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/202698?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 21:14:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfa12ec6-db0c-4470-ac08-d2aa08ca8d6f</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;Any updates? This is very important for us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/201983?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 17:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:760c319d-39bd-4c9e-85d4-d37cf4793d96</guid><dc:creator>Sumanth Murali</dc:creator><description>&lt;p&gt;Yes, thanks, it will be good to have some sort of documentation on how this block device interface works along with answers for the above questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI block device issue with S25FS flash part</title><link>https://devzone.nordicsemi.com/thread/201982?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 12:28:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0ece685-0232-445e-99f5-97f0b000203f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Your questions seem very valid, and I do not have answers to them, I have asked the experts to pitch in and help us to understand the code you provided. I hope they respond soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>