<?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 Getting DMAERR after first USB transmit in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Getting-DMAERR-after-first-USB-transmit/m-p/704353#M43247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing a USB audio device using a Kinetis K20D7 MCU. My application has an isochronous IN endpoint for transmitting sync data back to the host (which tells it how fast to send audio frames). The sync data&amp;nbsp;is stored in a uint32_t:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; uint32_t&lt;/SPAN&gt; usb_audio_sync_feedback = 786432; // 48 &amp;lt;&amp;lt; 14;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I have&amp;nbsp;2 buffer descriptor table entries, one for each of the TX buffers (odd and even). Each entry is identical and the following descriptor bits are set:&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;OWN = 1. Buffer is owned by USB-FS.&lt;/P&gt;&lt;P class=""&gt;KEEP = 1. USB-FS should not change ownership after a transaction - I&amp;nbsp;want the USB controller to read from the `usb_audio_sync_feedback` variable each time, without triggering an interrupt.&lt;/P&gt;&lt;P class=""&gt;NINC = 1. Don't increment the DMA address after each transaction.&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;And the address points to `usb_audio_sync_feedback`. Code:&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, EVEN)].&lt;SPAN class=""&gt;descriptor&lt;/SPAN&gt; = (3&amp;lt;&amp;lt;16) | BD_OWN_MASK | BD_KEEP_MASK | BD_NINC_MASK;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, EVEN)].&lt;/SPAN&gt;&lt;SPAN class=""&gt;address&lt;/SPAN&gt;&lt;SPAN class=""&gt; = &amp;amp;usb_audio_sync_feedback;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, ODD)].&lt;SPAN class=""&gt;descriptor&lt;/SPAN&gt; = (3&amp;lt;&amp;lt;16) | BD_OWN_MASK | BD_KEEP_MASK | BD_NINC_MASK;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, ODD)].&lt;/SPAN&gt;&lt;SPAN class=""&gt;address&lt;/SPAN&gt;&lt;SPAN class=""&gt; = &amp;amp;usb_audio_sync_feedback;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I expected the same value of 786432 to be sent on each transaction however only one IN transaction is processed correctly before I get an error interrupt with &lt;SPAN class=""&gt;USB0-&amp;gt;&lt;/SPAN&gt;ERRSTAT bit 5 set which corresponds to DMAERR.&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;This seems to indicate that the USB controller has requested DMA access to `usb_audio_sync_feedback` but has been unable to acquire it before the data was due to be sent.&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;What could be stopping the USB controller from getting DMA access?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2017 21:32:04 GMT</pubDate>
    <dc:creator>donturner</dc:creator>
    <dc:date>2017-09-14T21:32:04Z</dc:date>
    <item>
      <title>Getting DMAERR after first USB transmit</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Getting-DMAERR-after-first-USB-transmit/m-p/704353#M43247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing a USB audio device using a Kinetis K20D7 MCU. My application has an isochronous IN endpoint for transmitting sync data back to the host (which tells it how fast to send audio frames). The sync data&amp;nbsp;is stored in a uint32_t:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; uint32_t&lt;/SPAN&gt; usb_audio_sync_feedback = 786432; // 48 &amp;lt;&amp;lt; 14;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I have&amp;nbsp;2 buffer descriptor table entries, one for each of the TX buffers (odd and even). Each entry is identical and the following descriptor bits are set:&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;OWN = 1. Buffer is owned by USB-FS.&lt;/P&gt;&lt;P class=""&gt;KEEP = 1. USB-FS should not change ownership after a transaction - I&amp;nbsp;want the USB controller to read from the `usb_audio_sync_feedback` variable each time, without triggering an interrupt.&lt;/P&gt;&lt;P class=""&gt;NINC = 1. Don't increment the DMA address after each transaction.&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;And the address points to `usb_audio_sync_feedback`. Code:&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, EVEN)].&lt;SPAN class=""&gt;descriptor&lt;/SPAN&gt; = (3&amp;lt;&amp;lt;16) | BD_OWN_MASK | BD_KEEP_MASK | BD_NINC_MASK;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, EVEN)].&lt;/SPAN&gt;&lt;SPAN class=""&gt;address&lt;/SPAN&gt;&lt;SPAN class=""&gt; = &amp;amp;usb_audio_sync_feedback;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, ODD)].&lt;SPAN class=""&gt;descriptor&lt;/SPAN&gt; = (3&amp;lt;&amp;lt;16) | BD_OWN_MASK | BD_KEEP_MASK | BD_NINC_MASK;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; bdt[BDT_INDEX(1, TX, ODD)].&lt;/SPAN&gt;&lt;SPAN class=""&gt;address&lt;/SPAN&gt;&lt;SPAN class=""&gt; = &amp;amp;usb_audio_sync_feedback;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I expected the same value of 786432 to be sent on each transaction however only one IN transaction is processed correctly before I get an error interrupt with &lt;SPAN class=""&gt;USB0-&amp;gt;&lt;/SPAN&gt;ERRSTAT bit 5 set which corresponds to DMAERR.&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;This seems to indicate that the USB controller has requested DMA access to `usb_audio_sync_feedback` but has been unable to acquire it before the data was due to be sent.&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;What could be stopping the USB controller from getting DMA access?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 21:32:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Getting-DMAERR-after-first-USB-transmit/m-p/704353#M43247</guid>
      <dc:creator>donturner</dc:creator>
      <dc:date>2017-09-14T21:32:04Z</dc:date>
    </item>
  </channel>
</rss>

