<?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>Kinetis Software Development Kit中的主题 Re: SPI Master Transfer Timing Issue using fsl_spi (KSDK 1.2, KDS 3.0, FRDM-KL25Z)</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410874#M1867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how to share my project but if it helps to know there isn't anything else going on.&amp;nbsp; All I did was loop the transfer function to test the speed which is why both pointers are NULL.&amp;nbsp; If you don't care what you receive or send you can make both pointers NULL and changing that did not affect the loop speed.&amp;nbsp; I was able to initialize my SD card after upping the SPI clock to 375khz which reduced the time between transfers to about 60 us.&amp;nbsp; I just find it odd that I can't initialize with the slower speed even though I have verified it is indeed possible to initialize an SD card at 250khz using a different system.&amp;nbsp; I also can't explain why changing SPI clock from 250khz-&amp;gt;375khz changed the delay in the loop from 150 us -&amp;gt; 60 us.&amp;nbsp; Not sure if that is a bug or what, if I have more time I will compare my results to a bare metal setup but I would rather keep working with ksdk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2015 14:34:09 GMT</pubDate>
    <dc:creator>michaellyons</dc:creator>
    <dc:date>2015-07-15T14:34:09Z</dc:date>
    <item>
      <title>SPI Master Transfer Timing Issue using fsl_spi (KSDK 1.2, KDS 3.0, FRDM-KL25Z)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410872#M1865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to initialize an SD Card in SPI mode using the fsl_spi module but I am having an issue with how fast I can complete multiple, single-byte transfers.&amp;nbsp; Below is my test code to see the delay between individual single byte transfers.&amp;nbsp; Spi clock is 250khz.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while(1)&amp;nbsp;&amp;nbsp;&amp;nbsp; SPI_DRV_MasterTransferBlocking(FSL_SPICOM1, &amp;amp;spiCom1_MasterConfig0, NULL, NULL ,1, 10);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I look at the output on my logic analyzer I see a 156 us delay between consecutive transfers even though I am just repeating the same instruction.&amp;nbsp; See analyzer snapshot below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="50857_50857.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120480iE8E5D06B2FA26FEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="50857_50857.png" alt="50857_50857.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54976iBEF321C3678B9C09/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I believe this long delay between transfers might be causing issue in my SD card initialization as I have tested the same hardware with different code on another setup and I have no issue with the SD hardware itself.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions is: is this how the fsl_spi module is supposed to operate or is there a way to implement consecutive single-byte transfers quicker?&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;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 23:03:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410872#M1865</guid>
      <dc:creator>michaellyons</dc:creator>
      <dc:date>2015-07-14T23:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Master Transfer Timing Issue using fsl_spi (KSDK 1.2, KDS 3.0, FRDM-KL25Z)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410873#M1866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to share your project for a review? Thanks! BTW, why did you set send buffer and receive buffer both NULL? didn't you mean to send or receive some data?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Freescale Technical Support&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>Wed, 15 Jul 2015 06:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410873#M1866</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2015-07-15T06:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Master Transfer Timing Issue using fsl_spi (KSDK 1.2, KDS 3.0, FRDM-KL25Z)</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410874#M1867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how to share my project but if it helps to know there isn't anything else going on.&amp;nbsp; All I did was loop the transfer function to test the speed which is why both pointers are NULL.&amp;nbsp; If you don't care what you receive or send you can make both pointers NULL and changing that did not affect the loop speed.&amp;nbsp; I was able to initialize my SD card after upping the SPI clock to 375khz which reduced the time between transfers to about 60 us.&amp;nbsp; I just find it odd that I can't initialize with the slower speed even though I have verified it is indeed possible to initialize an SD card at 250khz using a different system.&amp;nbsp; I also can't explain why changing SPI clock from 250khz-&amp;gt;375khz changed the delay in the loop from 150 us -&amp;gt; 60 us.&amp;nbsp; Not sure if that is a bug or what, if I have more time I will compare my results to a bare metal setup but I would rather keep working with ksdk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 14:34:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/SPI-Master-Transfer-Timing-Issue-using-fsl-spi-KSDK-1-2-KDS-3-0/m-p/410874#M1867</guid>
      <dc:creator>michaellyons</dc:creator>
      <dc:date>2015-07-15T14:34:09Z</dc:date>
    </item>
  </channel>
</rss>

