Hi,
The goal of our project is to find the pulse width of received Echo signal(Low signal) from Ultrasonic sensor on FTM pin of S32K146. Ultrasonic signal sends the data in the below format:
Burst signal , Echo / Echo's , 12 status bits.
We have used FTM_DRV_GetInputCaptureMeasurement to measure the signal value.
Solved! Go to Solution.
Hi,
in the configuration you have the FTM_DRV_GetInputCaptureMeasurement returns number of ticks counter counts during low pulse. So if you know period or frequency counter is running of, then you can calculate pulse width by multiply counts and counter clock period.
If you are not aware of counter clock you can use FTM_DRV_GetFrequency, which should return the frequency of the clock source running the FTM counter. Then pulse width will be
width = counts/frequency.
BR, Petr
Hi,
in the configuration you have the FTM_DRV_GetInputCaptureMeasurement returns number of ticks counter counts during low pulse. So if you know period or frequency counter is running of, then you can calculate pulse width by multiply counts and counter clock period.
If you are not aware of counter clock you can use FTM_DRV_GetFrequency, which should return the frequency of the clock source running the FTM counter. Then pulse width will be
width = counts/frequency.
BR, Petr
Hi Petr,
Thanks for your help ,Solution solved our problem.
Regards
Soham Borkar