<?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 Microcontrollers中的主题 DMA priority problem Kinetis K2x</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-priority-problem-Kinetis-K2x/m-p/438418#M25628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I'm having problems with setting up priorities for various DMA channels, using DMA0 for display via flexbus, and DMA4 and DMA5 for speaker output via FTM2. I have custom board with Kinetis K20.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;DMA0 is configured to transmit data from external RAM to display controller, DMA4 is for positive and DMA5 is for negative output of speaker. All is working well, but there is a problem, when data transfer for all DMA channels is triggered simultaneously. In our case is when new screen is loaded and playing sound. When this happens, new screen data loading on LCD display is visually OK, but sound is distorted, you can hear little pauses in between when sound is playing. When only speaker-dedicated DMA channels (DMA4 and DMA4) are running, sound is clear.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Sound bitrate is 22050 byte/s.&amp;nbsp; One screen transition takes about 20 ms.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I set DMA priorities, but there is no difference:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA0 priority is set&amp;nbsp; so can be temporarily suspended by higher priority channel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Consolas; font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;DMA_DCHPRI0 =&amp;nbsp; DMA_DCHPRI0_ECP_MASK;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US"&gt;DMA4 and DMA5 are set so can temporarily suspend any lower priority channel (no need to add flags to their registers)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Like I said before, there is no difference when I set DMA0 suspension ability, sound is still distorted. What am I doing wrong? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Klemen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2015 13:22:50 GMT</pubDate>
    <dc:creator>klemeniskra</dc:creator>
    <dc:date>2015-04-23T13:22:50Z</dc:date>
    <item>
      <title>DMA priority problem Kinetis K2x</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-priority-problem-Kinetis-K2x/m-p/438418#M25628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I'm having problems with setting up priorities for various DMA channels, using DMA0 for display via flexbus, and DMA4 and DMA5 for speaker output via FTM2. I have custom board with Kinetis K20.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;DMA0 is configured to transmit data from external RAM to display controller, DMA4 is for positive and DMA5 is for negative output of speaker. All is working well, but there is a problem, when data transfer for all DMA channels is triggered simultaneously. In our case is when new screen is loaded and playing sound. When this happens, new screen data loading on LCD display is visually OK, but sound is distorted, you can hear little pauses in between when sound is playing. When only speaker-dedicated DMA channels (DMA4 and DMA4) are running, sound is clear.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Sound bitrate is 22050 byte/s.&amp;nbsp; One screen transition takes about 20 ms.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I set DMA priorities, but there is no difference:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA0 priority is set&amp;nbsp; so can be temporarily suspended by higher priority channel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Consolas; font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;DMA_DCHPRI0 =&amp;nbsp; DMA_DCHPRI0_ECP_MASK;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US"&gt;DMA4 and DMA5 are set so can temporarily suspend any lower priority channel (no need to add flags to their registers)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Like I said before, there is no difference when I set DMA0 suspension ability, sound is still distorted. What am I doing wrong? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Klemen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 13:22:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-priority-problem-Kinetis-K2x/m-p/438418#M25628</guid>
      <dc:creator>klemeniskra</dc:creator>
      <dc:date>2015-04-23T13:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: DMA priority problem Kinetis K2x</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-priority-problem-Kinetis-K2x/m-p/438419#M25629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Klemen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the DMA priority setting, there without any problem for related register setting (DMA0/DMA4/DMA5).&lt;/P&gt;&lt;P&gt;The DMA priority is one part could affect the LCD display and audio sounds, customer also need to consider the other part, such as LCD related DMA channel and audio DMA channel related interrupt. &lt;/P&gt;&lt;P&gt;For the DMA channels related interrupt priority also could affect the DMA trigger could be response frequently or not. &lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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 Apr 2015 03:41:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/DMA-priority-problem-Kinetis-K2x/m-p/438419#M25629</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-04-27T03:41:57Z</dc:date>
    </item>
  </channel>
</rss>

