<?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のトピックSPIFI Library Source and Micron N25Q128A Flash</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551744#M14243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by visectro on Thu Nov 13 00:53:39 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im developing with the NXP LPC4350/70 MCU and trying to incorporate the Micron N25Q128A13ESE40 flash to be accessable for erasing and writing. I've already written an bootloader/firmwareloader to be able to update the firmware stored in flash. This is working for a Spansion FL256S/128S flash. For this i've used the SPIFL Library Source 0.06 beta and adjusted the spifilib_fam_spa_2b_pstat.c driver file so it's working with the Spansion flash i'm using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now i've to support the already named Micron N25Q flash. The problem is, there is no similar driver file which fits as good as the Spansion one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've already spent time on adjusting the Spansion driver file to support the Micron flash, but until now unsuccsessful. Is there already a cappability of supporting this Micron flash i didn't know about or whats the key parameters i've to consider to make it work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all i've tried to make the deviceGetID() function working, but the flash device doesn't respond so i'll get the id 0xFF ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for assistants&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;best regards sebastian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:36:26 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:36:26Z</dc:date>
    <item>
      <title>SPIFI Library Source and Micron N25Q128A Flash</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551744#M14243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by visectro on Thu Nov 13 00:53:39 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im developing with the NXP LPC4350/70 MCU and trying to incorporate the Micron N25Q128A13ESE40 flash to be accessable for erasing and writing. I've already written an bootloader/firmwareloader to be able to update the firmware stored in flash. This is working for a Spansion FL256S/128S flash. For this i've used the SPIFL Library Source 0.06 beta and adjusted the spifilib_fam_spa_2b_pstat.c driver file so it's working with the Spansion flash i'm using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now i've to support the already named Micron N25Q flash. The problem is, there is no similar driver file which fits as good as the Spansion one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've already spent time on adjusting the Spansion driver file to support the Micron flash, but until now unsuccsessful. Is there already a cappability of supporting this Micron flash i didn't know about or whats the key parameters i've to consider to make it work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all i've tried to make the deviceGetID() function working, but the flash device doesn't respond so i'll get the id 0xFF ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for assistants&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;best regards sebastian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551744#M14243</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: SPIFI Library Source and Micron N25Q128A Flash</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551745#M14244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Thu Nov 13 07:02:57 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Sebastian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Please post your code. You can also use old SPIFI lib(No source available just lib with different API) which is available at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fnxpfile%2Flpc4350apdlzip" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/nxpfile/lpc4350apdlzip&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551745#M14244</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: SPIFI Library Source and Micron N25Q128A Flash</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551746#M14245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by visectro on Thu Nov 13 07:42:59 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the configuration that i'll use for the Micron N25Q128A Flash:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;SPIFI_DEV_FAMILY_T *SPIFI_REG_FAMILY_Micron_2Byte_SStatus(void)
{
&amp;nbsp; static SPIFI_DEV_FAMILY_T handle;
&amp;nbsp; static SPIFI_FAM_DESC_T desc;

&amp;nbsp; /* Store the device specific info so it can be returned */
&amp;nbsp; desc.pFamName = "Micron N25QxxxA based family";
&amp;nbsp; desc.pDevList = &amp;amp;devHead;
&amp;nbsp; desc.prvDataSize = PRVDATASIZE;
&amp;nbsp; desc.pPrvDevGetID = deviceGetID;
&amp;nbsp; desc.pPrvDevSetup = devSetup;
&amp;nbsp; desc.pPrvDevRegister = devRegister;

&amp;nbsp; /* Save the descriptor in the handle */
&amp;nbsp; handle.pDesc = &amp;amp;desc;

&amp;nbsp; /* Make sure that the base list is empty and the count reflects 0 */
&amp;nbsp; devHead.pNext = NULL;
&amp;nbsp; devCount = 0;

&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* ID Micron N25Q128A */
&amp;nbsp;&amp;nbsp;&amp;nbsp; static const SPIFI_DEV_PDATA_T pData = {"N25Q128A", { {0x20, 0xBA, 0x18}, 0, {0}}, /* JEDEC ID, extCount, ext data */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 256, /* # of blocks */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x10000, /* block size 64kB */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 4096, /* # of sub-blocks&amp;nbsp; */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1000, /* sub-block size 4kB */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x100, /* page size 256B */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 32768, /* max single read bytes ??? noch nicht geändert */
&amp;nbsp;&amp;nbsp;&amp;nbsp; 108000000, /* max clock rate 108 MHz */
&amp;nbsp;&amp;nbsp;&amp;nbsp; (SPIFI_CAP_QUAD | SPIFI_CAP_FULLLOCK | SPIFI_CAP_NOBLOCK | SPIFI_CAP_SUBBLKERASE) /* capabilitites */
//&amp;nbsp;&amp;nbsp;&amp;nbsp; (SPIFI_CAP_QUAD | SPIFI_CAP_FULLLOCK | SPIFI_CAP_NOBLOCK | SPIFI_CAP_SUBBLKERASE) /* capabilitites */
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; static SPIFI_DEV_DATA_T data;

&amp;nbsp;&amp;nbsp;&amp;nbsp; data.pDevData = &amp;amp;pData;
&amp;nbsp;&amp;nbsp;&amp;nbsp; devRegister(&amp;amp;handle, &amp;amp;data);
&amp;nbsp; }

&amp;nbsp; /* finally return the handle */
&amp;nbsp; return &amp;amp;handle;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all i'll try to get the deviceGetID() function running:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/* Read Identification */
static void deviceGetID(uint32_t spifiAddr, SPIFI_DEVICE_ID_T *pID)
{
&amp;nbsp; uint8_t idx;
&amp;nbsp; volatile uint32_t intStatusRegister;
&amp;nbsp; volatile uint32_t intControlRegister;
&amp;nbsp; LPC_SPIFI_CHIPHW_T *pSpifiCtrlAddr = (LPC_SPIFI_CHIPHW_T *) spifiAddr;

&amp;nbsp; /* Wait for command to complete */
&amp;nbsp; spifi_HW_WaitCMD(pSpifiCtrlAddr);

&amp;nbsp; /* Read ID command, plus read 3 bytes on data */
&amp;nbsp; spifi_HW_SetCmd(pSpifiCtrlAddr,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SPIFI_CMD_OPCODE(CMD_RDID) | SPIFI_CMD_DATALEN(3 + pID-&amp;gt;extCount) | SPIFI_CMD_FIELDFORM(SPIFI_FIELDFORM_ALL_SERIAL) | SPIFI_CMD_FRAMEFORM(SPIFI_FRAMEFORM_OP)));

&amp;nbsp; /* Get info from the device */
&amp;nbsp; pID-&amp;gt;mfgId[0] = spifi_HW_GetData8(pSpifiCtrlAddr); /* Manufacturers ID */
&amp;nbsp; pID-&amp;gt;mfgId[1] = spifi_HW_GetData8(pSpifiCtrlAddr); /* Memory Type */
&amp;nbsp; pID-&amp;gt;mfgId[2] = spifi_HW_GetData8(pSpifiCtrlAddr); /* Memmory Capacity */

&amp;nbsp; /* Read the specified number of extended bytes */
&amp;nbsp; for (idx = 0; idx &amp;lt; pID-&amp;gt;extCount; ++idx)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; pID-&amp;gt;extId[idx] = spifi_HW_GetData8(pSpifiCtrlAddr);
&amp;nbsp; }

&amp;nbsp; spifi_HW_WaitCMD(pSpifiCtrlAddr);
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The command code for read id is configured as shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define CMD_RDID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x9F/**&amp;lt; Read Identification */&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This deviceGetID() function is called during initialisation of SPIFI within the spifiGetHandleMemSize() function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/* Initialize LPCSPIFILIB library, do not reset the interface */
&amp;nbsp; spifiInit(C_SPIFICTLREGBASE, true);

&amp;nbsp; /* Register the family for the device */
&amp;nbsp; spifiRegisterFamily(SPIFI_REG_FAMILY_MicronN25Q);

&amp;nbsp; /* Get required memory for detected device, this may vary per device family */
&amp;nbsp; intMemSize = spifiGetHandleMemSize(C_SPIFICTLREGBASE);&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:36:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551746#M14245</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: SPIFI Library Source and Micron N25Q128A Flash</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551747#M14246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by visectro on Mon Nov 17 06:41:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i've also tried the old SPIFI library. It's working with the Micron flash for general.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the library also able to work with subsectors? I can't find anything about it in the documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Micron flash is build up as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- 256 Sectors each 64kByte&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- 4096 Subsectors each 4kByte&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;resulting in 16MByte memory. It is also supporting erase of subsectors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to erase one single 4k subsector, but it extended the erase range to a whole 64k sector. So i'll assume that this isn't possible - am i right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the functionality of the scratch parameter, but i'd like to speed up the erase program process for small program sizes and the erase process take so much time...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: Do anybody know what to do to become the flash device running with the SPIFL Library Source 0.06 beta? There it wouldn't be a problem to access subsectors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:36:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551747#M14246</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPIFI Library Source and Micron N25Q128A Flash</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551748#M14247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by visectro on Mon Nov 24 07:25:03 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is something missing or can i give additional information about the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody there who worked already on this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm appreciated about any support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards Sebastian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:36:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SPIFI-Library-Source-and-Micron-N25Q128A-Flash/m-p/551748#M14247</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:36:29Z</dc:date>
    </item>
  </channel>
</rss>

