I am working on a project using the MaaxBoard OSM93 (i.MX93) and want to use input capture functionality to measure the pulse width of an ultrasonic sensor (like HC-SR04).
I found that the NXP SDK provides TPM input capture examples, but I need help with the following:
How to configure the TPM input capture example correctly for the MaaxBoard OSM93?
How to choose a compatible GPIO pin that is mapped to a TPM channel?
How to read the captured timer values from the TPM peripheral?
I have already:
Imported the
tpm_input_capture
example from the SDK .Connected my sensor to GPIOx_IOy, but it seems this GPIO does not have timer functionality.
What I need:
Guidance on how to identify which GPIO pins support TPM input capture on i.MX93.
Steps to configure the correct pin and TPM channel in the SDK example.
Code example or method to read and interpret the rising/falling edge capture values.
Any help would be greatly appreciated.