Hi Modal,
When upping the IMU_GYRO_RATEMAX (for lower end-to-end worse case latency in the gyro movement -> actuation loop), I'm seeing the DSP load jump (measured by px4-listener cpuload
). After digging into it, it looks like the main culprit is not the processing modules, but rather the FIFO read (transfer((uint8_t *)&buffer, (uint8_t *)&buffer, transfer_size)
in the ICM42688P driver) and the UART write (uart_write(&data, sizeof(DataPacket)) != sizeof(DataPacket)
) to our STM board (for actuation).
About 40% of the DSP is being used for the FIFO transfer and the UART write with IMU_GYRO_RATEMAX
set to 1kHz (1000Hz).
Any recommendations on how to minimize the DSP being choked by these IO operations?
I can only think of marginal gains like decreasing how many bytes the FIFO is configured to contain, or optimizing our DataPacket
size down to like 12 bytes (currently 17 bytes). But maybe there is some more fundamental strategy that I'm missing? Or is IO just generally a bad time for the DSP?
Thanks for any advice!
Rowan (Cleo Robotics)