<?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: pwm using dma transfer datas to cnv in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231384#M5035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it is looking like you are faceing an errata. It is not clear what device with what silicon mask you are using. Therefore, please check silicon mask errata for the device you are using. Or just simply try to trigger DMA request by another source (another FTM module etc.).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 May 2013 14:23:48 GMT</pubDate>
    <dc:creator>rastislav_pavlanin</dc:creator>
    <dc:date>2013-05-09T14:23:48Z</dc:date>
    <item>
      <title>pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231383#M5034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone ,I have this problem for several days and still no solution.&lt;/P&gt;&lt;P&gt;I want to send data to the PWM module's C0V register to change its duty cycle by enable the DMA.&lt;/P&gt;&lt;P&gt;But I really don't know what's wrong with my code .It seems that the DMA transmission is failed because the value of C0V&amp;nbsp; is always 0.&lt;/P&gt;&lt;P&gt;I have succeed in generating pwm by updating the C0V through the MPU,like below:&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; FTM0_C0V = pwm1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FTM0_PWMLOAD |= FTM_PWMLOAD_LDOK_MASK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I've also succeed in transfering datas from memory to memory by using DMA.But it never works when I connect the DMA to PWM register.&lt;/P&gt;&lt;P&gt;By the way ,I'm using the DMA in periodic trigger mode,and I think I have configured the PIT module right.&lt;/P&gt;&lt;P&gt;My code are as follows:&lt;/P&gt;&lt;P&gt;//dma.c&lt;/P&gt;&lt;P&gt;/***channel init***/&lt;/P&gt;&lt;P&gt;void DMAinit(int chno,int sourceno)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC6 |= SIM_SCGC6_DMAMUX_MASK; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_SERQ|=DMA_SERQ_SERQ(chno) ;//enable the source&amp;nbsp; chno&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMAMUX_CHCFG(chno)=(DMAMUX_CHCFG_ENBL_MASK | DMAMUX_CHCFG_SOURCE(sourceno));//enable dma channel chno，&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMAMUX_CHCFG(chno)|=DMAMUX_CHCFG_TRIG_MASK;//enable the periodic trigger&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;//DMA controler setting&lt;/P&gt;&lt;P&gt;void DMAset(uint32 *source_addr,uint32 *destiny_address,char sbits,char dbits,char nbytes,char chno,uint16 majorinter )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8 i;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i =chno ;//DMA&amp;nbsp; number of channel&lt;/P&gt;&lt;P&gt;&amp;nbsp; SIM_SCGC7 |= SIM_SCGC7_DMA_MASK; //enable DMA clock&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_SADDR(i) = (uint32)source_addr;//DMA source address&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DADDR(i) = (uint32)destiny_address;//DMA destiny address&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_NBYTES_MLNO(i)&amp;nbsp; =2;//minor loop&amp;nbsp; nbytes&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_ATTR(i)= (DMA_ATTR_SSIZE(sbits)|DMA_ATTR_DSIZE(dbits)) ;//source and dest bits&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_SOFF(i) =0x2; //source address offset after each transfer&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DOFF(i)=0x0;/source address offset after each transfer&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_SLAST(i) = -nbytes;&amp;nbsp;&amp;nbsp; //adjust the source address to the original address&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DLAST_SGA(i) = -nbytes;&amp;nbsp;&amp;nbsp;&amp;nbsp; /adjust the destiny address to the original address&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_CITER_ELINKNO(i) =DMA_CITER_ELINKNO_CITER( majorinter);//current major loop counts&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_BITER_ELINKNO(i) = DMA_BITER_ELINKNO_BITER(majorinter);//beginning major loop counts&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_CSR(i)|=DMA_CSR_BWC(3);//bandwidth control&lt;/P&gt;&lt;P&gt;&amp;nbsp; //DMA_CSR(i)|=DMA_CSR_INTMAJOR_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_CSR(i)|=DMA_CSR_START_MASK;//soft start&lt;/P&gt;&lt;P&gt;&amp;nbsp; //DMA_SERQ|=DMA_SERQ_SERQ(chno) ;//enable hardware request&amp;nbsp; chno (have done in the DMAinit)&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;//main.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitPWM(); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hw_pit_init(PIT1,0x249f00);//set the timeout of PIT1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMAinit(1,ftm0ch0_dmasc);//&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMAset(pwmdata,(uint32)&amp;amp;FTM0_C0V,1,1,buflength*2,1,30);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 09:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231383#M5034</guid>
      <dc:creator>fugrace</dc:creator>
      <dc:date>2013-05-09T09:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231384#M5035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it is looking like you are faceing an errata. It is not clear what device with what silicon mask you are using. Therefore, please check silicon mask errata for the device you are using. Or just simply try to trigger DMA request by another source (another FTM module etc.).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 14:23:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231384#M5035</guid>
      <dc:creator>rastislav_pavlanin</dc:creator>
      <dc:date>2013-05-09T14:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231385#M5036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you ,I'm using K10,but I don't know what you mean by 'errata',I can't find it.Can you give me more direction? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 02:55:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231385#M5036</guid>
      <dc:creator>fugrace</dc:creator>
      <dc:date>2013-05-10T02:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231386#M5037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;errata in general is a document which inludes description of all bugs (not correctly working parts) of device. In Kinetis case it describes all bugs for specified silicon mask. You can find the silicon mask on the chip directly under device name MK10.... (e.g. 2N22 can be silicin mask). After visit our freescale sites and search for kinetis K10 errata.&lt;/P&gt;&lt;P&gt;For example here you can find something:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.freescale.com/webapp/search/Serp.jsp?QueryText=kinetis+K10+errata&amp;amp;assetIdResult=&amp;amp;fsrch=1&amp;amp;sessionChecker=1Qx8RMQDwv8Kx7kYhhTymxYcBg1NM6nCxh42y82yvcpNnzFFzph0!1678843014!1368166467968&amp;amp;attempt=0&amp;amp;showCustomCollateral=false&amp;amp;RELEVANCE=true&amp;amp;Documentation=Documentation%2F10510Ksd9lL%60%60Errata&amp;amp;fromTrng=false&amp;amp;showAllCategories=false&amp;amp;fromMobile=false&amp;amp;isResult=false&amp;amp;isFromFlex=false&amp;amp;isTree=false&amp;amp;fromASP=false&amp;amp;isAdvanceSearch=false&amp;amp;getTree=false&amp;amp;fromPSP=false&amp;amp;lastQueryText=K10+errata&amp;amp;SelectedAsset=Documentation&amp;amp;iteration=3&amp;amp;assetLocked=false&amp;amp;assetLockedForNavigation=false&amp;amp;fromCust=false&amp;amp;getFilter=false&amp;amp;fromDAP=false&amp;amp;fromWebPages=false&amp;amp;getResult=false&amp;amp;isComparison=false" title="https://www.freescale.com/webapp/search/Serp.jsp?QueryText=kinetis+K10+errata&amp;amp;assetIdResult=&amp;amp;fsrch=1&amp;amp;sessionChecker=1Qx8RMQDwv8Kx7kYhhTymxYcBg1NM6nCxh42y82yvcpNnzFFzph0!1678843014!1368166467968&amp;amp;attempt=0&amp;amp;showCustomCollateral=false&amp;amp;RELEVANCE=true&amp;amp;Documentation=Documentation%2F10510Ksd9lL%60%60Errata&amp;amp;fromTrng=false&amp;amp;showAllCategories=false&amp;amp;fromMobile=false&amp;amp;isResult=false&amp;amp;isFromFlex=false&amp;amp;isTree=false&amp;amp;fromASP=false&amp;amp;isAdvanceSearch=false&amp;amp;getTree=false&amp;amp;fromPSP=false&amp;amp;lastQueryText=K10+errata&amp;amp;SelectedAsset=Documentation&amp;amp;iteration=3&amp;amp;assetLocked=false&amp;amp;assetLockedForNavigation=false&amp;amp;fromCust=false&amp;amp;getFilter=false&amp;amp;fromDAP=false&amp;amp;fromWebPages=false&amp;amp;getResult=false&amp;amp;isComparison=false"&gt;Freescale Search&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 06:30:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231386#M5037</guid>
      <dc:creator>rastislav_pavlanin</dc:creator>
      <dc:date>2013-05-10T06:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231387#M5038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Grace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked your code. I think I need to confirm something with you. As you mentioned, it seems that you tested two DMA function. One is FTM0 channel0 and the other is PIT. In your first testing, I cannot find FTM0 channel0 intial code. So please make sure that you enable DMA function in your FTM control register. For example, you need to set bit DMA in FTM0_C0SC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your second PIT testing, I find that your ciode seems still use FTM0 channel0 in your DMA setting. If my understanding on your testing is incorrect, please correct me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my reply can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 08:30:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231387#M5038</guid>
      <dc:creator>Paul_Tian</dc:creator>
      <dc:date>2013-05-10T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231388#M5039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Paul&lt;/P&gt;&lt;P&gt;Thanks so much for checking my code so carefully.But I really have to say sorry .Because when I restart my job today(and that's why I reply late.) I finally found there's no problem with my code,it's just because the DMA transfer is so fast that I can only see the finally result : 0,and that's the same value when the CnV begins.When I changed the value ,I can see the right result now. And now I'm working on how to slow down the DMA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grace&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 07:33:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231388#M5039</guid>
      <dc:creator>fugrace</dc:creator>
      <dc:date>2013-05-13T07:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231389#M5040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you ,it's useful for my later work.Though now I've checked it's not the problem of my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 07:36:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231389#M5040</guid>
      <dc:creator>fugrace</dc:creator>
      <dc:date>2013-05-13T07:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: pwm using dma transfer datas to cnv</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231390#M5041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Thank you so much that now I really find your suggestion lead me to the finally result!&lt;/P&gt;&lt;P&gt;It is an errta&lt;/P&gt;&lt;P&gt;e4588: DMAMUX: When using PIT with "always enabled" request, DMA request does&lt;/P&gt;&lt;P&gt;not deassert correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyway,after many efforts I solved the PIT problem.now it works with DMA.&lt;/P&gt;&lt;P&gt;but still I have another problem, I guess you can give me a hand again. The DMA destination value doesn't&lt;/P&gt;&lt;P&gt;change although it enters into the DMA interrupt at the first three times.later it works well .then it drops the first three values&lt;/P&gt;&lt;P&gt;I want to send. Any suggestion?&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 14:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pwm-using-dma-transfer-datas-to-cnv/m-p/231390#M5041</guid>
      <dc:creator>fugrace</dc:creator>
      <dc:date>2013-05-13T14:47:27Z</dc:date>
    </item>
  </channel>
</rss>

