Hands-On with STM32 Timers: Custom Signal Generation using PWM and DMA , Part 1 of 2

preview_player
Показать описание

In this video, we will learn how to generate a custom signal using the PWM mode of our STM32 Timers and the DMA.
We will output a PWM signal on the channel 1 of a selected timer. We will use STM32CubeIDE to develop our code, and then test it on a Nucleo board.

Рекомендации по теме
Комментарии
Автор

This type of content is the reason people choose ST!

bobby
Автор

hello I'm a newbie with stm32, and for the last couple of months I've been trying to generate a bunch of pulses of variable width and phase, all at the same frequency, they should not use CPU power, they should have 1us resolution and as low jitter as possible, it seems like not only there is no content or example about this topic but also seems very hard to do!
I'm using the F1 family, I was wondering if you guys could give some examples about that topic? with F1 family

jb
Автор

Also, I understand the PWM CH1's duty-cycle register (CCR) is updated from SRAM via the DMA such that it increases from 0 to maximum, repeating at a 4khz rate..

But if TIM4 has an 240Mhz input clock (Prescaler = 0), wouldn't a counter-reload value of 30000-1 yield an update every 8khz, not 4khz? i.e. TIM_ARR = 240M/30000-1

BTW, calling it a sine-wave seems counter-intuitive to me. Instead, can the same timer be configured to ALSO trigger an update from SRAM to the DAC via the DMA?

bennguyen
Автор

Hello sir, I watched this video it is very helpful fo me. But Sir I face a problem. I generate SPWM signal chanel1 and chanel1N both not working together only one work at a time. What will I do to get custom signal PWM generating CH1 and CH1N together.
I use STM32F103R6. PROVIDE ME GUIDANCE HOW TO DERIVE 3-PHASE INDUCTION MOTOR WITH VFD USING STM32F103R6.
THANK YOU

manishruhela