<?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: 5us timer interrupt in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257963#M25071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Eric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think the best way is to dig out the root cause of the GPT/EPIT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you really want to try FIQ, you can search the kernel for FIQ implement, and you also need to enable the fiq mode of dedicated interrupt you want, the config should be in i.MX25's interrupt controller.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sorry that I only enable FIQ on v3.0.35, I don't know how v2.6.31. I looked through v2.6.31, I think you can refer to i.MX28, it has FIQ enabled, drivers/power/mxs/linux.c mxs_bat_init(). Basically, you need to get_fiq_regs, set_fiq_handler, mxs_set_irq_fiq etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jul 2013 08:51:41 GMT</pubDate>
    <dc:creator>AnsonHuang</dc:creator>
    <dc:date>2013-07-04T08:51:41Z</dc:date>
    <item>
      <title>5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257956#M25064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a timer interrupt going. I am able to get something like 50us with the follow code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;setittimer(ITIMER_REAL, &amp;amp;timer, NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will go to the handler every ~50us seems to be the fastest I am drive it. I am trying to toggle an IO at the speed to enable the conversion of my ADC IC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Samuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 05:04:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257956#M25064</guid>
      <dc:creator>firmware_design</dc:creator>
      <dc:date>2013-04-09T05:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257957#M25065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Samuel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do you use linux OS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Based on my understanding, the timer can NOT guarantee your handler can be called in 5us, and due to linux's interrupt handle flow, I don't think regular irq can meet your 5us request, as I have ever tried FIQ, it normally needs about 2us, which I copy the code to the high address vector. So, in you case, can you try using polling? If you want to use interrupt, then I think you can try to use hrtimer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 09:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257957#M25065</guid>
      <dc:creator>AnsonHuang</dc:creator>
      <dc:date>2013-04-11T09:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257958#M25066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi YH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying usleep(5) and it give me &amp;gt;18us instead in delay. I tried toggling GPIO4_29 this is using the iMX53 ubuntu linux. The IO is toggling at 500ns interval. Low to high. I am not sure why usleep() need &amp;gt;18us ... This happens when using the SPI if I read single bytes instead of a buffer even clocking at 25MHz is does the function and has a 20us idle between reads. Like to solve this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jun 2013 14:15:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257958#M25066</guid>
      <dc:creator>firmware_design</dc:creator>
      <dc:date>2013-06-22T14:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257959#M25067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, Samuel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If udelay is not accurate, then I think this is a big issue, can we first make sure udelay is accurate? How did you get the 18us when you only delay for 5us? By measuring the GPIO using a scope? Such as Before udelay 5us, we set a GPIO from high to low, then do the delay, then set the GPIO from low to high,now we can get the actual delay it goes from scope. Keep in mind that we need to disable IRQ when doing this test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The udelay based on CPU loop, there is a global variable called loops_per_jiffies, every time CPU freq changelooping variable need to be updated. I think udelay should be accurate, otherwise, there shoul be big issue in kernel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can you please try to make sure udelay is accurate first? Try what I describe upper, disable IRQ, pull down/up a GPIO and&amp;nbsp; using scope to measure the GPIO, then read the time from scope to see whether the interval of the GPIO status change is same as the delay time we set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If udelay is accurate enough, then we can go on your case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jun 2013 14:39:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257959#M25067</guid>
      <dc:creator>AnsonHuang</dc:creator>
      <dc:date>2013-06-22T14:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257960#M25068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;irq_interrupt() seems to require a parameter, I have tried irq_interrupt(9), it doesnt seem to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the hrtimer, I am thinking if it might be possible to use that for my 5us timer and run the SPI read. (I need to do a GPIO toggle before reading SPI). However if each read takes about 20us and the interrupt keeps nesting at every 5us interval it might not be right. I am really stuck here. What is the function to disable the irq in order to get the usleep to work at 5us? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 17:35:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257960#M25068</guid>
      <dc:creator>firmware_design</dc:creator>
      <dc:date>2013-07-01T17:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257961#M25069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Raj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think you should use udelay instead of usleep, udelay is a busy loop based on CPU freq, and it should be accurate. And you can use local_irq_save and local_irq_restored if you want to disable irq during this delay. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 02:21:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257961#M25069</guid>
      <dc:creator>AnsonHuang</dc:creator>
      <dc:date>2013-07-02T02:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257962#M25070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi YH,&lt;BR /&gt;I'm finding the FIQ applying method into i.MX25.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GPT/EPIT interrupt was not operating normally.&lt;BR /&gt;But the GPT/EPIT interrupt driver was operated normally in the i.MX25 3Stack EVM board.&lt;BR /&gt;So I think my board have some problem, but I couldn't find the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to apply other interrupt method as work-around.&lt;BR /&gt;One of the work-around is FIQ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw you had ever tried FIQ in the upper post.&lt;BR /&gt;Could you tell me how to apply FIQ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My development envionment is like below.&lt;BR /&gt; - CPU : i.MX257&lt;BR /&gt; - OS : Linux 2.6.31&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Eric.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 07:59:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257962#M25070</guid>
      <dc:creator>erickang</dc:creator>
      <dc:date>2013-07-04T07:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257963#M25071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Eric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think the best way is to dig out the root cause of the GPT/EPIT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you really want to try FIQ, you can search the kernel for FIQ implement, and you also need to enable the fiq mode of dedicated interrupt you want, the config should be in i.MX25's interrupt controller.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sorry that I only enable FIQ on v3.0.35, I don't know how v2.6.31. I looked through v2.6.31, I think you can refer to i.MX28, it has FIQ enabled, drivers/power/mxs/linux.c mxs_bat_init(). Basically, you need to get_fiq_regs, set_fiq_handler, mxs_set_irq_fiq etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 08:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257963#M25071</guid>
      <dc:creator>AnsonHuang</dc:creator>
      <dc:date>2013-07-04T08:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257964#M25072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi YH,&lt;/P&gt;&lt;P&gt;Then could you give me the reference code for Linux 3.0.35?&lt;/P&gt;&lt;P&gt;I want to refer to the code for Linux 2.6.31.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Eric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 10:04:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257964#M25072</guid>
      <dc:creator>erickang</dc:creator>
      <dc:date>2013-07-04T10:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257965#M25073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;                Please see attached FIQ implement on v3.0.35, EPIT using FIQ. Please be aware of the difference of interrupt controller, our i.MX6 use GIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Anson huang 黄勇才&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Freescale Semiconductor Shanghai&lt;/P&gt;&lt;P&gt;上海浦东新区亮景路192号A座2楼&lt;/P&gt;&lt;P&gt;201203&lt;/P&gt;&lt;P&gt;Tel:021-28937058&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 02:43:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257965#M25073</guid>
      <dc:creator>AnsonHuang</dc:creator>
      <dc:date>2013-07-05T02:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257966#M25074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yongcai Huang,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll refer to your patch for i.MX257 FIQ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Eric.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257966#M25074</guid>
      <dc:creator>erickang</dc:creator>
      <dc:date>2013-07-08T08:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257967#M25075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Yongcai Huang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We decided to apply the GPIO Interrupt for i.MX257 Interrupt.&lt;/P&gt;&lt;P&gt;We confirmed the normal operation on the customer board.&lt;/P&gt;&lt;P&gt;So I'm holding the FIQ application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'll try to apply the FIQ in the i.MX257 later.&lt;/P&gt;&lt;P&gt;Thanks for your advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Eric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 04:16:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257967#M25075</guid>
      <dc:creator>erickang</dc:creator>
      <dc:date>2013-07-09T04:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: 5us timer interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257968#M25076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Dear Mr Huang!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I see you saw "I think the best way is to dig out the root cause of the GPT/EPIT." &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;in the upper post.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I was a beginner, can you indecate an idea for me? or give me some information? because i feel unable to start.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sabresd (i.MX6Q linux3.0.35)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Sunyu&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 08:17:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/5us-timer-interrupt/m-p/257968#M25076</guid>
      <dc:creator>sunyu</dc:creator>
      <dc:date>2015-10-30T08:17:05Z</dc:date>
    </item>
  </channel>
</rss>

