Skip to content

Commit a8bc75e

Browse files
authored
FIX 500k to 50k
1 parent 2cb0c8c commit a8bc75e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/hardware_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ void _setPwmFrequency(long pwm_frequency,const int pinA, const int pinB, const i
131131
if(pinD != NOT_SET) _pinHighFrequency(pinD); // stepper motor
132132

133133
#elif defined(_STM32_DEF_) || (defined(__arm__) && defined(CORE_TEENSY)) //if stm32 or teensy 3x / 4x / LC boards
134-
if(pwm_frequency == NOT_SET) pwm_frequency = 500000; // default frequency 50khz
134+
if(pwm_frequency == NOT_SET) pwm_frequency = 50000; // default frequency 50khz
135135
else pwm_frequency = constrain(pwm_frequency, 0, 50000); // constrain to 50kHz max
136136
_setHighFrequency(pwm_frequency, pinA);
137137
_setHighFrequency(pwm_frequency, pinB);
138138
_setHighFrequency(pwm_frequency, pinC);
139139
if(pinD != NOT_SET) _setHighFrequency(pwm_frequency, pinD); // stepper motor
140140

141141
#elif defined(ESP_H) // if esp32 boards
142-
if(pwm_frequency == NOT_SET) pwm_frequency = 400000; // default frequency 40khz
142+
if(pwm_frequency == NOT_SET) pwm_frequency = 40000; // default frequency 40khz
143143
else pwm_frequency = constrain(pwm_frequency, 0, 50000); // constrain to 50kHz max
144144

145145
if(pinD == NOT_SET){
@@ -281,4 +281,4 @@ unsigned long _micros(){
281281
// regular micros
282282
return micros();
283283
#endif
284-
}
284+
}

0 commit comments

Comments
 (0)