Hello Community,
I am working on a project using the MaaxBoard OSM93 (i.MX93, Cortex-M33 core), and I need help interfacing the HC-SR04 ultrasonic sensor for distance measurement.
I would like to implement this using the Input Capture (IC) feature to accurately measure the ECHO pulse width.
Could you please help with the following points:
-
Pin Selection & Pinmux Configuration:
-
Which GPIO pin or TPM input channel is suitable for the ECHO signal (input capture)?
-
How do I configure the pinmux to enable input capture on the chosen pin?
-
How should I update
pinmux.candapp.hfiles to reflect the configuration?
-
-
Trigger Signal Setup:
-
For the TRIG pin (output), what’s the correct GPIO configuration and setup in the pinmux tool?
-
-
Driver Usage:
-
Is there an available Input Capture driver or example code for i.MX93/Cortex-M33 using MCUXpresso SDK?
-
-
Application Code Integration:
-
Any guidance or example for writing an ISR or polling logic to calculate distance based on pulse width?
-
Any working examples, configuration files, or documentation links related to using input capture with HC-SR04 on the OSM93 platform would be very helpful.
Thank you!