Hello NXP team and community,
I’m currently working on a 4-wheel mecanum drive robot using the i.MX93 processor and developing on the Cortex-M33 core with the MCUXpresso SDK.
Each wheel uses a DC motor with a quadrature encoder (2 signal wires). I want to implement closed-loop PID control for wheel velocity and feed odometry data to a higher-level ROS system via UART.
I’d like to know:
Whether the i.MX93 SDK or TPM peripheral supports a quadrature decoder (encoder mode) like in STM32 TIM encoder interface mode.
If not, what’s the recommended method to interface 4 encoders (8 signals total) for speed + direction feedback?
Are there any PID or motor-control example projects in the i.MX93 MCUXpresso SDK or Application Notes that demonstrate encoder-based motor speed control?
Is it practical to handle PID and encoder feedback on the M33 itself, or would NXP recommend using an external motor controller (or companion MCU) for this application?
Any example code, SDK references, or guidance on the TPM input capture and PID integration would be very helpful.
Thank you!
—
Hardware: i.MX93 EVK
Core: Cortex-M33
SDK: MCUXpresso SDK (latest release)
Goal: 4-motor mecanum control, encoder feedback, on-board PID loop