<?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: FLEXCOMM_GetInstance crashing (HS SPI)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374756#M47065</link>
    <description>&lt;P&gt;The pin tool in the development environment lists&amp;nbsp; flexcomm 0 - 6 and 8.&amp;nbsp; Inside Flexcomm 8 the options are all for HS SPI and the pin numbers look correct.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 05:33:46 GMT</pubDate>
    <dc:creator>christianlees</dc:creator>
    <dc:date>2021-11-22T05:33:46Z</dc:date>
    <item>
      <title>FLEXCOMM_GetInstance crashing (HS SPI)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1372379#M47025</link>
      <description>&lt;P&gt;I have a board using a LPC55S06 and a Winbond W25Q32 connected to the HS SPI interface.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	CLOCK_SetClkDiv(kCLOCK_DivFrohfClk, 0U, true);  /*!&amp;lt; Reset FROHFDIV divider counter and halt it */
	CLOCK_SetClkDiv(kCLOCK_DivFrohfClk, 2U, false); /*!&amp;lt; Set FROHFDIV divider to value 2 */
	CLOCK_AttachClk(kFRO_HF_DIV_to_HSLSPI); /*!&amp;lt; Switch HSLSPI to FRO_HF_DIV */
	//CLOCK_AttachClk(kMAIN_CLK_to_HSLSPI);
	RESET_PeripheralReset(kHSLSPI_RST_SHIFT_RSTn);

	spi_master_config_t master_config = {0};
	SPI_MasterGetDefaultConfig(&amp;amp;master_config);
	master_config.sselNum = (spi_ssel_t)0;
	master_config.sselPol = (spi_spol_t)kSPI_SpolActiveAllLow;
	master_config.baudRate_Bps = 12000000U;
	uint32_t clk = CLOCK_GetHsLspiClkFreq();
	SPI_MasterInit(SPI8, &amp;amp;master_config, CLOCK_GetHsLspiClkFreq());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stepping through the code the MCU crashes when it returns from FLEXCOMM_GetInstance.&amp;nbsp; I have tried a few difference baud rates.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;uint32_t FLEXCOMM_GetInstance(void *base)
{
    uint32_t i;
    pvoid_to_u32_t BaseAddr;
    BaseAddr.pvoid = base;

    for (i = 0U; i &amp;lt; (uint32_t)FSL_FEATURE_SOC_FLEXCOMM_COUNT; i++)
    {
        if (BaseAddr.u32 == s_flexcommBaseAddrs[i])
        {
            break;
        }
    }

    assert(i &amp;lt; (uint32_t)FSL_FEATURE_SOC_FLEXCOMM_COUNT);
    return i;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When this routine runs i is 8 as is&amp;nbsp;FSL_FEATURE_SOC_FLEXCOMM_COUNT when it gets to the assert line.&amp;nbsp; If i step into this line I get the following line in the debugger console&lt;/P&gt;&lt;P&gt;[Inferior 1 (Remote target) exited normally]&lt;/P&gt;&lt;P&gt;Any idea what causes this?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 04:29:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1372379#M47025</guid>
      <dc:creator>christianlees</dc:creator>
      <dc:date>2021-11-17T04:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCOMM_GetInstance crashing (HS SPI)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1372483#M47027</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls refer to the data sheet of LPC550x.&lt;/P&gt;
&lt;P&gt;For HTQFP64 pins of LPC550x, there are only 6 spi plus 1 hs spi, total is 7&lt;/P&gt;
&lt;P&gt;For HTQFP48 pins of LPC550x, there are only 3 spi plus 1 hs spi, total is 4&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1637131180985.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/162370iB12315EEBF2E92B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1637131180985.png" alt="xiangjun_rong_0-1637131180985.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 06:43:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1372483#M47027</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-11-17T06:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCOMM_GetInstance crashing (HS SPI)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374657#M47062</link>
      <description>&lt;P&gt;According to the user manual (UM11424) the HS_SPI is on Flexcomm 8 (SPI8), page 622.&amp;nbsp; Is this different between the two packages?&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 23:30:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374657#M47062</guid>
      <dc:creator>christianlees</dc:creator>
      <dc:date>2021-11-21T23:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCOMM_GetInstance crashing (HS SPI)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374688#M47064</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suggest you refer to data sheet rather than user manual, the user manual only gives function description for all the family, the data sheet gives how many modules the processor has exactly for each derivative.&lt;/P&gt;
&lt;P&gt;Sorry for the discrepancy between user manual and data sheet.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 02:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374688#M47064</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-11-22T02:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCOMM_GetInstance crashing (HS SPI)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374756#M47065</link>
      <description>&lt;P&gt;The pin tool in the development environment lists&amp;nbsp; flexcomm 0 - 6 and 8.&amp;nbsp; Inside Flexcomm 8 the options are all for HS SPI and the pin numbers look correct.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 05:33:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM-GetInstance-crashing-HS-SPI/m-p/1374756#M47065</guid>
      <dc:creator>christianlees</dc:creator>
      <dc:date>2021-11-22T05:33:46Z</dc:date>
    </item>
  </channel>
</rss>

