<?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: Toggling between Timer and Capture Functionality in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549961#M13915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sns22 on Fri Jan 08 03:32:20 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi wmues,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try your option as well. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I wanted to know also if toggling between timer and counter is possible or is it set internally that only one of the hardware(timer or counter) can be used. Although I believe it should be possible in software to toggle between both options.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I am missing something here??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:50:44 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:50:44Z</dc:date>
    <item>
      <title>Toggling between Timer and Capture Functionality</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549959#M13913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sns22 on Thu Jan 07 08:56:17 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working with LPC 2468 in an embeddedartists board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my design I am interfacing to 8 PWM capture based sensors(PT100 using UTI and Max sensor).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To achieve it I used the 2 PWM captures and 6 timer (T1 T2 T3 CAP 0&amp;amp;1) captures.&amp;nbsp; (all are hard wired ) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But now I face a design complexity where I have no free timers to be used for adding delay in the main code. T0 is being used for Ethernet uip code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had an idea to toggle between timer and capture functionality in software. All the capture signals are hardwired on the board. But this is not working. When I turn on the timer functionality and turn it off later it messes up with the counter in the sensor. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to do it where one can switch in software between timer and capture functionality. My sensor capture code does not use the timer from the same line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For eg:: My idea was to use Timer 1 while using cap functionality of Timer 2 and to use Timer 2 while using the capture functionality of Timer 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set PCONP_bit.PCTIM1 ,2,3 = 0 at the end of the capture code. I&amp;nbsp; also reset the PINSEL = 0&amp;nbsp; after the capture code is finished.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I missing something here??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:50:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549959#M13913</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Toggling between Timer and Capture Functionality</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549960#M13914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Fri Jan 08 01:37:41 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You may use another peripheral as timer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- the SPI interface has a clock generator and an interrupt flag (if a data transfer ends).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Programm the clock generator to 1/8 of your timeout value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Send a byte out over SPI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- If the SPI interrupt fires, increment a timer variable and send a new byte over SPI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can emulate a timer with an unused peripheral which has a clock divider.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549960#M13914</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Toggling between Timer and Capture Functionality</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549961#M13915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sns22 on Fri Jan 08 03:32:20 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi wmues,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try your option as well. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I wanted to know also if toggling between timer and counter is possible or is it set internally that only one of the hardware(timer or counter) can be used. Although I believe it should be possible in software to toggle between both options.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I am missing something here??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Toggling-between-Timer-and-Capture-Functionality/m-p/549961#M13915</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:50:44Z</dc:date>
    </item>
  </channel>
</rss>

