MCU : STM32F030F4
how can use PA2 output PWM ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 2:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 2:40 AM
Hello, it looks like PA2 is not connected to any PWM timer.
You could programm a (software) PWM using interruptions and toggling up and down the GPIO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 2:53 AM
Can you provide examples?
Because i am a new guy!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 3:05 AM
can you use another pin?(maybe PA4)
What software are you using for developing in your PC?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 3:20 AM
I am sorry , i can only use PA2 .
I use keil uVision5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 3:56 AM
do you use cubeMX for the configuration?
why you can only use PA2?
maybe pictures of your board or code would help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 4:13 AM
YES ,I use cubeMX for the configuration
but ,hardware is ready ,so i can't switch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 4:19 AM
you can see the picture , now pwm out is PB1
but i want switch to PA2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 4:24 AM
there is no PWM functionality in PA2.
PWM functionality is a feature some specific pins have, (because they can be connected to the timmer pwm outputs).
If the pin you want to use doesnt have that access to the pwm timmer function you need to create your own pwm thing.
How to do it:
Select your timmer in cubeMX, start the timmer as compare and match interruption.
Inside the ISR(interruption function) of the timmer you just configured put some gpio_toggle function or counters.
The rest is just playing around with it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-27 4:44 AM
you can see the functionalities of the PB1 or PA2 pin if you leftclick on it.
PB1 has the Timmer channel 1 functionalities (like pwm and more)
PA2 is only linked with ADC, UART, and GPIO functionalities
