<?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>topic spifi_init() returns error 0x2000A in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868360#M34605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a running application on the Embedded Artists LPC4088 board, which uses the SPIFI FLASH from Winbond.&lt;/P&gt;&lt;P&gt;This works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have then made our own custom board with a new SPIFI FLASH: SST26VF032 from Microchip.&lt;/P&gt;&lt;P&gt;This is on the supported list in the user manual.&lt;/P&gt;&lt;P&gt;We have also changed the MCU to LPC4076, but this should not have anything to say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that when we try to initialize the SPIFI FLASH, the call to the ROM function spifi_init() returns an error 0x2000A.&lt;/P&gt;&lt;P&gt;We have tried different settings for the SPIFI, but it just keeps returning 0x2000A.&lt;/P&gt;&lt;P&gt;And we can not find any manual/API description for the ROM API, so we have no clue what the error code tries to tell us...&lt;/P&gt;&lt;P&gt;So, the questions are:&lt;/P&gt;&lt;P&gt;- What does the 0x2000A mean?&lt;/P&gt;&lt;P&gt;- Where can I find the SPIFI ROM API description?&lt;/P&gt;&lt;P&gt;- Any good ideas of why it fails with the new SPIFI device?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the init code, which calls the spifi_init().&lt;/P&gt;&lt;P&gt;ret = 0x2000A after the call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Kaare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Initialise SPIFI */&lt;BR /&gt; LPC_SC-&amp;gt;PCONP |= ( 1UL &amp;lt;&amp;lt; 16 ); /* enable SPIFI power/clock */&lt;BR /&gt; LPC_IOCON-&amp;gt;P2_7 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P2_7 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_CSN = P2.7 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_22 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_22 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_CLK = P0.22 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_15 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_15 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO2 = P0.15 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_16 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_16 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO3 = P0.16 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_17 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_17 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO1 = P0.17 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_18 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_18 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO0 = P0.18 (FUNC 5) */&lt;/P&gt;&lt;P&gt;g_spifi_mem_base = (uint32_t)p_flash_base;&lt;/P&gt;&lt;P&gt;/* get SPIFI API table pointer */&lt;BR /&gt; g_spifi = ROM_DRIVERS_PTR-&amp;gt;pSPIFID;&lt;/P&gt;&lt;P&gt;// ret = g_spifi-&amp;gt;spifi_init( &amp;amp;g_spifi_obj, 4, S_FULLCLK + S_RCVCLK, 80 );&lt;BR /&gt; ret = g_spifi-&amp;gt;spifi_init( &amp;amp;g_spifi_obj, 0, S_HALFCLK + S_RCVCLK, 24 );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2019 20:23:07 GMT</pubDate>
    <dc:creator>kbk1</dc:creator>
    <dc:date>2019-01-28T20:23:07Z</dc:date>
    <item>
      <title>spifi_init() returns error 0x2000A</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868360#M34605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a running application on the Embedded Artists LPC4088 board, which uses the SPIFI FLASH from Winbond.&lt;/P&gt;&lt;P&gt;This works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have then made our own custom board with a new SPIFI FLASH: SST26VF032 from Microchip.&lt;/P&gt;&lt;P&gt;This is on the supported list in the user manual.&lt;/P&gt;&lt;P&gt;We have also changed the MCU to LPC4076, but this should not have anything to say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that when we try to initialize the SPIFI FLASH, the call to the ROM function spifi_init() returns an error 0x2000A.&lt;/P&gt;&lt;P&gt;We have tried different settings for the SPIFI, but it just keeps returning 0x2000A.&lt;/P&gt;&lt;P&gt;And we can not find any manual/API description for the ROM API, so we have no clue what the error code tries to tell us...&lt;/P&gt;&lt;P&gt;So, the questions are:&lt;/P&gt;&lt;P&gt;- What does the 0x2000A mean?&lt;/P&gt;&lt;P&gt;- Where can I find the SPIFI ROM API description?&lt;/P&gt;&lt;P&gt;- Any good ideas of why it fails with the new SPIFI device?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the init code, which calls the spifi_init().&lt;/P&gt;&lt;P&gt;ret = 0x2000A after the call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Kaare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Initialise SPIFI */&lt;BR /&gt; LPC_SC-&amp;gt;PCONP |= ( 1UL &amp;lt;&amp;lt; 16 ); /* enable SPIFI power/clock */&lt;BR /&gt; LPC_IOCON-&amp;gt;P2_7 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P2_7 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_CSN = P2.7 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_22 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_22 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_CLK = P0.22 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_15 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_15 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO2 = P0.15 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_16 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_16 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO3 = P0.16 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_17 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_17 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO1 = P0.17 (FUNC 5) */&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_18 &amp;amp;= ~( 7UL &amp;lt;&amp;lt; 0 );&lt;BR /&gt; LPC_IOCON-&amp;gt;P0_18 |= ( 5UL &amp;lt;&amp;lt; 0 ); /* SPIFI_IO0 = P0.18 (FUNC 5) */&lt;/P&gt;&lt;P&gt;g_spifi_mem_base = (uint32_t)p_flash_base;&lt;/P&gt;&lt;P&gt;/* get SPIFI API table pointer */&lt;BR /&gt; g_spifi = ROM_DRIVERS_PTR-&amp;gt;pSPIFID;&lt;/P&gt;&lt;P&gt;// ret = g_spifi-&amp;gt;spifi_init( &amp;amp;g_spifi_obj, 4, S_FULLCLK + S_RCVCLK, 80 );&lt;BR /&gt; ret = g_spifi-&amp;gt;spifi_init( &amp;amp;g_spifi_obj, 0, S_HALFCLK + S_RCVCLK, 24 );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2019 20:23:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868360#M34605</guid>
      <dc:creator>kbk1</dc:creator>
      <dc:date>2019-01-28T20:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: spifi_init() returns error 0x2000A</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868361#M34606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After googling (a lot...), I found this decription&amp;nbsp;&lt;SPAN style="color: #6a737d; background-color: #ffffff;"&gt;0x2000A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a737d; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;No operative serial flash (JEDEC ID all zeroes or all ones&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a737d; background-color: #ffffff;"&gt;This indicates we may have a HW issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a737d; background-color: #ffffff;"&gt;I will investigate that, and come back.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a737d; background-color: #ffffff;"&gt;br&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a737d; background-color: #ffffff;"&gt;Kaare&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 07:00:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868361#M34606</guid>
      <dc:creator>kbk1</dc:creator>
      <dc:date>2019-01-29T07:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: spifi_init() returns error 0x2000A</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868362#M34607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/kbk@danotek.dk"&gt;kbk@danotek.dk&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Is your SPIFI flash present in the list in function &lt;STRONG&gt;spifi_REG_FAMILY_CommonCommandSet() &lt;/STRONG&gt;in &lt;STRONG&gt;spifilib_fam_standard_cmd.c. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If not, you can try manually adding it. Because during initialization it gets configured from this list based on the deviceID, manufactureID, etc.&lt;/P&gt;&lt;P&gt;When I bought new ISSI flash I had to add my device config data in this list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Priyank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 10:42:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868362#M34607</guid>
      <dc:creator>priyankb</dc:creator>
      <dc:date>2019-01-29T10:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: spifi_init() returns error 0x2000A</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868363#M34608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priyank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don’t have that file in my project.&lt;/P&gt;&lt;P&gt;It uses the SPIFI function in ROM. I don’t know where this ROM driver holds this list of known ID’s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the datasheet, I have found the Mfgr, DevType and devID as:&lt;/P&gt;&lt;P&gt;#define SPIFI_NOR_ID_MFG                   0xbfu&lt;/P&gt;&lt;P&gt;#define SPIFI_NOR_ID_TYPE                  0x26u&lt;/P&gt;&lt;P&gt;#define SPIFI_NOR_ID_CAP                   0x42u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I read exact these values from the FLASH device.&lt;/P&gt;&lt;P&gt;But the spifi_init() function does not know it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the LPC40xx manual, it says that the SPIFI FLASH we use is tested to be working with this MCU.&lt;/P&gt;&lt;P&gt;So it should work, but don’t…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Kaare&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 10:56:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868363#M34608</guid>
      <dc:creator>kbk1</dc:creator>
      <dc:date>2019-01-29T10:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: spifi_init() returns error 0x2000A</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868364#M34609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kaare,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me which example are you using as a base for your project? I recommend you using the&lt;A href="https://www.nxp.com/support/developer-resources/software-development-tools/lpc-developer-resources-/lpc-spifi-peripheral:SPIFI-NXP-MICROCONTROLLERS"&gt; SPIFI library&lt;/A&gt; instead of the SPIFI ROM API. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward to your reply!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 23:08:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/spifi-init-returns-error-0x2000A/m-p/868364#M34609</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-02-05T23:08:39Z</dc:date>
    </item>
  </channel>
</rss>

