<?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: Using DMA how to Transfer ADC value to PWM channel? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-DMA-how-to-Transfer-ADC-value-to-PWM-channel/m-p/309455#M13269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From you description, when there add DMA transfer, the application could not run.&lt;/P&gt;&lt;P&gt;We need to check DMA TCD setting if correct, it use DMA minor loop to transfer 2 bytes data from ADC result register to FTM CnV register and the Major loop is 0x80.&lt;/P&gt;&lt;P&gt;Please set a breakpoint after code run over da = DMA1_Init(NULL); and check DMA registers value.&lt;/P&gt;&lt;P&gt;Please check if TCDn_NBYTES is 0x2 and TCDn_CITER eqaual with TCDn_BITER value to 0x80.&lt;/P&gt;&lt;P&gt;You also could check after ADC start work and DMA CITER register value if modified or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please pay attention that for FTM CnV register update isn't immedicately when new value write into CnV register.&lt;/P&gt;&lt;P&gt;When CLKS[1:0] ≠ 0:0 and 0:0, and FTMEN = 0,&amp;nbsp; If the selected mode is EPWM, then CnV register is updated after CnV register was written and the FTM counter changes from MOD to CNTIN.&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>Thu, 08 May 2014 04:01:50 GMT</pubDate>
    <dc:creator>Hui_Ma</dc:creator>
    <dc:date>2014-05-08T04:01:50Z</dc:date>
    <item>
      <title>Using DMA how to Transfer ADC value to PWM channel?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-DMA-how-to-Transfer-ADC-value-to-PWM-channel/m-p/309454#M13268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using FRDM-K20D50M board with codewarrior10.5. I am using PE to generate code. I have written the following code but it is not working. According to me I think there is some minor error which I am not able to find out. I have gone through the app note &lt;STRONG&gt;AN4631. In&lt;/STRONG&gt; FRDM board I have connected a potentiometer at &lt;STRONG&gt;ADC0_DM0&lt;/STRONG&gt; and by default the Green LED is connected to&amp;nbsp; &lt;STRONG&gt;PTD4 FTM0 CH4&lt;/STRONG&gt; . On rotating the potentiometer, the voltage changes from 0 to 3.3v. In the code works fine when not using DMA. Please look into the matter&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Amit Kumar&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-337442"&gt;FRDM-K20-DMA-RGB.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2014 12:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-DMA-how-to-Transfer-ADC-value-to-PWM-channel/m-p/309454#M13268</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-05-03T12:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using DMA how to Transfer ADC value to PWM channel?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-DMA-how-to-Transfer-ADC-value-to-PWM-channel/m-p/309455#M13269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From you description, when there add DMA transfer, the application could not run.&lt;/P&gt;&lt;P&gt;We need to check DMA TCD setting if correct, it use DMA minor loop to transfer 2 bytes data from ADC result register to FTM CnV register and the Major loop is 0x80.&lt;/P&gt;&lt;P&gt;Please set a breakpoint after code run over da = DMA1_Init(NULL); and check DMA registers value.&lt;/P&gt;&lt;P&gt;Please check if TCDn_NBYTES is 0x2 and TCDn_CITER eqaual with TCDn_BITER value to 0x80.&lt;/P&gt;&lt;P&gt;You also could check after ADC start work and DMA CITER register value if modified or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please pay attention that for FTM CnV register update isn't immedicately when new value write into CnV register.&lt;/P&gt;&lt;P&gt;When CLKS[1:0] ≠ 0:0 and 0:0, and FTMEN = 0,&amp;nbsp; If the selected mode is EPWM, then CnV register is updated after CnV register was written and the FTM counter changes from MOD to CNTIN.&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>Thu, 08 May 2014 04:01:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-DMA-how-to-Transfer-ADC-value-to-PWM-channel/m-p/309455#M13269</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-05-08T04:01:50Z</dc:date>
    </item>
  </channel>
</rss>

