<?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 Precision timestamp for GPIO IRQ in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229081#M16871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a very precise timestamp of when a GPIO IRQ occurs.&amp;nbsp; I've already altered gpiolib to create a new object:&amp;nbsp; "/sys/class/gpio/gpioXXX/timestamp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i can't figure out is how to write to it from within the ISR.&amp;nbsp; Should be fairly simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do_gettimeofday(&amp;amp;tv);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sprintf((char *)pointertotimestamp,"%08u.%06u\n",(int)(tv.tv_sec%100000000),(int)tv.tv_usec));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I can't seem to figure out is how to get (or create) the pointer to "/sys/class/gpio/gpioXXX/timestamp" inside the interrupt routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you everyone in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Sep 2013 14:32:27 GMT</pubDate>
    <dc:creator>roryhansen</dc:creator>
    <dc:date>2013-09-12T14:32:27Z</dc:date>
    <item>
      <title>Precision timestamp for GPIO IRQ</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229081#M16871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a very precise timestamp of when a GPIO IRQ occurs.&amp;nbsp; I've already altered gpiolib to create a new object:&amp;nbsp; "/sys/class/gpio/gpioXXX/timestamp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i can't figure out is how to write to it from within the ISR.&amp;nbsp; Should be fairly simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do_gettimeofday(&amp;amp;tv);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sprintf((char *)pointertotimestamp,"%08u.%06u\n",(int)(tv.tv_sec%100000000),(int)tv.tv_usec));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I can't seem to figure out is how to get (or create) the pointer to "/sys/class/gpio/gpioXXX/timestamp" inside the interrupt routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you everyone in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 14:32:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229081#M16871</guid>
      <dc:creator>roryhansen</dc:creator>
      <dc:date>2013-09-12T14:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Precision timestamp for GPIO IRQ</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229082#M16872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rory,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay,&lt;/P&gt;&lt;P&gt;Are you still having problems?&lt;/P&gt;&lt;P&gt;Do you want to modify the value of the GPIO? &lt;/P&gt;&lt;P&gt;In kernel space you could try to use the gpio_set_value in case you want to modify the value of a pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is not what you want, please give me more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 19:57:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229082#M16872</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2013-09-30T19:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Precision timestamp for GPIO IRQ</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229083#M16873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rory&lt;/P&gt;&lt;P&gt;We have not got your response yet and will close the discussion. If you still need help, please feel free to reply with an update to this discussion.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yixing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 05:23:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Precision-timestamp-for-GPIO-IRQ/m-p/229083#M16873</guid>
      <dc:creator>YixingKong</dc:creator>
      <dc:date>2014-06-10T05:23:27Z</dc:date>
    </item>
  </channel>
</rss>

