OpenSourceEBike / TSDZ2-Smart-EBike

Flexible OpenSource firmware for TongSheng TSDZ2 mid drive ebike motor
GNU General Public License v3.0
251 stars 130 forks source link

motor.c: Wrong values for ui8_phase_x_voltage and MIDDLE_PWM_DUTY_CYCLE_MAX #140

Open mspider65 opened 4 years ago

mspider65 commented 4 years ago

Since PWM frequency was increased and PWM counter goes up to 420 (before 511), the computed values of ui8_phase_x_voltage should be less than 210 (before 254). Both MIDDLE_PWM_DUTY_CYCLE_MAX and ui8_svm_table values should be updated.