<?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 Re: Error opening SPI driver in spi_master example of MQX_V5 IAR in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1161597#M18551</link>
    <description>&lt;P&gt;I would suggest trace&amp;nbsp;&lt;SPAN&gt;spifd = fopen (TEST_CHANNEL, NULL);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Then you can see why the fopen returns a invalid pointer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Thu, 01 Oct 2020 03:17:15 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2020-10-01T03:17:15Z</dc:date>
    <item>
      <title>Error opening SPI driver in spi_master example of MQX_V5 IAR</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1160519#M18548</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;MQX_V5 for IAR IDE. I am using MQX package provided example&amp;nbsp;spi_master.&lt;/P&gt;&lt;P&gt;I am using our own development board. External Data flash is connected to SPI3.&lt;/P&gt;&lt;P&gt;I did following changes.&lt;/P&gt;&lt;P&gt;1. added definitions of pins in&amp;nbsp;BOARD_InitPins(); of BSP.&amp;nbsp; these are right, because same pins working with NXP bare metal examples.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.Enable SPI in user_conifg.h&lt;/P&gt;&lt;P&gt;#define BSPCFG_ENABLE_LPSPI3 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Still&amp;nbsp;TEST_CHANNEL&amp;nbsp; is not assigned by&amp;nbsp;"spi3:" by following code snipped.&lt;/P&gt;&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans" color="#0000FF"&gt;#elif BSP_SPI_MEMORY_CHANNEL == 3&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans" color="#0000FF"&gt;#if ! BSPCFG_ENABLE_SPI3 &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="lucida sans unicode,lucida sans" color="#0000FF"&gt;#error This application requires BSPCFG_ENABLE_SPI3 defined non-zero in user_config.h. Please recompile kernel with this option.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="lucida sans unicode,lucida sans" color="#0000FF"&gt;#else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="lucida sans unicode,lucida sans" color="#0000FF"&gt;#define TEST_CHANNEL "spi3:"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="lucida sans unicode,lucida sans" color="#0000FF"&gt;#endif&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;4. so, I added #define BSPCFG_ENABLE_SPI3 1&amp;nbsp; in&amp;nbsp;user_conifg.h&lt;/P&gt;&lt;P&gt;Now, it is assigned&amp;nbsp;"spi3:" to TEST_CHANNEL&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. but finally at following code, not opening port. Execution reach at task_block() line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;/* Open the SPI driver */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;spifd = fopen (TEST_CHANNEL, NULL);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_io_printf("channel = %d",channel);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;if (NULL == spifd)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;printf ("Error opening SPI driver!\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_time_delay (200L);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_task_block ();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Is there any settings required to Open SPI Port?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1160519#M18548</guid>
      <dc:creator>Satish_Davare</dc:creator>
      <dc:date>2020-09-29T08:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error opening SPI driver in spi_master example of MQX_V5 IAR</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1161597#M18551</link>
      <description>&lt;P&gt;I would suggest trace&amp;nbsp;&lt;SPAN&gt;spifd = fopen (TEST_CHANNEL, NULL);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Then you can see why the fopen returns a invalid pointer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 03:17:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1161597#M18551</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-10-01T03:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error opening SPI driver in spi_master example of MQX_V5 IAR</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1162223#M18552</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/369" target="_self"&gt;danielchen&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks for your guidance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I traced it. fopen is taking "spi3:". but in init.bsp.c file, there is following code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN class=""&gt;IF_FEATURE_ENABLED( BSPCFG_ENABLE_LPSPI3, _io_spi_install("lpspi3:", &amp;amp;_bsp_spi3_init); )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;here, driver name is&amp;nbsp;&lt;FONT color="#0000FF"&gt;"lpspi3:". &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#333333"&gt;&lt;SPAN class=""&gt;So, SPI3 driver was not installed. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN class=""&gt;I changed&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;#define TEST_CHANNEL "spi3:"&lt;/FONT&gt; to&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt; #define TEST_CHANNEL "lpspi3:"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, driver is installed and SPI is working. This issue is resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="inherit" color="#333333"&gt;Just for for my knowledge, can you please tell me&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="inherit" color="#333333"&gt;is this right way of&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#333333"&gt;modification&lt;/FONT&gt;&lt;FONT face="inherit" color="#333333"&gt;? can we interchange SPI and LPSPI like this? is there difference between SPI and LPSPI drivers?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="inherit" color="#333333"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 10:58:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1162223#M18552</guid>
      <dc:creator>Satish_Davare</dc:creator>
      <dc:date>2020-10-02T10:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error opening SPI driver in spi_master example of MQX_V5 IAR</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1162575#M18553</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest you check the MCU reference manual.&amp;nbsp; whether the spi3&amp;nbsp; is a low power spi ?&amp;nbsp; if yes, and it is working, I think it is right.&lt;/P&gt;
&lt;P&gt;The difference between spi and lpspi is , lpspi supports low power feature.&amp;nbsp; and spi not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 08:46:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Error-opening-SPI-driver-in-spi-master-example-of-MQX-V5-IAR/m-p/1162575#M18553</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-10-03T08:46:53Z</dc:date>
    </item>
  </channel>
</rss>

