speeduino icon indicating copy to clipboard operation
speeduino copied to clipboard

Clean up initialization of PWM max count

Open DeionSi opened this issue 3 years ago • 2 comments

The initializations of the xxx_pwm_max_count variables are spread out throughout the code and in the board files. Only set the MCU specific timer resolution in the board files and set the variables where the features are normally initialized.

DeionSi avatar Nov 27 '21 23:11 DeionSi

Pretty sure the reason why those initializations currently are like they are, is because Teensy requires those to be like that to work properly. Have you verified this PR works with Teensy?

pazi88 avatar Dec 14 '21 11:12 pazi88

I bench tested this on a Speeduino 0.4.3d. I don't have access to a Teensy for testing.

The xxx_pwm_max_count variables are only set in the board files, never used. I don't see why Teensy would require a different solution to AVR or STM32. Please elaborate.

DeionSi avatar Dec 15 '21 17:12 DeionSi