<?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のトピックRe: kinetis KL05 DMA based ADC triggering</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388458#M21028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;I've checked your code again and I found that I missed the DMA_DCR0[CS] before.&lt;/P&gt;&lt;P&gt;Just like you mentioned, the DMA_DCR0[CS] can enable a single data transfer per DMA request when DMA_DCR0[CS] is asserted.&lt;/P&gt;&lt;P&gt;Now how's going on about your issue?&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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, 23 Mar 2015 00:31:09 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2015-03-23T00:31:09Z</dc:date>
    <item>
      <title>kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388448#M21018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working on a BLDC motor control project based on a KL05Z32 MCU. The application needs ADC sampling at a rate of 100kSamples/second.&lt;/P&gt;&lt;P&gt;I have built a solution based on chaining the PIT, DMA and the ADC. The PIT is running at 100kHz, it triggers DMA channel 0 to load one of 4 different configurations from a buffer to the SC1A register of ADC0. This starts the ADC conversion. The result of the measurement is placed in a buffer by another DMA channel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This setup is working fine, as long as the first DMA0 request is running. I know I have to make sure the byte count register is not zero when the PIT triggers DMA0, but this is not working at the moment. The idea to achieve this, is by placing 0xFFFFC (= the highest allowed value which is a multiple of four) in the BCR register in the DMA0 complete interrupt. This trick was suggested in the topic stated below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/473602" rel="nofollow noopener noreferrer" target="_blank"&gt;Re: PIT trigger the DMA and the DMA transfer data to the DAC doesn't work&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the BCR update in the interrupt, the configuration error is set.&lt;/P&gt;&lt;P&gt;Is there a way to fix this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached the code from my project, note that the modulo buffers are disabled for easier testing.&lt;/P&gt;&lt;P&gt;The controller i`m using has mask 1N96F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14265193043719212" jivemacro_uid="_14265193043719212" modifiedtitle="true"&gt;
&lt;P&gt;void DMA0_init(void) &lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //use DMA channel 0 to move channel settings / triggering to ADC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC7 |= SIM_SCGC7_DMA_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC6 |= SIM_SCGC6_DMAMUX_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMAMUX0_CHCFG0 = DMAMUX_CHCFG_SOURCE(0x00); //disable DMAMux modules before initialization&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DSR_BCR0 = DMA_DSR_BCR_BCR(0xFFFFC);//(); //highest allowed multiple of 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DSR_BCR0 |= DMA_DSR_BCR_DONE_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Clear pending errors and/or the done bit &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (((DMA_DSR_BCR0 &amp;amp; DMA_DSR_BCR_DONE_MASK) == DMA_DSR_BCR_DONE_MASK)| ((DMA_DSR_BCR0 &amp;amp; DMA_DSR_BCR_BES_MASK) == DMA_DSR_BCR_BES_MASK)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ((DMA_DSR_BCR0 &amp;amp; DMA_DSR_BCR_BED_MASK) == DMA_DSR_BCR_BED_MASK) | ((DMA_DSR_BCR0 &amp;amp; DMA_DSR_BCR_CE_MASK) == DMA_DSR_BCR_CE_MASK))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DSR_BCR0 |= DMA_DSR_BCR_DONE_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_SAR0 = (uint32_t)&amp;amp;u32ADCcontrol[0];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DAR0 = (uint32_t)&amp;amp;ADC0_SC1A;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DCR0 = DMA_DCR_ERQ_MASK | DMA_DCR_CS_MASK |&amp;nbsp; DMA_DCR_EINT_MASK | DMA_DCR_SSIZE(0x00) | DMA_DCR_DSIZE(0x00) | DMA_DCR_SMOD(0x00) | DMA_DCR_DMOD(0x00) | DMA_DCR_LINKCC(0x00) | DMA_DCR_LCH1(0x00);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMAMUX0_CHCFG0 = DMAMUX_CHCFG_TRIG_MASK | DMAMUX_CHCFG_SOURCE(60); //use always enabled channel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; enable_irq(INT_DMA0, 0);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;void DMA0_IRQHandler()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PSOR = (1 &amp;lt;&amp;lt; 9);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DSR_BCR0 |= DMA_DSR_BCR_DONE_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_DSR_BCR0 = DMA_DSR_BCR_BCR(0xFFFFC) | DMA_DSR_BCR_DONE_MASK;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PCOR = (1 &amp;lt;&amp;lt; 9);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:37:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388448#M21018</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-16T15:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388449#M21019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry Bustsers,&lt;/P&gt;&lt;P&gt;First of all, I'd like to share an application note which using similar method to capture a couple of ADC channels, please check it through the link as below.&lt;/P&gt;&lt;P&gt;Next, can you tell me which error flag set then trigger the interrupt happens?&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN4590.pdf?fromsite=zh-Hans" title="http://cache.freescale.com/files/32bit/doc/app_note/AN4590.pdf?fromsite=zh-Hans"&gt;http://cache.freescale.com/files/32bit/doc/app_note/AN4590.pdf?fromsite=zh-Hans&lt;/A&gt;&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Ping&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>Tue, 17 Mar 2015 06:49:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388449#M21019</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-17T06:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388450#M21020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the application note, I will take a look in it.&lt;/P&gt;&lt;P&gt;The Configuration error bit becomes inside the DMA interrupt. The BCR value is also not loaded correctly (stays 0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;I have tried the construction in the application note, but it doesn`t work for me. The DMA module I have in the kinetis KL05 is fundamentally different than the one in the kinetis K controller. I don`t have the ability to use minor/major loops like described in the AN. The BCR still needs to be updated in the DMA ISR, which was the problem we started with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 07:20:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388450#M21020</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-17T07:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388451#M21021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;I've had a brief look through your code and I didn't find the any noticeable errors except the source address definition.&lt;/P&gt;&lt;P&gt;You can find the limitations of the source address value in the RM, just as the Fig1 shows. So I need to confirm the address of the u32ADCcontrol[&lt;SPAN class="number"&gt;0] whether follow the rule or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2015-03-18_9-49-20.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51578i766622D3DCEE0761/image-size/large?v=v2&amp;amp;px=999" role="button" title="2015-03-18_9-49-20.jpg" alt="2015-03-18_9-49-20.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fig 1&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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>Wed, 18 Mar 2015 01:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388451#M21021</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-18T01:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388452#M21022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;u32ADCcontrol[&lt;SPAN class="number"&gt;0] is located at memory location 0xFFFFE08 -&amp;gt;0xFFFFE14.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="number"&gt;I don`t think this is the real problem because everything is working fine after the first DMA0 activation. It looks like the module doesn`t accept the BCR change when the last DMA cycle has ended.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 07:40:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388452#M21022</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-18T07:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388453#M21023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;According to your statement, I think you want to use 4 different configurations to set 4 ADC channel successively.&lt;/P&gt;&lt;P&gt;However I'm confused about set BCR=0xFFFFC that means the DMA0 will transfer to 0xFFFFC bytes when DMA request happens.&lt;/P&gt;&lt;P&gt;Obviously, the address 0xFFFFE08 is not allowed to set and DMA interrupt will triggered because of this configuration error definitely.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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, 19 Mar 2015 05:53:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388453#M21023</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-19T05:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388454#M21024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;You are right about the address, I will check if I can fix the problem by placing the variables in the usable address space.&lt;/P&gt;&lt;P&gt;The concept around the usage of BCR is working fine, it just decrements the BCR by 4 after the transmission of 1 value from the control buffer (uint32_t datatype).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 10:04:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388454#M21024</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-19T10:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388455#M21025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ping,&lt;/P&gt;&lt;P&gt;I have checked the memory adress for the control register again, it is located at location 0x&lt;STRONG&gt;1&lt;/STRONG&gt;FFFFE08. So the information I gave you earlier was incorrect, I'm sorry about that.&lt;/P&gt;&lt;P&gt;This means that the problem will not be caused by the source adress, because it is located in the lower sram part of the memory map. The DMA controller should be able to acces this location.&lt;/P&gt;&lt;P&gt;Do you have another idea what is causing the problem?&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 21:13:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388455#M21025</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-19T21:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388456#M21026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;I think your purpose was transfer 4 bytes per time when DMA request came, Am I right?&lt;/P&gt;&lt;P&gt;If I am right, your purpose can't be achieved, as I mentioned before, the DMA would transfer to 0xFFFFC bytes one time.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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>Fri, 20 Mar 2015 03:13:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388456#M21026</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-20T03:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388457#M21027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;According to the reference manual, the DMA module should be able to transfer 4 bytes at a time by setting the cycle steal (CS) bit in the DMA_DCR0 register and setting the transfer size to 32bits. I visualised this by setting an I/O pin in the ADC interrupt handler, and the ADC triggered at exactly the right moment (tested with a digital oscilloscope).&lt;/P&gt;&lt;P&gt;Have a nice day&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 17:45:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388457#M21027</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-20T17:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388458#M21028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;I've checked your code again and I found that I missed the DMA_DCR0[CS] before.&lt;/P&gt;&lt;P&gt;Just like you mentioned, the DMA_DCR0[CS] can enable a single data transfer per DMA request when DMA_DCR0[CS] is asserted.&lt;/P&gt;&lt;P&gt;Now how's going on about your issue?&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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, 23 Mar 2015 00:31:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388458#M21028</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-23T00:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388459#M21029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;There is still no solution for the problem. I am running out of time for the project, therefore&amp;nbsp; I changed the software to update the ADC settings and store the result in the ADC interrupt handler. This is working, but causes a high interrupt load on the CPU. This is fine as a temporary solution, but in the final code I need to have working DMA code.&lt;/P&gt;&lt;P&gt;If there are any suggestions, I am off course more than happy to test them out.&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:19:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388459#M21029</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-23T08:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388460#M21030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry，&lt;/P&gt;&lt;P&gt;I was wondering if you can upload your whole project, then I can reproduce this issue on FRDM-KL05 board and work it out more effectively.&lt;/P&gt;&lt;P&gt;I'm looking forward to your reply.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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, 23 Mar 2015 08:52:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388460#M21030</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-23T08:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388461#M21031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;Can I send you the files via email? I can’t publish the whole code on the internet due to company policy. &lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From: jeremyzhou &lt;/P&gt;&lt;P&gt;Sent: Monday, March 23, 2015 9:52 AM&lt;/P&gt;&lt;P&gt;To: Barry Butsers &lt;/P&gt;&lt;P&gt;Subject: Re:  - kinetis KL05 DMA based ADC triggering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;            kinetis KL05 DMA based ADC triggering &lt;/P&gt;&lt;P&gt;            reply from jeremyzhou in Kinetis Microcontrollers - View the full discussion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 20:08:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388461#M21031</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-24T20:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388462#M21032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;You can just send me a simplified project that use the PIT to trigger the DMA to load the ADC configuration and store the ADC sample result through the DMA too when the ADC operate complete.&lt;/P&gt;&lt;P&gt;And I think it's OK to public.&lt;/P&gt;&lt;P&gt;I'm looking forward to your reply.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&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>Wed, 25 Mar 2015 01:22:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388462#M21032</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-03-25T01:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388463#M21033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;You can find the project in the attached zip file. It is completely stripped, but I left some basic code to simulate the usual interrupt load on the CPU.&lt;/P&gt;&lt;P&gt;DMA0 is triggered by the PIT overflow, the transfer to ADC0_SC1A triggers an ADC conversion and the adc conversion complete dma request triggers the ADC result transfer to memory.&lt;/P&gt;&lt;P&gt;The transfers fail when the BCR from DMA0 reach 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if there are any questions.&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 21:14:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388463#M21033</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-03-26T21:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388464#M21034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Have you made any progress with solving the DMA problem? &lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 14:33:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388464#M21034</guid>
      <dc:creator>barryb</dc:creator>
      <dc:date>2015-04-07T14:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388465#M21035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barrry,&lt;/P&gt;&lt;P&gt;Sorry for delay reply.&lt;/P&gt;&lt;P&gt;I have had a brief look through the code and I didn't find any obvious errors inside it, however I have one worry about it.&lt;/P&gt;&lt;P&gt;You'd better to move the arrays u32ADmeas[4] and u32ADCcontrol[4] to the RAM, it can avoid the address format incompatibility.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Ping&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>Wed, 08 Apr 2015 06:02:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388465#M21035</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2015-04-08T06:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: kinetis KL05 DMA based ADC triggering</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388466#M21036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;!I had what seems to be a very similar problem from what I can tell. Would have been nice to get a solution here, but I think I found out a solution/workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made made my IRQ handler look that same as yours in your initial post and found that configuration error(CE) bit was set when the DONE was reset (no matter the state of BCR, which has to be greater than 0).&lt;/P&gt;&lt;P&gt;I found that clearing the ERQ bit in DCRn while tending to DSRn and then resetting it stopped this from occuring (BCRn MUST be set after clearing DONE as it is cleared when DONE is cleared). Below is what got mine working (I am moving 4 samples of 16 bits).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; background-color: #f0f0f0;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14478180322615736 jive_text_macro" data-renderedposition="174_8_1118_192" jivemacro_uid="_14478180322615736"&gt;&lt;P&gt;void DMA0_IRQHandler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DCR0 &amp;amp;= ~DMA_DCR_ERQ_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DAR0 = (uint32_t)&amp;amp; adc_Result;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DSR_BCR0 |= DMA_DSR_BCR_DONE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DSR_BCR0 = DMA_DSR_BCR_BCR(0x08);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMA_DCR0 |= DMA_DCR_ERQ_MASK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; background-color: #f0f0f0;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 02:46:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/kinetis-KL05-DMA-based-ADC-triggering/m-p/388466#M21036</guid>
      <dc:creator>kroony</dc:creator>
      <dc:date>2015-11-18T02:46:36Z</dc:date>
    </item>
  </channel>
</rss>

