<?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: Generating a frequency in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150612#M422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jairo,&lt;/P&gt;&lt;P&gt;I wouldn't recommend bit banging method for high frequency clock generation.&amp;nbsp;&amp;nbsp; I'd setup a DMA Timer to toggle its output pin when it reaches a particular value.&amp;nbsp; It then can reset the counter and repeat the process without any processor/CPU intervention.&amp;nbsp; You can also update the reference count value to change the frequency/clock output.&lt;/P&gt;&lt;P&gt;The "tick" in the RTOS is 5ms.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 31 Oct 2009 21:43:09 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2009-10-31T21:43:09Z</dc:date>
    <item>
      <title>Generating a frequency</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150611#M421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i want to know if there's somebody who can help me with this, i need to generate a pulse signal in one pin (20 MHz). First of all i was able to do so but at very low frequencies compared with this, to achieve it i modified the timer example program to toggle the state of a pin. Another attempt i made was to copy the configuration made from Processor Expert and adapt it to MQX but with unsatisfactory results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
 /************************** 20MHz USING GPT**************************************/ //*********************************************************************************************    printf("Inicializando frecuencia...");    clrReg8Bits(reg_ptr-&amp;gt;GPT.GPTIE, 0x02);  //Disable interrupts    setReg8(reg_ptr-&amp;gt;GPT.GPTSCR1, 0x00);    //Stop Timer    setReg8Bits(reg_ptr-&amp;gt;GPT.GPTIOS, 0x0A);     clrSetReg8Bits(reg_ptr-&amp;gt;GPT.GPTCTL1, 0xC8, 0x04);        clrReg8Bits(reg_ptr-&amp;gt;GPT.GPTCTL2, 0xCC);               setReg8(reg_ptr-&amp;gt;GPT.GPTSCR2,0x08);    setReg16(reg_ptr-&amp;gt;GPT.GPTC1, 0x01U);    //Store the given number in the compare registry    setReg16(reg_ptr-&amp;gt;GPT.GPTC3, 0x01U);    //                    setReg8Bit(reg_ptr-&amp;gt;GPT.GPTSCR1 , 0x80U); //Run the timer&lt;/PRE&gt;&lt;P&gt;Regarding all my attempts i got some doubts with MQX&lt;/P&gt;&lt;P&gt;1. In time what is a tick?&lt;/P&gt;&lt;P&gt;2. Is there another way to toggle on/off a pin, or i got to use the ioctl functions?&lt;/P&gt;&lt;P&gt;3. Which is the minimum intervalusing the lwtimer instead the timer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:53:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150611#M421</guid>
      <dc:creator>Jairo</dc:creator>
      <dc:date>2020-10-29T08:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a frequency</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150612#M422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jairo,&lt;/P&gt;&lt;P&gt;I wouldn't recommend bit banging method for high frequency clock generation.&amp;nbsp;&amp;nbsp; I'd setup a DMA Timer to toggle its output pin when it reaches a particular value.&amp;nbsp; It then can reset the counter and repeat the process without any processor/CPU intervention.&amp;nbsp; You can also update the reference count value to change the frequency/clock output.&lt;/P&gt;&lt;P&gt;The "tick" in the RTOS is 5ms.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 21:43:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150612#M422</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2009-10-31T21:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a frequency</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150613#M423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We were considering making a 512Khz square wave output with another signal doing a single pulse every 16 counts (Generating PCM and Sync). Would this be possible without adding load to the processor?(Our processor is already pushing very high speed SPI and 3 UARTS among other hi load threads.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know in the 8 bit processors it would be easy as they have a timer and modulo counter which you can easily setup and leave runing with zero processor loading as the module just toggles when the counter reachs module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 10:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150613#M423</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-11-02T10:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a frequency</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150614#M424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jairo,&lt;/P&gt;&lt;P&gt;Did you looked at PWM module? it is capable of clock up to Internal_Bus_Clock/2.&lt;/P&gt;&lt;P&gt;I did not make any further checks on setting the rest of PWM ...&lt;/P&gt;&lt;P&gt;Another solution is to use CLKOUT and dividing externally by 4 if you run at 80MHz.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;IPA&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 18:24:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150614#M424</guid>
      <dc:creator>ipa</dc:creator>
      <dc:date>2009-11-02T18:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a frequency</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150615#M425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnks to all for your replies, i've decided to generate the frequncy using the DMA Timer instead the PWM because the signal is 50% duty cycle, so i use the flip-flop function in the timer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 13:11:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150615#M425</guid>
      <dc:creator>Jairo</dc:creator>
      <dc:date>2009-11-05T13:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Generating a frequency</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150616#M426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can someone post an example of using the DMA timer to generate a PWM? Or is there an example somewhere?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2009 05:41:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Generating-a-frequency/m-p/150616#M426</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2009-11-12T05:41:25Z</dc:date>
    </item>
  </channel>
</rss>

