<?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 Kinetis K60 SPI Weird Behavior in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570803#M34092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I am using TWR-K60N512, with PK60DN512Z VMD10 chip. I am trying to set up the SPI module to communicate with Adis16362 IMU &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.analog.com%2Fmedia%2Fen%2Ftechnical-documentation%2Fdata-sheets%2FADIS16362.pdf" rel="nofollow" target="_blank"&gt;http://www.analog.com/media/en/technical-documentation/data-sheets/ADIS16362.pdf&lt;/A&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; ),&lt;/SPAN&gt; which uses SPI mode 3, CPOL = 1, CPHA = 1. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to read output data such as supply voltage, product ID, accelerometer measurements!&amp;nbsp; HOWEVER, it only works the first time after a USB plug cycle, so it outputs nothing if I were to reflash the code again without doing a USB plug cycle first. Sometimes, it still outputs nothing anyway... &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how I can troubleshoot this? I have attached my code.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337404"&gt;SPI.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jun 2016 17:12:16 GMT</pubDate>
    <dc:creator>broccolee</dc:creator>
    <dc:date>2016-06-24T17:12:16Z</dc:date>
    <item>
      <title>Kinetis K60 SPI Weird Behavior</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570803#M34092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I am using TWR-K60N512, with PK60DN512Z VMD10 chip. I am trying to set up the SPI module to communicate with Adis16362 IMU &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.analog.com%2Fmedia%2Fen%2Ftechnical-documentation%2Fdata-sheets%2FADIS16362.pdf" rel="nofollow" target="_blank"&gt;http://www.analog.com/media/en/technical-documentation/data-sheets/ADIS16362.pdf&lt;/A&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; ),&lt;/SPAN&gt; which uses SPI mode 3, CPOL = 1, CPHA = 1. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to read output data such as supply voltage, product ID, accelerometer measurements!&amp;nbsp; HOWEVER, it only works the first time after a USB plug cycle, so it outputs nothing if I were to reflash the code again without doing a USB plug cycle first. Sometimes, it still outputs nothing anyway... &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how I can troubleshoot this? I have attached my code.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337404"&gt;SPI.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 17:12:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570803#M34092</guid>
      <dc:creator>broccolee</dc:creator>
      <dc:date>2016-06-24T17:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K60 SPI Weird Behavior</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570804#M34093</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;From you attached code, there only with one line at SPI_START_TRANSFER() function to clear SPI2_SR [EOQF] flag need be modified to:&lt;/P&gt;&lt;P&gt;SPI2_SR |= SPI_SR_EOQF_MASK ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the ADIS16362 datasheet, the SPI communication clock Max. is 2MHz. Please check the K60 SPI clock frequency if match with ADIS16362 requirement.&lt;/P&gt;&lt;P&gt;And I would recommend to use a SPI analyzer to check the SPI communication signals if there with any timing issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&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>Mon, 27 Jun 2016 08:53:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570804#M34093</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2016-06-27T08:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K60 SPI Weird Behavior</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570805#M34094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I got it working already.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2016 04:06:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K60-SPI-Weird-Behavior/m-p/570805#M34094</guid>
      <dc:creator>broccolee</dc:creator>
      <dc:date>2016-06-28T04:06:18Z</dc:date>
    </item>
  </channel>
</rss>

