2025-12-02 7:29 AM - last edited on 2025-12-02 8:55 AM by mƎALLEm
Hi Guys, I am completely new in the world of ST Microcontroller. I have worked with PIC Microcontrollers using MikroC Compiler. After studying various tutorials on this topic, I am getting it slowly. While going through code of generation of PWM, I came across a function " HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);" which, I assume, starts PWM. My question, Is it a library function? If so, how can it be accessed. Incidentally it is stated that I have installed STM32 CubeMX and STM32 Cube IDE.
Solved! Go to Solution.
2025-12-02 8:32 AM
@ankhola wrote:
I got the issue. So, for such functions, I shall have to go through the examples. Right?
You need to start with the examples provided in the STM32Cube HAL. This is to speed up the development.
But if you have an issue you need to open a new thread and provide the complete project: code and ioc file.
Meanwhile as said by @Peter BENSCH , we can suspect that you are using Blue Pill board. Which frankly we don't support as 99% contains a counterfeit STM32 MCU.
2025-12-02 8:32 AM
I have downloaded the UM. Yes, I have found the functions there. Thanks.
2025-12-02 8:49 AM
I have not yet started in Hardware. Right now trying to grasp the ideas.
2025-12-02 8:53 AM - edited 2025-12-02 8:57 AM
@ankhola wrote:
I am using STM32F103C8T6.
Ok. So if you are planning to use STM32F103, you can use NUCLEO-F103RB board.
All STM32 family has at least one NUCLEO board provided by ST (contain genuine chips). So it's up to you to choose the suitable board that fits your needs/application.
So I don't recommend to use any of Blue/Black pills boards available in the market.
2025-12-02 8:53 AM
@mƎALLEm wrote:
@ankhola wrote:I got the issue. So, for such functions, I shall have to go through the examples. Right?
You need to start with the examples provided in the STM32Cube HAL. This is to speed up the development.
But if you have an issue you need to open a new thread and provide the complete project: code and ioc file.
Meanwhile as said by @Peter BENSCH , we can suspect that you are using Blue Pill board. Which frankly we don't support as 99% contains a counterfeit STM32 MCU.
Then what is the way of getting genuine one?
2025-12-02 8:56 AM
Already answered that question in my previous comment ;)
2025-12-02 9:00 AM
@ankhola wrote:I have not yet started in Hardware.
In that case, when you do, I would strongly suggest that you get a Nucleo-F103RB.
This is a genuine, supported ST board featuring the STM32F103RB microcontroller.
It is widely used, so you will easily find plenty of people familiar with it to help you.
There are ready-to-use examples published by ST, and available via CubeMX.
And it comes complete with a genuine ST-Link built in.
For getting started with STM32, see:
Also: