Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.33k stars 5.28k forks source link

hard_pwm: Add pin defs for STM32F070 and STM32F072 #6409

Closed willpuckett closed 9 months ago

willpuckett commented 10 months ago

When experimenting with the new "pwm_pin" last week, I discovered that my toolhead board, an STM32F072, didn't have hardware pwm defined in Klipper.

This PR attempts to reconcile the above issue, and also includes pwm pin definitions for all processors in the STM32F0 family STM32F070.

Tests with my laser are greatly improved.

I am still tentative about ST's nomenclature. I also am not deeply aware of any other concerns I may need to take into consideration, i.e. ensuring that defined pins don't conflict with another portion of Klipper somehow.

In the rare circumstance in which a pin had multiple timers defined on different GPIO functions, the lower numbered function was used.

I utilized pin definitions from the following data sheets:

Common pins have been unioned as much as possible.

willpuckett commented 10 months ago

Build tests failed for STM32F031 and STM32F042, so removed them from the pull request.

KevinOConnor commented 10 months ago

Thanks. Commits need to have a signed-off-by line in order to be committed - see https://www.klipper3d.org/CONTRIBUTING.html .

Otherwise, the change looks fine to me.

Cheers, -Kevin

willpuckett commented 10 months ago

Thanks so much!

KevinOConnor commented 9 months ago

Thanks.

-Kevin