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?
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.
2024-07-25 01:37 PM
My crystal cube here says, that the PWM is generated in software, by toggling a GPIO output pin in timer interrupt.
JW
2024-07-26 04:14 AM
How should I generate the PWM signal?
2024-07-26 04: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
2024-07-26 05:21 AM
Find some CubeMX examples which configure a timer channel to output a PWM signal.
Here is one:
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