<?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 Software Development Kit中的主题 Re: KL25Z -DMA triggered by ADC (and ADC with Hardware trigger using pit) and DMA triggered by PIT to use DAC.</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL25Z-DMA-triggered-by-ADC-and-ADC-with-Hardware-trigger-using/m-p/769879#M7786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Ofir Yaish&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, I would like to recommend you using our SDK software packages, your project seams to be based in a CodeWarrior IDE (which is not supported in SDK) but you could use it as a reference for your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked your code, I don't see any problem with it, just as a comment, please remember that everything data used with DMA must be aligned, so please be sure to have them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the clocks information, we recommend our online page for some presentations and weibinar trainings.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/training-events/online-training:ON_DEMAND_TRNG" title="https://www.nxp.com/support/training-events/online-training:ON_DEMAND_TRNG"&gt;Online Training|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jorge Alcala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 May 2018 17:12:32 GMT</pubDate>
    <dc:creator>jorge_a_vazquez</dc:creator>
    <dc:date>2018-05-11T17:12:32Z</dc:date>
    <item>
      <title>KL25Z -DMA triggered by ADC (and ADC with Hardware trigger using pit) and DMA triggered by PIT to use DAC.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL25Z-DMA-triggered-by-ADC-and-ADC-with-Hardware-trigger-using/m-p/769878#M7785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="direction: ltr;"&gt;hey,&lt;BR /&gt;I wrote (some parts were taken from an example from this site) a code that should take sampling using ADC. I made the ADC with singel converter each time that will be triggered by&amp;nbsp;Hardware trigger using pit. after each sampling i fill an array with the results using DMA which is channeled to the ADC.&lt;BR /&gt;after sampling, using Port B6 interrupt, I initial DMA &lt;SPAN&gt;CH1&amp;nbsp;&lt;/SPAN&gt;1 so that it will be always on and triggered by PIT CH1 in order to move the values in the Array to the DAC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="direction: ltr;"&gt;I'm adding the code to your convenience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="direction: ltr;"&gt;I got couple of problem&amp;nbsp; (which I managed to solve with unwanted detours):&lt;BR /&gt;&lt;STRONG&gt;**all tests were made using DEBUG mode&lt;/STRONG&gt;&lt;BR /&gt;1) With the ADC sampling- somehow when setting the PIT clock for the ADC HW trigger with short periode such as&amp;nbsp; PIT_LDVAL0 = 0x000C350 (should be around 5ms) the DMA fills the first place in the array and then stops to to fill it, even though it's reaching out the DMA interrupt.&lt;BR /&gt;&lt;STRONG&gt;unwanted solve: &lt;/STRONG&gt;set&lt;STRONG&gt;&amp;nbsp;DMA_DSR_BCR0 = DMA_DSR_BCR_BCR(2048); &lt;/STRONG&gt;instead of setting&lt;STRONG&gt;&amp;nbsp;DMA_DSR_BCR0 = DMA_DSR_BCR_BCR(2);&amp;nbsp; &lt;/STRONG&gt;which means that it will not return to the CPU until it finish to move all 2048 bytes- fill all array.&amp;nbsp;&lt;STRONG&gt;of course that when setting the long PIT&amp;nbsp; periode it works even with&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;DMA_DSR_BCR0 =&lt;/STRONG&gt;&lt;/STRONG&gt; DMA_DSR_BCR_BCR(2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="direction: ltr;"&gt;2) with DAC using DMA- I set PIT chanel 1 and DMA0&amp;nbsp;&lt;SPAN&gt;chanel 1 to trigger with the PIT. my problem that the DMA is delivering nothing to the DAC even though it's entering the DMA1 interrupt (which means that it's working fine with the PIT trigger). this time even if I set the PIT_LDVAL1 very large, it's doing the same.&lt;BR /&gt;&lt;STRONG&gt;unwanted&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;solve:&amp;nbsp;&lt;/STRONG&gt;set a in problem 1&amp;nbsp;&lt;STRONG&gt;DMA_DSR_BCR1 = DMA_DSR_BCR_BCR(2048);&amp;nbsp;&lt;SPAN style="font-weight: 400;"&gt;instead of setting&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp;DMA_DSR_BCR1 = DMA_DSR_BCR_BCR(2);&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;I really don't know what made it work this time, but with this I get a periodic signal in the output of Port E30 of the DAC.&lt;BR /&gt;&lt;BR /&gt;another question: can you please address me to a place which I can learn how to set the clocks of the core, bus and&amp;nbsp;&lt;SPAN style="color: #3e3e3e; background-color: #ffffff; font-size: 16px;"&gt;et.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;thank you&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 22:11:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL25Z-DMA-triggered-by-ADC-and-ADC-with-Hardware-trigger-using/m-p/769878#M7785</guid>
      <dc:creator>ofiryaish</dc:creator>
      <dc:date>2018-04-25T22:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z -DMA triggered by ADC (and ADC with Hardware trigger using pit) and DMA triggered by PIT to use DAC.</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL25Z-DMA-triggered-by-ADC-and-ADC-with-Hardware-trigger-using/m-p/769879#M7786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Ofir Yaish&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, I would like to recommend you using our SDK software packages, your project seams to be based in a CodeWarrior IDE (which is not supported in SDK) but you could use it as a reference for your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked your code, I don't see any problem with it, just as a comment, please remember that everything data used with DMA must be aligned, so please be sure to have them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the clocks information, we recommend our online page for some presentations and weibinar trainings.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/training-events/online-training:ON_DEMAND_TRNG" title="https://www.nxp.com/support/training-events/online-training:ON_DEMAND_TRNG"&gt;Online Training|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jorge Alcala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 17:12:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KL25Z-DMA-triggered-by-ADC-and-ADC-with-Hardware-trigger-using/m-p/769879#M7786</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2018-05-11T17:12:32Z</dc:date>
    </item>
  </channel>
</rss>

