<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRe: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246099#M44286</link>
    <description>&lt;P&gt;Hi, Gaurav,&lt;/P&gt;
&lt;P&gt;Maybe what I said is not clear, the LPC4367 was released in 2015 year, it has 15 year tenure, in other words, it can be available till 2030 year.&lt;/P&gt;
&lt;P&gt;Because of lack of&amp;nbsp; work resource, we have not plan to update the QSPI Flash Drivers till now, I mean you have to modify the flash driver code yourself rather them software package team.&lt;/P&gt;
&lt;P&gt;Yes, we provide support for the LPC43xx.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2021 06:27:57 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2021-03-16T06:27:57Z</dc:date>
    <item>
      <title>Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1244564#M44256</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are&amp;nbsp; using&amp;nbsp;LPC4367JBD208E in our project. We are using&amp;nbsp;W25Q128JVFIM&amp;nbsp; interfaced over SPIFI lines. In order to access this flash we are using the flash driver library provided by LPCopen&amp;nbsp; LPCXFlashDriverLib.&lt;/P&gt;&lt;P&gt;In the driver I have made modification with respect to the lines used for SPIFI communication and tested it with the&amp;nbsp;W25Q128JVFIM&amp;nbsp; using the sample code provided in LPC open.&lt;/P&gt;&lt;P&gt;We found it is working but while testing it is observed that the function provided in the library named&lt;/P&gt;&lt;P&gt;uint32_t EraseSectors(uint32_t adr, uint32_t numsecs)&lt;/P&gt;&lt;P&gt;Performs Block erase instead of sector erase. the Sector erase part is missing. I have attached the QSPI flash code test code for reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is required&amp;nbsp; since we want to Erase 4KB sector erase part instead of 64KB block erase.&lt;/P&gt;&lt;P&gt;Kindly refer the code and let us know that whether we have the updated code regarding the sector erase section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaurav More&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 04:42:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1244564#M44256</guid>
      <dc:creator>gauravmore</dc:creator>
      <dc:date>2021-03-12T04:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1245233#M44274</link>
      <description>&lt;P&gt;Hi, Gaurav,&lt;/P&gt;
&lt;P&gt;I have checked the data sheet of W25Q256JV, I do not think that there is page erase command as the following figure. There is sector erase/Sector Erase (4KB) with 4-Byte Address/Block Erase (32KB)/Block Erase (64KB)/chip erase, but there is not page erase.&lt;/P&gt;
&lt;P&gt;That is why there is not page erase api function in the software package I think, if I am wrong, pls update the thread.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1615725669423.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/139553i67CFACEFA11745CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1615725669423.png" alt="xiangjun_rong_0-1615725669423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 12:49:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1245233#M44274</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-03-14T12:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1245340#M44277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Yes you are right. there no page erase option for the chip I am using. My query was regarding the sector erase only. If you see the code I shared there is Erase function which requires Addr and sector number as a parameter. This function is actually doing block erase not the sector erase. Sector erase is 4KB and Block erase is 64KB.&lt;/P&gt;&lt;P&gt;Inside the function named&lt;/P&gt;&lt;P&gt;uint32_t EraseSectors(uint32_t adr, uint32_t numsecs)&lt;/P&gt;&lt;P&gt;is actually performing block erase instead of sector erase. Following are the functions called inside the EraseSectors function,&lt;/P&gt;&lt;P&gt;spifiEraseByAddr and inside&amp;nbsp;spifiEraseByAddr function&amp;nbsp;spifiErase is called and inside&amp;nbsp;spifiErase function&amp;nbsp;pHandle-&amp;gt;pFamFx-&amp;gt;eraseBlock(pHandle, firstBlock); is called. Which I have verified ad my end.&lt;/P&gt;&lt;P&gt;So please confirm the same and also whether we can get the sector erase part inside the library or not?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Gaurav More&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 03:51:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1245340#M44277</guid>
      <dc:creator>gauravmore</dc:creator>
      <dc:date>2021-03-15T03:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246000#M44284</link>
      <description>&lt;P&gt;Hi, Gaurav,&lt;/P&gt;
&lt;P&gt;I see your question, I am sure that the uint32_t EraseSectors(uint32_t adr, uint32_t numsecs) call the blockerase command.&lt;/P&gt;
&lt;P&gt;If you want to implement the sector erase function, I suppose you have to implement it yourself. Because the LPC43xx is a bit old, in the latest spifi flash operation for LPC54xxx, we do not use the QSPI Flash Drivers architecture, so it is impossible to update QSPI Flash Drivers in future I think.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;uint32_t EraseSectors(uint32_t adr, uint32_t numsecs) {&lt;/P&gt;
&lt;P&gt;SPIFI_ERR_T errCode;&lt;BR /&gt;#if !defined (DONT_BLANKCHECK_BEFORE_ERASING)&lt;BR /&gt;uint8_t ch = FlashDevice.valEmpty;&lt;BR /&gt;uint32_t chw = ch | (ch &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (ch &amp;lt;&amp;lt; 16) | (ch &amp;lt;&amp;lt; 24);&lt;BR /&gt;if (checkblank(adr,(numsecs * (FlashDevice.sectors[0].szSector/4)), chw ) == 0)&lt;BR /&gt;return (0); // sector blank, so no need to erase&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;spifiDevSetMemMode(pSpifiHandle, false);&lt;BR /&gt;errCode = spifiEraseByAddr(pSpifiHandle, adr, adr + (FlashDevice.sectors[0].szSector * (numsecs -1)));&lt;BR /&gt;if (errCode != SPIFI_ERR_NONE)&lt;BR /&gt;return (errCode);&lt;/P&gt;
&lt;P&gt;spifiDevSetMemMode(pSpifiHandle, true);&lt;/P&gt;
&lt;P&gt;return (0);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/* Erase multiple blocks */&lt;BR /&gt;SPIFI_ERR_T spifiErase(const SPIFI_HANDLE_T *pHandle, uint32_t firstBlock, uint32_t numBlocks)&lt;BR /&gt;{&lt;BR /&gt;SPIFI_ERR_T err = SPIFI_ERR_NONE;&lt;/P&gt;
&lt;P&gt;if ((firstBlock + numBlocks) &amp;gt; pHandle-&amp;gt;pInfoData-&amp;gt;numBlocks) {&lt;BR /&gt;return SPIFI_ERR_RANGE;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/* Only perform erase if numBlocks is != 0 */&lt;BR /&gt;for (; (numBlocks); ++firstBlock, --numBlocks) {&lt;BR /&gt;err = pHandle-&amp;gt;pFamFx-&amp;gt;eraseBlock(pHandle, firstBlock);&lt;BR /&gt;if (err != SPIFI_ERR_NONE) {&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;return err;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/* Erase multiple blocks by address range */&lt;BR /&gt;SPIFI_ERR_T spifiEraseByAddr(const SPIFI_HANDLE_T *pHandle, uint32_t firstAddr, uint32_t lastAddr)&lt;BR /&gt;{&lt;BR /&gt;uint32_t firstBlock, lastBlock;&lt;BR /&gt;SPIFI_ERR_T err = SPIFI_ERR_RANGE;&lt;/P&gt;
&lt;P&gt;/* Get block numbers for addresses */&lt;BR /&gt;firstBlock = spifiGetBlockFromAddr(pHandle, firstAddr);&lt;BR /&gt;lastBlock = spifiGetBlockFromAddr(pHandle, lastAddr);&lt;/P&gt;
&lt;P&gt;/* Limit to legal address range */&lt;BR /&gt;if ((firstBlock != ~0UL) &amp;amp;&amp;amp; (lastBlock != ~0UL)) {&lt;BR /&gt;err = spifiErase(pHandle, firstBlock, ((lastBlock - firstBlock) + 1));&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;return err;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 02:48:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246000#M44284</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-03-16T02:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246014#M44285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;XiangJun Rong,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the reply you mentioned that SPI flash driver will not be updated in future. any reason for the same. I thing this SPI flash is for LPC43XX tri-core controller where there as two versions on chip flash and using external flash.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So is it a case that LPC43XX will not be continued further. Con you please confirm this since i am going to use the flash in my project due to some application requirement and also regarding the same there is a possibility that I may require support for the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaurav More&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 03:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246014#M44285</guid>
      <dc:creator>gauravmore</dc:creator>
      <dc:date>2021-03-16T03:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246099#M44286</link>
      <description>&lt;P&gt;Hi, Gaurav,&lt;/P&gt;
&lt;P&gt;Maybe what I said is not clear, the LPC4367 was released in 2015 year, it has 15 year tenure, in other words, it can be available till 2030 year.&lt;/P&gt;
&lt;P&gt;Because of lack of&amp;nbsp; work resource, we have not plan to update the QSPI Flash Drivers till now, I mean you have to modify the flash driver code yourself rather them software package team.&lt;/P&gt;
&lt;P&gt;Yes, we provide support for the LPC43xx.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Xiangjun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 06:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246099#M44286</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-03-16T06:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246104#M44287</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Xiangjun Rong&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Also thanks for the proper clarification. It means there is a possibility that in future the patch will be available but now it is not there . m i understood correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Gaurav More&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 06:22:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246104#M44287</guid>
      <dc:creator>gauravmore</dc:creator>
      <dc:date>2021-03-16T06:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Erase function is missing in  QSPI Flash Drivers  (LPCXFlashDriverLib)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246254#M44292</link>
      <description>&lt;P&gt;Hi, Gaurav,&lt;/P&gt;
&lt;P&gt;Yes, there is a possibility that in future the patch will be available but now it is not there.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 08:37:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Sector-Erase-function-is-missing-in-QSPI-Flash-Drivers/m-p/1246254#M44292</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-03-16T08:37:14Z</dc:date>
    </item>
  </channel>
</rss>

