PWM Generaion with udpate of the Period using DMA (STM32F411)
Hi, I tried to find a solution in the forum, but unfortunately without success.
The problem is as follows: I need to generate a PWM signal that changes the period (not the duty cycle) with each iteration. (MCU: STM32F411)
I'm setting up the timer to use a PWM output on channel 1:

Global interrupts are also active:

Then the DMA will be configured to update the ARR register:

In the code the DMA will be activated as following:
for (int i = 0; i < 32; i++)
{
u32FreqUpdate[i] = 2000 + i*100;
}
// Activate PWM channel 1:
TIM_CCxChannelCmd(htim4.Instance, TIM_CHANNEL_1, TIM_CCx_ENABLE);
// Activate PWM output:
__HAL_TIM_MOE_ENABLE(&htim4);
// Activate ARR Update:
HAL_TIM_Base_Start_DMA(&htim4, u32FreqUpdate, sizeof(u32FreqUpdate)/sizeof(uint32_t));
As a result:

The Output updates 3 times (without to change the frequency (period)) and then PWM Stops...
Could someone explain me, what I'm doing wrong?
