Hi everyone,
I am currently porting micro-ROS to the Cortex-M33 core of an i.MX93 (MIMX9352) using a custom SOM and the MCUXpresso SDK (v25.06.00).
have successfully established a UART transport and connected to the micro-ROS agent. My nodes and topics are created, but published data appears empty/invalid. After debugging, I’ve realized I need to provide high-resolution timestamps (seconds and nanoseconds) to the micro-ROS client to synchronize with the ROS 2 ecosystem.
Screenshots, Debug terminal output, Codes are attached below.
Micro-ros agent connection
Micro-ros agent connection
ROS Topic listing (Topic is emtpy (data not publishing))
ROS Topic listing (But topic is empty)
Debug terminal output:
Debug Console Init done
Past lpuart init and custom trnsport open
Past rclc support,node,publisher init
Past rclc timer init
Past rclc executor init, add_timer
Inside while loop
RCSOFTCHECK Failed: rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)) | Lin0
after executor spin
Inside while loop
RCSOFTCHECK Failed: rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)) | Lin0
after executor spin
Inside while loop
RCSOFTCHECK Failed: rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)) | Lin0
after executor spin
The Problem:
I am struggling to find a reliable "System Uptime" or "Tick" function in the SDK that provides the precision required for rmw_publisher_publish.
I tried using the lptmr driver examples, but the code hangs during LPTMR_Init()
My Questions:
Is there a recommended SDK API for getting a high-resolution (nsec) monotonic timestamp since boot on the i.MX93 M33?
For those who have implemented micro-ROS on i.MX9 series: Did you use a dedicated hardware timer, or is there a standard CMSIS/SDK "GetTime" function I should be using instead?
Environment Details:
Any insights or code snippets for a 64-bit nanosecond counter implementation on this platform would be greatly appreciated!
Regards,
Anandhu