cancel
Showing results for 
Search instead for 
Did you mean: 

Is it a problem to use TIM1 PWM ch1..3 under Arduino?

WOGoos
Associate II

Dear reader,

I have a question about the use of TIM1 on the Blue Pill STM32F103. I want to build a synchronous Buck Converter using the Blue Pill and need to use PWM on TIM1 ch1..3 with its complementary outputs and the programmable dead time for that.

I heard someone saying that using TIM1 for PWM was not a good idea. The Pill Blue has these function only on TIM1 ch1..3 so what can be the reason that using TIM1 for PWM is not a good idea.

I don't use HALL and program Bare Metal, but program with Arduino liberties. Is TIM1 used for other function under Arduino? Anyone has an idea

This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

The thread relates to the so-called Blue Pill, which uses illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

Thank you for your understanding.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4

Not a lot of interest here with Arduino Libraries, perhaps there's a better forum for that?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

>>I heard someone saying that using TIM1 for PWM was not a good idea. The Pill Blue has these function only on TIM1 ch1..3 so what can be the reason that using TIM1 for PWM is not a good idea.

Perhaps ask them? Or cite specific instances of who, where, what..

TIM1 is only 16-bit, is an advanced timer, has to have PWM pins specifically enabled to output.

More generally STM32 TIM each have a single counting element, and several latches, so can only do a single frequency across all channels. Fine for Servos, but for sound generation, or complex modulation, perhaps not so much.

The things are diagrammed in the Reference Manual, might shed light on their features / limitations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
WOGoos
Associate II

@Tesla DeLorean Yes I know what that TIM1 can and can not do. Any platform has is pro and cons and I understand that yours is not the Arduino IDE. Thanks for telling me that, but that was not the question.

Peter BENSCH
ST Employee

The thread relates to the so-called Blue Pill, which uses illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

Thank you for your understanding.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.