<?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: SPI TWRMCF51CN Driver Usage in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145725#M41</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check if the user_config.h you changed was the one in config directory (not in lib).&lt;/P&gt;&lt;P&gt;You have to recompile libraries after that also.&lt;/P&gt;&lt;P&gt;It's hard to tell what&amp;nbsp;is the cause, could you debug the fopen function more to see, if it finds the driver according to given name? You can also set breakpoint into _mcf5xxx_spi8_polled_init() function in spi_pol_mcf5xxxx_spi8.c to check if it even gets there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Sep 2010 18:48:24 GMT</pubDate>
    <dc:creator>PetrM</dc:creator>
    <dc:date>2010-09-24T18:48:24Z</dc:date>
    <item>
      <title>SPI TWRMCF51CN Driver Usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145724#M40</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the TWRMCF51CN with CW10 and I am trying use the SPI0 port to read SPI device but I can't start driver. when I am debugging the spifd become null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code:&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;&lt;PRE&gt;int sendData2(char *data){
    FILE_PTR spifd;
    spifd = fopen("spi0:", (pointer)(SPI_DEVICE_MASTER_MODE));
    if(spifd == NULL){ //&amp;lt;- before fopen the spifd is NULL
        printf("error opening CS Driver");
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is the modified vars in user_config.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#define BSPCFG_ENABLE_ADC        0   /* &amp;lt;- Change to 0 NOTE: Shares wires with I2C1, SPI0 */
#define BSPCFG_ENABLE_SPI0       1   /* &amp;lt;- Change to 1 NOTE: Shares wires with I2C1, ADC */   &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I trying a lot configurations, but I have the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please giveme help.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145724#M40</guid>
      <dc:creator>Gabrielus</dc:creator>
      <dc:date>2020-10-29T08:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TWRMCF51CN Driver Usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145725#M41</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check if the user_config.h you changed was the one in config directory (not in lib).&lt;/P&gt;&lt;P&gt;You have to recompile libraries after that also.&lt;/P&gt;&lt;P&gt;It's hard to tell what&amp;nbsp;is the cause, could you debug the fopen function more to see, if it finds the driver according to given name? You can also set breakpoint into _mcf5xxx_spi8_polled_init() function in spi_pol_mcf5xxxx_spi8.c to check if it even gets there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 18:48:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145725#M41</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2010-09-24T18:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TWRMCF51CN Driver Usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145726#M42</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes the problem was solve importing&amp;nbsp;bsp_twrmcf51cn and I modified user_config.h and compiled as Release and Everything was OK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 11:33:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145726#M42</guid>
      <dc:creator>Gabrielus</dc:creator>
      <dc:date>2010-09-29T11:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TWRMCF51CN Driver Usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145727#M43</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody&lt;/P&gt;&lt;P&gt;I just found this thread&amp;nbsp; suitable for my question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building an application where I use SPI1 on the MCF51CN128 tower. Some times I require to handle SPI1 pins as&lt;/P&gt;&lt;P&gt;GPIO.&amp;nbsp; Before I open a spi_file(MQX_FILE_PTR) I can do this by a GPIO_PIN_STRUCT,&amp;nbsp; but after opening spi_file, commands over GPIO_PIN_STRUCT don´t work. I have tried closing spi_file before handling GPIO but it doesn´t work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ll appreciate any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 21:42:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145727#M43</guid>
      <dc:creator>javax</dc:creator>
      <dc:date>2010-11-26T21:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TWRMCF51CN Driver Usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145728#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just another question..How can I uninstall a device driver in a MQX frame.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 21:43:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145728#M44</guid>
      <dc:creator>javax</dc:creator>
      <dc:date>2010-11-26T21:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TWRMCF51CN Driver Usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145729#M45</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can uninstall driver using _io_dev_uninstall() function, i.e. _io_dev_uninstall ("spi1:");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The gpio pin handling is done in "overwrite manner" - the last driver opened resets the pins for its purpose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have to toggle between gpio driver and spi driver, you don't have to uninstall them, just close one and open again the other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fopen ("spi1:", NULL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fclose (spifd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fopen ("gpio:", ...);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fclose (gpiofd);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 23:25:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/SPI-TWRMCF51CN-Driver-Usage/m-p/145729#M45</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2010-12-03T23:25:08Z</dc:date>
    </item>
  </channel>
</rss>

