2022-01-20 12:43 AM
Hello Guys,
I tried to find a list or something which gives me an overview of how many and which pins can be configured as PWM Generation Output for the named µC. In the Datasheet of "STM32L151x6/8/B STM32L152x6/8/B" I found a table named "Timer feature comparision". However it doesn't tell me which Pins can be configured with PWM Generation Output. Neither does the table 8 "STM32L151x6/8/B and STM32L152x6/8/B pin definitions" starting on page 37 in the Datasheet. Table 8 only tells me that I connect the pin to a specific Timer Channel but not if I can produce a PWM Generation Output with this channel.
2022-01-20 06:07 AM
Hi @Chrizzly ,
Pins that you need to use are specified in the pinout table, available in the datasheet of your selected product.
You need to connect the pin to the specific timer channel then based on the timer configuration it will output the required signal.
An easier way to do it is to rely on the configuration setup with STM32CubeMX.
You can refer to the article Custom Signal generation using PWM and DMA. It explains with more details the steps to follow in order to configure a PWM output based on STM32CubeMX. You can do the same for the device you selected (STM32L151CBT6) instead of STM32H745.
-Amel
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.
2022-01-20 10:10 AM
All timer channels can generate PWM.
JW
2022-01-20 12:04 PM
In STM32CubeMX to see other pins a function can be moved to: hold CTRL and left click on the pin (You can drag and drop the pin function to any highlighted pin)
Even if you aren't using STM32CubeMX to generate code, you can use it to easily see what features can be on which pins, or to generate sample code.
Paul