Using TO RTOS and looking for a way to count cycles or usec between a event and GPIO interrupt. I'm using a HC-SR04 ultrasonic distance sensor and need to measure the pulse width of its echo out. I have one GPIO sending the trigger to the sensor board and have an interrupt on a 2nd PGIO pin. I have confirmed the trigger pulse and echo pulse with a scope. I've also confirmed the interrupt callback function is being called. I would like to start a count via code after the trigger pulse steps and stop it on the interrupt.
Thanks
KS