I am using the STM32F410CBT's DMA to output a square wave on the PWM peripheral with varying duty cycle. The duty cycle will vary at a button press (through GPIO interrupt). I managed to vary the PWM's duty cycle and verified that the duty cycle is different with each button press through an Oscilloscope. I am using TIM5 configured at 10kHz.
I used the function:
HAL_TIM_PWM_Start_DMA(&htim5, TIM_CHANNEL_x, &dutycycle_array[x], 1);, where
TIM_CHANNEL_x corresponds to the PWM Channel that I am scoping,
dutycycle_array is an array with 101 32-bit elements representing 0% duty cycle up to 100% duty cycle based on its index
What is a good indication that the DMA is indeed being used to transfer data from memory to the PWM peripheral without CPU intervention, aside from the fact that I am using a HAL_DMA API, and the fact that there is no code in the while loop? Is there also way to monitor the DMA through Keil (or the processor load through Keil) aside from looking at its registers through the Register Viewer?