<?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: CTIMER capture via DMA  in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/CTIMER-capture-via-DMA/m-p/847620#M33734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="307966" data-username="gunnarbohlen" href="https://community.nxp.com/people/gunnarbohlen"&gt;Gunnar Bohlen&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;Q1:&lt;BR /&gt;If a capture event copies a ctimer value into the capture register, and the same event would trigger the DMA,&amp;nbsp; would there be a conflict with the capture register access (ctimer writes into capture register,&amp;nbsp; DMA reads this capture register), and would the write acces have the higher priority?&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;-- As you pointed out before, the Ctimer capture is unable to trigger the DMA.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;To overcome this shortcoming, I think your idea is available, however, it needs to take some validate the possible conflict between writing and reading the capture register simultaneously.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;Q2:&lt;BR /&gt;Is it possible to set up the DMA to do:&lt;BR /&gt;-with each hw-trigger from a pin copy 2 32bit-words from CTIMER0_CAP (no increment src) to memory (increment dest)&lt;BR /&gt;-repeat this n times without additional re-configuration of DMA? &lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;-- It's available to implement it via the linker reload the DMA descriptor feature.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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, 10 Dec 2018 03:28:44 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2018-12-10T03:28:44Z</dc:date>
    <item>
      <title>CTIMER capture via DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CTIMER-capture-via-DMA/m-p/847619#M33733</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 would like to capture a long pulse train with the LPC54618. The input signal is connected to CT0_CAP2 and CT0_CAP3.&lt;/P&gt;&lt;P&gt;Desired low-times and high times in the pulse train is ~150ns. With my current solution it seems to work up to ~250ns pulse width. CPU clock is 160MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a working code that does:&lt;/P&gt;&lt;P&gt;configure CAP2 for falling edges&lt;/P&gt;&lt;P&gt;configure CAP3 for rising edged and generate set the int flag.&lt;/P&gt;&lt;P&gt;The software polls the interrupt flag and in case of a detected edge it copies both the capture timestamps into my RAM array. Then it counts the total amount of events and also checks that a maximum time for the desired number of events has not expired.&lt;/P&gt;&lt;P&gt;This works fine up to a certain frequency of the pulse train.&lt;/P&gt;&lt;P&gt;Now I would like to increase the max. frequency and try to use DMA instead of copying the capture resulty via CPU.&lt;/P&gt;&lt;P&gt;Unfortunately I cannot find that a capture event is a DMA trigger. But if I understand correctly I can use the same capture pin as PINT pin and configure the DMA trigger for this pin interrupt.&lt;/P&gt;&lt;P&gt;But I'm not sure if I can do what I want to do via DMA.&lt;/P&gt;&lt;P&gt;Q1:&lt;/P&gt;&lt;P&gt;If a capture event copies a ctimer value into the capture register, and the same event would trigger the DMA,&amp;nbsp; would there be a conflict with the capture register access (ctimer writes into captureregister,&amp;nbsp; DMA reads this capture register), and would the write acces have the higher priority?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2:&lt;/P&gt;&lt;P&gt;Is it possible to set up the DMA to do:&lt;/P&gt;&lt;P&gt;-with each hw-trigger from a pin copy 2 32bit-words from&amp;nbsp;CTIMER0_CAP (no increment src) to memory (increment dest)&lt;/P&gt;&lt;P&gt;-repeat this n times without additional re-configuration of DMA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2018 13:33:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CTIMER-capture-via-DMA/m-p/847619#M33733</guid>
      <dc:creator>gunnarbohlen</dc:creator>
      <dc:date>2018-12-07T13:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: CTIMER capture via DMA</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CTIMER-capture-via-DMA/m-p/847620#M33734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="307966" data-username="gunnarbohlen" href="https://community.nxp.com/people/gunnarbohlen"&gt;Gunnar Bohlen&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;Q1:&lt;BR /&gt;If a capture event copies a ctimer value into the capture register, and the same event would trigger the DMA,&amp;nbsp; would there be a conflict with the capture register access (ctimer writes into capture register,&amp;nbsp; DMA reads this capture register), and would the write acces have the higher priority?&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;-- As you pointed out before, the Ctimer capture is unable to trigger the DMA.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;To overcome this shortcoming, I think your idea is available, however, it needs to take some validate the possible conflict between writing and reading the capture register simultaneously.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;Q2:&lt;BR /&gt;Is it possible to set up the DMA to do:&lt;BR /&gt;-with each hw-trigger from a pin copy 2 32bit-words from CTIMER0_CAP (no increment src) to memory (increment dest)&lt;BR /&gt;-repeat this n times without additional re-configuration of DMA? &lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;-- It's available to implement it via the linker reload the DMA descriptor feature.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&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, 10 Dec 2018 03:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CTIMER-capture-via-DMA/m-p/847620#M33734</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-12-10T03:28:44Z</dc:date>
    </item>
  </channel>
</rss>

