I'm trying to get basic project working to measure flight time between ultrasonic transmitter and receiver. I'm using the -050 psoc 5lp dev kit.
The receiver signal goes through a PGA to a comparator. The signal coming out of the PGA looks fine and the Comparator output is as expected too. The comparator output connects to the timer capture input. An interrupt is triggered on timer capture which reads capture value and shuts down the timer and comparator. The measurement I'm getting is between 480-490 microseconds but you can see on the attached oscilliscope the real time between PWM start and Comparator high is actually ~440 microseconds.
Attached program has sync component between the comparator and timer. I've also tried without sync component and with sync option on comparator. Same result for all.
I've also tried just sending a test signal to the timer input by driving a pin low-high with a delay of 400us. With the test signal I get a correct value from the timer capture and also matches oscilliscope.
Is there something I'm missing here?
Thanks
Aaron