<?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: Timer Emulation using PIT and GPIO in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806441#M49014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it is working exactly as I  described in my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using PORTD IRQ configuration 0x3 in AN4419 it is 0x1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find there my zip main.c file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Jan 2019 08:38:33 GMT</pubDate>
    <dc:creator>shauldorf</dc:creator>
    <dc:date>2019-01-13T08:38:33Z</dc:date>
    <item>
      <title>Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806434#M49007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;For educational purpose I'm trying to rewrite Application Note&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;AN4419 - Using DMA and GPIO to emulate time functionality on Kinetis (2012).&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;I use MCUXpresso 10.2 and KSDK FRDM-K64F_2.4.2&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;My configuration is empty board files (~20 MHz sys and bus clock)&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;In original implementation the GPIO PCR is configured as&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;PORTD-&amp;gt;PCR[0] |= PORT_PCR_MUX(1) | PORT_PCR_IRQC&lt;/SPAN&gt;&lt;SPAN style="; color: red; text-decoration: underline; font-size: 10pt;"&gt;&lt;STRONG&gt;(1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;&lt;SPAN style="color: black;"&gt;My solution it is working only when PCR is&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;PORTD-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;PCR&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;[0] |= PORT_PCR_MUX(1) | PORT_PCR_IRQC&lt;/SPAN&gt;&lt;SPAN style="; color: red; text-decoration: underline; font-size: 10pt;"&gt;&lt;STRONG&gt;(3)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;&lt;SPAN style="color: black;"&gt;I believe that something is wrong with my DMA TCD setup but I can't fined what is wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 8pt;"&gt;&lt;SPAN style="color: black;"&gt;I'm attaching project zip file.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 20:44:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806434#M49007</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2018-08-20T20:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806435#M49008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shaul,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I checked the AN4419, please check this description:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67239iF8900B7541FEC319/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So, it seems, it should work with both edge.&lt;/P&gt;&lt;P&gt;If you just can work with 3, DMA request on either edge, rising edge can't work, I suggest you also enable the pin internal pull up.PORTX_PCRn[PE]=1, .PORTX_PCRn[PS]=1, then try&amp;nbsp; it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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>Tue, 21 Aug 2018 09:21:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806435#M49008</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-08-21T09:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806436#M49009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry&lt;/P&gt;&lt;P&gt;In AN4419 page #8 you can see that configuration is rising edge.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="AN4419 -PCR[ ] config..png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67516iC0AFF776D3FF99F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="AN4419 -PCR[ ] config..png" alt="AN4419 -PCR[ ] config..png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Triggering on dual edge will produce double frequency compared to rising edge .&lt;/P&gt;&lt;P&gt;My IO port PTD0 (J2_6) is an output port so pullup doesn’t solve the problem because it is used for the input pad.&lt;/P&gt;&lt;P&gt;In my attached demo today I found a problem that after power up it also doesn’t work until to run option with DMA&amp;nbsp; of 8 bit(byte) width. It is in attached (BarePIT_GPIO_ByteOpt_AN4419.zip).&lt;/P&gt;&lt;P&gt;Then you can run my first zip project (Bare_PIT_GPIO_AN4419.zip) that is 32 bit DMA.&lt;/P&gt;&lt;P&gt;This is that at power up TCD registers are undefined.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I think that there is something wrong with my DMA TCD, the first BarePIT_GPIO_ByteOpt_AN4419 pre-configs well.&lt;/P&gt;&lt;P&gt;In second run of Bare_PIT_GPIO_AN4419 it uses the previous setup and every thing is OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this doesn’t solve the original question&amp;nbsp; dual/single edge triggering .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shaul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 14:17:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806436#M49009</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2018-08-21T14:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806437#M49010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I forgot to send Byte DMA zip file,:smileycry:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 14:37:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806437#M49010</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2018-08-21T14:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806438#M49011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shaul,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your updated information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Could you tell me, your attached BarePIT_GPIO_ByteOpt_AN4419 is created by yourself or from the nxp official AN4419SW?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If not, I will help you to try to get the official according code at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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, 23 Aug 2018 08:10:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806438#M49011</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-08-23T08:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806439#M49012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is my project created in MCUXpresso IDE and SDK 2.4.2 for K64F configured as empty board (with modification to allow UART debug console).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AN4419SW  was used as reference it is an old AN (2012) implemented on • TWR-K40X256&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess TCD configuration was done differently (using API).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 08:29:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806439#M49012</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2018-08-23T08:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806440#M49013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/shauldorf"&gt;shauldorf&lt;/A&gt;‌ Did you ever get this working? I'm working on implementing this on the FRDM-k28F and was hoping for pointers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2019 23:45:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806440#M49013</guid>
      <dc:creator>jared1</dc:creator>
      <dc:date>2019-01-11T23:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806441#M49014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it is working exactly as I  described in my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using PORTD IRQ configuration 0x3 in AN4419 it is 0x1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find there my zip main.c file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2019 08:38:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806441#M49014</guid>
      <dc:creator>shauldorf</dc:creator>
      <dc:date>2019-01-13T08:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Timer Emulation using PIT and GPIO</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806442#M49015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know what is in the source code but the application note's code is incorrect.&lt;/P&gt;&lt;P&gt;PORTD_PCR7|=(0|PORT_PCR_MUX(1)|PORT_PCR_IRQC(0x1));&lt;BR /&gt;enables DMA trigger on a single edge whereby the description says it is needed on both edges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore probably a Typo in the code part of the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the PIT DMA output method is integrated into the PIT driver in the uTasker project. The user interface just sets the PIT_OUTPUT_DMA_TRIG flag and the port(s) to be toggled and the rest is automated (generates 2 complimentary square wave outputs):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;PIT_SETUP pit_setup;&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; // PIT interrupt configuration parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.int_type = PIT_INTERRUPT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.mode = PIT_PERIODIC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.count_delay = PIT_US_DELAY(500);&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; // 500us period (1kHz)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.mode = (PIT_PERIODIC | PIT_OUTPUT_DMA_TRIG);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // periodic with DMA trigger to control a port toggle&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.ulPortBits = (PORTA_BIT1 | PORTA_BIT23);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // toggle PTA1 and PTA23 on each PIT trigger&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.ucPortRef = PORTA;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.ucPIT = 1;&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; // use PIT1 (this will use DMA channel 1, 0 would use DMA channel 0, etc.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pit_setup.int_handler = 0;&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; // no interrupt due to DMA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _CONFIG_DRIVE_PORT_OUTPUT_VALUE(A, (PORTA_BIT1 | PORTA_BIT23), (PORTA_BIT1), (PORT_SRE_SLOW | PORT_DSE_HIGH)); // prepare port outputs for complimentary square wave&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnConfigureInterrupt((void *)&amp;amp;pit_setup);&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; // configure PIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is however foreseen more for emergencies where other timers are not already available since the DMA transfer (when high frequencies are generated) can have a bus loading effect that is then noticeable due to sharing with other high speed peripherals (eg. it makes USB unreliable at above around 2MHz on KL parts), plus there is some jitter on the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that the complete operation is simulated in the uTasker project so that it (including PIT and DMA) can be inspected in the simulation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2019 16:56:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Timer-Emulation-using-PIT-and-GPIO/m-p/806442#M49015</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-01-13T16:56:05Z</dc:date>
    </item>
  </channel>
</rss>

