AnsweredAssumed Answered

Precision timestamp for GPIO IRQ

Question asked by Rory Hansen on Sep 12, 2013
Latest reply on Jun 9, 2014 by Yixing Kong

I am trying to get a very precise timestamp of when a GPIO IRQ occurs.  I've already altered gpiolib to create a new object:  "/sys/class/gpio/gpioXXX/timestamp"

 

What i can't figure out is how to write to it from within the ISR.  Should be fairly simple:

 

     do_gettimeofday(&tv);

     sprintf((char *)pointertotimestamp,"%08u.%06u\n",(int)(tv.tv_sec%100000000),(int)tv.tv_usec));

 

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.

 

Thank you everyone in advance.

Outcomes