Motor Controller Firmware Execution Timing Information
Last updated
Last updated
The high dynamic nature of the motor drive circuit imposes a strict requirement on the realtimeness of the firmware. We must ensure that we can run everything within a single FOC commutation loop.
We performed several measurements on the Recoil firmware code running on the motor controller to profile the execution time.
The timing information is measured with a Siglent SDS 1202X-E oscilloscope via a GPIO header on the motor controller board.
The system clock is configured as 160 MHz. The compiler optimization is set to -O2
.
Entire loop
The delta time between issuing HAL_I2C_Master_Receive_IT and receiving the interrupt is 78 us.
Hence, the maximum frequency it can run at is 12 kHz.