PWM and ADC conflict
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 11:25 AM
Hello, I'm new to STM32, I bought a Nucleo board with a STM32F334R8T6
I want to generate a PWM of 10kHz and read some data in ADC channel, unfortunetely, there some conflicts between this two and I can not generate a PWM with more than 5kHz.
I need some help about the configuration of the timer and ADC, there is some tutorial or document that explain each parameter that need to be configurated?
I saw something about DMA, which one is better to use this?
- Labels:
-
STM32F3 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 12:40 PM
There shouldn't be any conflicts to generating a 10 kHz wave and using the ADC. Perhaps if you share your code or the symptoms that you are seeing, and/or the desired behavior, we can resolve the issue.
A PWM signal can be generated that is completed independent of CPU resources. It shouldn't be causing any conflicts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-25 1:37 PM
My crystal cube here says, that the PWM is generated in software, by toggling a GPIO output pin in timer interrupt.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 4:14 AM
How should I generate the PWM signal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 4:44 AM
Using the PWM mode of some of the Compare/Capture channels of timer - see "PWM mode" subchapter of timer chapter in Reference Manual.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-26 5:21 AM
Find some CubeMX examples which configure a timer channel to output a PWM signal.
Here is one:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-30 11:05 AM
Hello, I want to know what is the most efficient way to read two channels of an ADC in a pre determined frequency like 10kHz
