<?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: MQX 4.2: slave spi read-write doesn't work in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423138#M14086</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/soledad"&gt;soledad&lt;/A&gt;‌/ NXP team,&lt;/P&gt;&lt;P&gt;Is there any documentation to integrate the PE generated codes to an already existing MQX application without PE?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Sarma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2018 04:48:59 GMT</pubDate>
    <dc:creator>csmgsarma</dc:creator>
    <dc:date>2018-01-02T04:48:59Z</dc:date>
    <item>
      <title>MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423132#M14080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;K20&lt;/P&gt;&lt;P&gt;MQX 4.2&lt;/P&gt;&lt;P&gt;8 bit data&lt;/P&gt;&lt;P&gt;SLAVE SPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spifd = fopen("spi1:1",(void*)SPI_FLAG_FULL_DUPLEX);&lt;/P&gt;&lt;P&gt;ioctrl(spifd,IOCTL_SPI_SET_TRANSFER_MODE, SPI_DEVICE_SLAVE_MODE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rw.BUFFER_LENGH = 6;&lt;/P&gt;&lt;P&gt;rw.WRITE_BUFFER = (char *)send_buffer;&lt;/P&gt;&lt;P&gt;rw.READ_BUFFER = (char *)receive_buffer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ioctl(spifd, IOCTL_SPI_READ_WRITE, &amp;amp;rw); &lt;STRONG&gt;-&amp;gt;&lt;/STRONG&gt; _io_ioctl(..) &lt;STRONG&gt;-&amp;gt;&lt;/STRONG&gt; _io_spi_ioctl(..) &lt;STRONG&gt;-&amp;gt;&lt;/STRONG&gt; _io_spi_read_write(..) &lt;STRONG&gt;-&amp;gt;&lt;/STRONG&gt;_dspi_dma_setparam(..) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_dspi_dma_setparam(...):&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;if ((params-&amp;gt;ATT &amp;amp; SPI_ATTR_TRANSFER_MODE_MASK != SPI_ATTR_MASTER_MODE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return SPI_ERROR_TRANSFER_MODE_INVALID;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;lt;---&amp;nbsp; I get here.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;1) Does MQX 4.2 support slave SPI dma transfers?&amp;nbsp;&amp;nbsp; if so, how?&lt;/P&gt;&lt;P&gt;2) Does "_io_spi_read_write(...) support slave DMA transfer?&lt;/P&gt;&lt;P&gt;3) Why doesn't&amp;nbsp; "_dspi_dma_setparam(..)" support slave mode transfers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 22:55:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423132#M14080</guid>
      <dc:creator>markkalior</dc:creator>
      <dc:date>2015-09-30T22:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423133#M14081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;If we look into &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;MQX&lt;/SPAN&gt; 4.2.0 Release Notes.pdf, on page 11 it states:&lt;/P&gt;&lt;P&gt;----------------- &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;SPI&lt;/SPAN&gt; I/O Driver&lt;/P&gt;&lt;P&gt;This driver supports the operation master mode. If enabled in user configuration, the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;SPI&lt;/SPAN&gt; device drivers are installed during the BSP startup code as “spi0:” (or “spiX:” where X is index of the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;SPI&lt;/SPAN&gt; module used). The &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;SPI&lt;/SPAN&gt; driver is significantly rewritten in the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;MQX&lt;/SPAN&gt; 4.0, so that there is no distinct interrupt or polled driver type. See I/O User Guide for details. On Kinetis and Vybrid platforms, the driver uses &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt; to function.&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;slave&lt;/SPAN&gt; mode, you can use one of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- ProcessorExpert bases &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;spi&lt;/SPAN&gt; driver&lt;/P&gt;&lt;P&gt;- spi_legacy driver (which is the one from &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;MQX&lt;/SPAN&gt; 3.8.1). Spi_legacy has &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;slave&lt;/SPAN&gt; mode. If you wish to use this one, you have to add the spi_legacy source files to the application or BSP build project.&lt;/P&gt;&lt;P&gt;- write your own driver for &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;spi&lt;/SPAN&gt; &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;slave&lt;/SPAN&gt; using direct accesses to DSPI module registers and call it from an &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;MQX&lt;/SPAN&gt; task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding DMA:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt; support in device drivers has been extended&lt;/P&gt;&lt;P&gt;- Introduced new &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt; device driver, supporting eDMA peripheral on Kinetis and Vybrid processor families&lt;/P&gt;&lt;P&gt;- The &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;SPI&lt;/SPAN&gt; device driver was updated to support the new &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt; driver&lt;/P&gt;&lt;P&gt;- The SAI and eSAI audio drivers support &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- eSDHC drivers were reworked to fully leverage the ADMA peripheral module&lt;/P&gt;&lt;P&gt;However please check the DSPI issues related to the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt; usage:&lt;/P&gt;&lt;P&gt;When the DSPI uses the eDMA, it may transfer data incorrectly or fail when eDMA is used for another purpose. If the DSPI driver is the only user of eDMA, it should operate correctly. This behavior is a result of the silicon design of the DSPI.&amp;nbsp; &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;DMA&lt;/SPAN&gt; usage can be disabled in the DSPI driver by redefining the macro BSPCFG_DSPIx_USE_DMA to 0 in user_config.h.&lt;/P&gt;&lt;P&gt;Please check more information at the next link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="2023" data-containertype="14" data-objectid="323538" data-objecttype="1" href="https://community.nxp.com/thread/323538"&gt;https://community.freescale.com/thread/323538&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Sol&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 19:22:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423133#M14081</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-10-01T19:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423134#M14082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I suspected.&amp;nbsp;&amp;nbsp; A bit surprised MQX doesn't support SPI Slave mode.&amp;nbsp;&amp;nbsp; Wish documented that up front, instead of finding out by trying it.&amp;nbsp;&amp;nbsp; It doesn't seem like Slave&amp;nbsp; support would be a major effort. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does MQX support I2C Slave mode?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 18:59:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423134#M14082</guid>
      <dc:creator>markkalior</dc:creator>
      <dc:date>2015-10-05T18:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423135#M14083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX provides a I2C driver, this driver supports the I2C interface in both master and slave mode. If enabled in user configuration, the I2C driver is&lt;/P&gt;&lt;P&gt;installed during the BSP startup code as the "i2cx" in polled mode and as the "ii2cx" in interrupt mode where "x" stands for a&lt;/P&gt;&lt;P&gt;specified I2C channel number). Example applications are provided in the MQX RTOS source tree for both master and slave&lt;/P&gt;&lt;P&gt;mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58728iA557B0B1C4A12AB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Sol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 21:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423135#M14083</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-10-06T21:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423136#M14084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soledad,&lt;/P&gt;&lt;P&gt;I the SPI slave available now or we have to go with the options you have given?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/markkalior"&gt;markkalior&lt;/A&gt;‌, have you been able to run your SPI slave? can you share any reference code?&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Sarma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 13:00:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423136#M14084</guid>
      <dc:creator>csmgsarma</dc:creator>
      <dc:date>2017-12-14T13:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423137#M14085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @soledad&lt;/P&gt;&lt;P&gt;I got PE code generated for SPI SLave and tested my hadware. Now I am trying to integrate this code to my main MQX application which is not using PE.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am looking for some references to import PE generated driver code(bare metal or MQX based) to an application without PE.&amp;nbsp; I have done a quick search in the lists and couldn't find anything useful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Sarma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2017 04:20:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423137#M14085</guid>
      <dc:creator>csmgsarma</dc:creator>
      <dc:date>2017-12-26T04:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423138#M14086</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/soledad"&gt;soledad&lt;/A&gt;‌/ NXP team,&lt;/P&gt;&lt;P&gt;Is there any documentation to integrate the PE generated codes to an already existing MQX application without PE?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Sarma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 04:48:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423138#M14086</guid>
      <dc:creator>csmgsarma</dc:creator>
      <dc:date>2018-01-02T04:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.2: slave spi read-write doesn't work</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423139#M14087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;HI&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="205563" data-objecttype="3" href="https://community.nxp.com/people/soledad" style="color: #5e89c1; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;soledad&lt;/A&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;/ NXP team,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I got the SPI0 slave driver tested with interrupt and polling modes. attached is the step wise reference. Hope this help as a workaround untill NXP releases a solution. The blog is here:&lt;BR /&gt;&lt;A href="https://community.nxp.com/community/uvp/projects-documentation/blog/2018/06/11/mqx-spi-slave-configuration"&gt;https://community.nxp.com/community/uvp/projects-documentation/blog/2018/06/11/mqx-spi-slave-configuration&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;PS: The document is not properly indented. Pardon the coding style.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best regards&lt;BR /&gt;Sarma&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 09:30:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-2-slave-spi-read-write-doesn-t-work/m-p/423139#M14087</guid>
      <dc:creator>csmgsarma</dc:creator>
      <dc:date>2018-03-05T09:30:26Z</dc:date>
    </item>
  </channel>
</rss>

