stm32-rs / stm32f0xx-hal

A Rust `embedded-hal` implementation for all MCUs in the STM32 F0 family
BSD Zero Clause License
134 stars 59 forks source link

PWM on Special Channels? #162

Closed AdinAck closed 1 year ago

AdinAck commented 1 year ago

Hello, I am using an STM32F031K6 and I am trying to modify the pwm example to output complementary pwm signals on PA7 and PA8 (since PA8 is on TIM1_CH1 and PA7 is on TIM1_CH1N).

I cannot figure out how to do this, when I try to add PA7 to the channels declaration the pwm::tim1 function yells at me.

I have determined any pin on CH1, 2, 3, or 4 are accepted, but any on BKIN, ETR or CH1N are not.

Am I going about this the wrong way? Is there a different way to configure pins to use these special channels?

Thanks!

AdinAck commented 1 year ago

It seems that the exact functionality I am talking about is in the f4 HAL here.

The interface is exactly what I would expect, why does the f0 HAL not have this?

therealprof commented 1 year ago

This HAL is very much on the backburner, especially compared to the f4 HAL where this was added actually just a few weeks ago.

AdinAck commented 1 year ago

I see, I am very new to Rust but I will do my best to contribute.

I will leave this issue open until the desired functionality is added.