<?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: Set K60 GPIO as SPI chip select with MQX 3.8 in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169947#M1857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I tested it. It seems we don't need to worry about it if we didn't change BSP. BSP sets and clears CS before and after write/read automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2012 23:25:52 GMT</pubDate>
    <dc:creator>Xuejian</dc:creator>
    <dc:date>2012-08-09T23:25:52Z</dc:date>
    <item>
      <title>Set K60 GPIO as SPI chip select with MQX 3.8</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169945#M1855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to connect several SPI devices to my K60. Now I'm testing with the K60N512 tower module.&lt;/P&gt;&lt;P&gt;With a single device attached to the board, I use the SPI2_CS1 signal as chip select, using&amp;nbsp;SPI_PUSHR_PCS(1 &amp;lt;&amp;lt; 1) as a parameter for IO_IOCTL_SPI_SET_CS command; in this way I define a default SPI2 chip select signals enable mask for the driver (only the CS set to '1' in the mask will be used by the driver. Am I right?)&lt;/P&gt;&lt;P&gt;Now I would like to use a simple GPIO as chip select (i.e., &lt;SPAN&gt;TWRPI_GPIO1 on PTB8,&amp;nbsp;&lt;SPAN&gt;TWRPI_GPIO2 on PTB9, ...).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Solution 1: don't set any CS for the SPI driver (using 0 as mask for&amp;nbsp;&lt;SPAN&gt;IO_IOCTL_SPI_SET_CS?) and drive the GPIO manually just before and after the SPI operation (GPIO=0 -&amp;gt; read/write SPI -&amp;gt; GPIO=1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Solution 2: set the GPIO as CS for the SPI driver. I want to use this one ... but how to do it?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;I've read &lt;A __default_attr="104038" class="jive_macro jive_macro_thread default_title" href="https://community.freescale.com/thread/104038" jivemacro="thread" title="this post"&gt;this post&lt;/A&gt;&amp;nbsp;that seems to use the second solution, but I didn't understand wery well various things (&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;how does the CS_MUX works? How to use it?)&lt;/P&gt;&lt;P&gt;Or maybe there's a simpler solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hint will be really appreciated!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 19:49:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169945#M1855</guid>
      <dc:creator>il_mix</dc:creator>
      <dc:date>2012-06-06T19:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set K60 GPIO as SPI chip select with MQX 3.8</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169946#M1856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same question. How to use IO_IOCTL_SPI_SET_CS in ioctl()? Seems no exact example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 23:00:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169946#M1856</guid>
      <dc:creator>Xuejian</dc:creator>
      <dc:date>2012-08-09T23:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set K60 GPIO as SPI chip select with MQX 3.8</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169947#M1857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I tested it. It seems we don't need to worry about it if we didn't change BSP. BSP sets and clears CS before and after write/read automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 23:25:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Set-K60-GPIO-as-SPI-chip-select-with-MQX-3-8/m-p/169947#M1857</guid>
      <dc:creator>Xuejian</dc:creator>
      <dc:date>2012-08-09T23:25:52Z</dc:date>
    </item>
  </channel>
</rss>

