<?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: SPI0 fail with Framesize = 16 in Vybrid Processors</title>
    <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252089#M1048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2013 20:07:54 GMT</pubDate>
    <dc:creator>karina_valencia</dc:creator>
    <dc:date>2013-12-11T20:07:54Z</dc:date>
    <item>
      <title>SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252086#M1045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to set my SPI0 to 16 bits through:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;// Framesize = 16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;param = 16;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;printf ("Changing the Framesize to %d bits ... ", param);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if (SPI_OK == ioctl (spifd, IO_IOCTL_SPI_SET_FRAMESIZE, &amp;amp;param))&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;printf ("OK\n");&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;else&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;printf ("ERROR\n");&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The procedure is accepted and I receive an OK and read 16 when a GET_FRAMESIZE is issued.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is I cannot write at the device; it always returns error, only with 16 bits, if 8 is set, it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I work with SPI in 16 bits?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you...&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BrunoCastelucci"&gt;BrunoCastelucci&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 16:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252086#M1045</guid>
      <dc:creator>sandrobastos</dc:creator>
      <dc:date>2013-12-09T16:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252087#M1046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/juangutierrez"&gt;juangutierrez&lt;/A&gt; please review&amp;nbsp; this&amp;nbsp; case and provide follow up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 19:24:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252087#M1046</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2013-12-11T19:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252088#M1047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this Linux or MQX?&lt;/P&gt;&lt;P&gt;Are both slave and master devices configured for 16bits?&lt;/P&gt;&lt;P&gt;Is it possible to share your application test and a way to test it in our side?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 19:57:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252088#M1047</guid>
      <dc:creator>juangutierrez</dc:creator>
      <dc:date>2013-12-11T19:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252089#M1048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 20:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252089#M1048</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2013-12-11T20:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252090#M1049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post which function are you calling for writing to the device and what kind of error you get, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 22:13:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252090#M1049</guid>
      <dc:creator>juangutierrez</dc:creator>
      <dc:date>2013-12-11T22:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252091#M1050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;I'm using MQX. Yes, the slave is 16 bits; it's an LCD display.&lt;/P&gt;&lt;P&gt;I'm using 'fputc(data, spifd)' to write the data and, when configured to 16 bits, I get an IO_ERROR (-1) and nothing happens on the SDA, SCL, lines.&lt;/P&gt;&lt;P&gt;The fputc() enables de CS to the device and 'fflush()' disables it.&lt;/P&gt;&lt;P&gt;I solved the problem by sending two bytes (2 x fputc()) and then 'fflush()', this way the CS is only disabled after 16 bits is transmitted.&lt;/P&gt;&lt;P&gt;Anyway, I think the SPI should work fine at 16 bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 09:43:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252091#M1050</guid>
      <dc:creator>sandrobastos</dc:creator>
      <dc:date>2013-12-12T09:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252092#M1051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to hear you get it working.&lt;/P&gt;&lt;P&gt;Not sure, but the error might be because the fputc is intended for writing just one character (1 byte) to the stream.&lt;/P&gt;&lt;P&gt;Maybe you want to try using fputs instead, and sending a two-character string.&lt;/P&gt;&lt;P&gt;Let us know if that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;juan gutierrez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 16:14:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252092#M1051</guid>
      <dc:creator>juangutierrez</dc:creator>
      <dc:date>2013-12-12T16:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: SPI0 fail with Framesize = 16</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252093#M1052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right, I changed fputc by fwrite and it's working fine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 16:39:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/SPI0-fail-with-Framesize-16/m-p/252093#M1052</guid>
      <dc:creator>sandrobastos</dc:creator>
      <dc:date>2013-12-12T16:39:43Z</dc:date>
    </item>
  </channel>
</rss>

