cancel
Showing results for 
Search instead for 
Did you mean: 

DMA not working on STM32F303RET6

samsamm777
Associate III

I'm struggling to get DMA working on a PWM Timer. I've read just about everything i can, but not having any luck get it working.

Running this code.. produces a PWM signal as expected on the output.

TIM1->CCR1 = 50;
  HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);

However, when I swap the code to the following, all I get is a low signal. It never produces a PWM at all. My expectation is that it should do. I have my scope on single shot, and triggered correctly.

pwmData[0] = 0;
  pwmData[1] = 10;
  pwmData[2] = 20;
  pwmData[3] = 30;
  pwmData[4] = 40;
  pwmData[5] = 50;
  pwmData[6] = 60;
  pwmData[7] = 70;
  pwmData[8] = 80;
  pwmData[9] = 90;
  HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, (uint32_t *)pwmData, 10);

 I have DMA setup for the timer0693W00000Su6y6QAB.png

1 ACCEPTED SOLUTION

Accepted Solutions
samsamm777
Associate III

So I rebuilt the entire project from scratch, and its now working.

View solution in original post

2 REPLIES 2

Red out and check/post content of TIM and DMA registers.

JW​

samsamm777
Associate III

So I rebuilt the entire project from scratch, and its now working.