Skip to content
stancecoke edited this page Jul 15, 2026 · 9 revisions

If you can't get your system running, please flash the controller with display type "Debug" setting and look at the UART data, the controller is sending @56000 BAUD.

Connect an USB-UART converter or an UART Bluetooth module to the display connector of your controller:
Wiring

Start a terminal program like HTERM on your PC/Mobile and connect to the controller with 56000 BAUD. Set the new line command to CR/LF.

To get basic information about relevant paramaters edit line 1099 (recently) to:

sprintf_(buffer, "%d, %d, %d, %d, %d, %d, %d, %d, %d\r\n", adcData[1],adcData[6], uint32_torque_cumulated>>5, MS.i_q_setpoint, uint32_PAS, int32__temp_current_target , MS.i_d,MS.i_q, SystemState);

adcData[1]: ADC raw data of the throttle input
adcData[6]: ADC raw data of the AI1 input, may be used as torque signal input
uint32_torque_cumulated>>5: torque signal averaged over one crank revolution
MS.i_q_setpoint: setpoint for motor current iq
uint32_PAS: duratiaon between two PAS pulses, must decrease with faster turning cranks.
int32_temp_current_target: temporary value for iq during internal calculations
MS.i_d: recent value of motor current id (is controlled to be zero, as long as no field weakening is wanted)
MS.i_q: recent value of motor current iq, this part is directly proportional to the motor torque
SystemState: Shows the state of the system, zero means PWM is off.

to be continued....

Clone this wiki locally