<?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: Setup DMA for SPI to 1 Byte transfer in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933164#M54145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know that you have a high data rate for the file system it is logical to use the SDHC interface in the K64 rather than the DSPI interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are restricted in HW design and must use the DSPI (SD card in SPI mode), single byte transfers are possible in DMA mode using source and destination size of 1 byte in DMA_DCR (0x00120000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally a fie system works with 512 byte sectors and so most transfers will use 512 byte read/write bursts - a single byte DMA transfer is generally of no use since it will not be faster than a single DSP register write (with the setup overhead it will be slower). Also, file system access at the low level (single-medium) must be a blocking call (not allow other users to try to access the same medium before the initial access has completed). Since DMA transfer and a SW loop transfer will not have any timing difference (the SPI rate defines the speed - &lt;EM&gt;unless when the SW loop is interrupted by processor interrupts&lt;/EM&gt;) there is generally no significant speed advantage using DMA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Complete Kinetis solutions for faster/more efficient professional needs, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;i.MX RT project compatibility: &lt;A href="http://www.utasker.com/iMX.html" target="test_blank"&gt;http://www.utasker.com/iMX.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Kinetis K64:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-K64F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-K64F.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TWR-K64F120M.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TWR-K64F120M.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TEENSY_3.5.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TEENSY_3.5.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/Hexiwear-K64F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/Hexiwear-K64F.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;uTasker: supporting &amp;gt;1'000 registered Kinetis users get products faster and cheaper to market&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Request Free emergency remote desk-top consulting at &lt;A href="http://www.utasker.com/services.html" target="test_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Open Source version at &lt;A href="https://github.com/uTasker/uTasker-Kinetis" target="test_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.nxp.com/thread/512558" target="test_blank"&gt;https://community.nxp.com/thread/512558&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.nxp.com/thread/352862" target="test_blank"&gt;https://community.nxp.com/thread/352862&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.nxp.com/thread/498809" target="test_blank"&gt;https://community.nxp.com/thread/498809&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Oct 2019 11:17:46 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2019-10-20T11:17:46Z</dc:date>
    <item>
      <title>Setup DMA for SPI to 1 Byte transfer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933162#M54143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm Using a Kinetics K64 MCU. We are using a filesystem which is connected via SPI. There's a huge traffic going on in our filesystem therefore I'd like to use a DMA to transfer the data to the SPI periferal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However our filesystem can only handle 1 Byte transfer. The default SPI DMA Transfer mode is 2 Byte at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to change this?&lt;/P&gt;&lt;P&gt;I found this manual: &lt;A class="link-titled" href="https://www.nxp.com/docs/en/reference-manual/KSDK20APIRM.pdf" title="https://www.nxp.com/docs/en/reference-manual/KSDK20APIRM.pdf"&gt;https://www.nxp.com/docs/en/reference-manual/KSDK20APIRM.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chap 15.1 explains the DSPI controller. However i could not find an option to set the byte transfer rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give me a hint please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 13:15:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933162#M54143</guid>
      <dc:creator>jheni</dc:creator>
      <dc:date>2019-10-17T13:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Setup DMA for SPI to 1 Byte transfer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933163#M54144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Julian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please provide the version of the SDK you are working with. Also are you basing on an example from the SDK? If so, could you please tell me the name of the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sabina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2019 01:36:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933163#M54144</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-10-20T01:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Setup DMA for SPI to 1 Byte transfer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933164#M54145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know that you have a high data rate for the file system it is logical to use the SDHC interface in the K64 rather than the DSPI interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are restricted in HW design and must use the DSPI (SD card in SPI mode), single byte transfers are possible in DMA mode using source and destination size of 1 byte in DMA_DCR (0x00120000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally a fie system works with 512 byte sectors and so most transfers will use 512 byte read/write bursts - a single byte DMA transfer is generally of no use since it will not be faster than a single DSP register write (with the setup overhead it will be slower). Also, file system access at the low level (single-medium) must be a blocking call (not allow other users to try to access the same medium before the initial access has completed). Since DMA transfer and a SW loop transfer will not have any timing difference (the SPI rate defines the speed - &lt;EM&gt;unless when the SW loop is interrupted by processor interrupts&lt;/EM&gt;) there is generally no significant speed advantage using DMA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Complete Kinetis solutions for faster/more efficient professional needs, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;i.MX RT project compatibility: &lt;A href="http://www.utasker.com/iMX.html" target="test_blank"&gt;http://www.utasker.com/iMX.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Kinetis K64:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-K64F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-K64F.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TWR-K64F120M.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TWR-K64F120M.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TEENSY_3.5.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TEENSY_3.5.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/Hexiwear-K64F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/Hexiwear-K64F.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;uTasker: supporting &amp;gt;1'000 registered Kinetis users get products faster and cheaper to market&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Request Free emergency remote desk-top consulting at &lt;A href="http://www.utasker.com/services.html" target="test_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Open Source version at &lt;A href="https://github.com/uTasker/uTasker-Kinetis" target="test_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.nxp.com/thread/512558" target="test_blank"&gt;https://community.nxp.com/thread/512558&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.nxp.com/thread/352862" target="test_blank"&gt;https://community.nxp.com/thread/352862&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.nxp.com/thread/498809" target="test_blank"&gt;https://community.nxp.com/thread/498809&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Oct 2019 11:17:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Setup-DMA-for-SPI-to-1-Byte-transfer/m-p/933164#M54145</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-10-20T11:17:46Z</dc:date>
    </item>
  </channel>
</rss>

