Hi all.
I am looking to be able change the output frequency of the ESC (The pwm sent from the ESC to the motors). From the documentation it has the default frequency of 18kHz with 800 steps for driving the motors but it can be modified. I have several question about it:
1- Is there an easy way to modify the output PWM of an ESC ?
2- I was looking at the tgy firmware I found in tgy.asm the following lines:
; Minimum PWM on-time (too low and FETs won’t turn on, hard starting)
.if !defined(MIN_DUTY)
.equ MIN_DUTY = 56 * CPU_MHZ / 16
.endif
; Number of PWM steps (too high and PWM frequency drops into audible range)
.if !defined(POWER_RANGE)
.equ POWER_RANGE = 800 * CPU_MHZ / 16 + MIN_DUTY
.endif
and also:
.equ TIMING_MIN = 0x8000 ; 8192us per commutation
.equ TIMING_RANGE1 = 0x4000 ; 4096us per commutation
.equ TIMING_RANGE2 = 0x2000 ; 2048us per commutation
.equ TIMING_MAX = 0x00e0 ; 56us per commutation
where TIMING_MAX seems to correspond to a period of ~55us (~18kHz).
Same for MIN_DUTY.
If I have to recompile the firmware, what are the parameters I have to change to lower or increase the frequency output of the ESC. And can I change the output frequency without changing the number of step or both of these parameters are correlated ?
Thank you for your help !