Hello Akeem,
I don't want to use Free-Running Timer ,becauce the test results have about +5cm error when using the example pga450_main.c .
So I used Equation 2 in the 《LIN Demostration Using PGA450Q1EVM》, this Equation's Accuracy is about ±1.5cm. But I don't know why have not SAT_TIME.
code as:
//*** CODE SNIPPET BEGIN ***//
if ( MaskEcho == 0){
if ( data_FIFO[lcv] > DetectionThreshold) {
lcv_temp1=lcv
MaskEcho = 1;
//break; // when enabled, break from loop as soon as an object is found
}
}
// Calculation tof
TimeofFlightTemp.u16 =(lcv_temp1<<4) + (BLANKING_TIMER<<4);
//*** CODE SNIPPET END ***//