cancel
Showing results for 
Search instead for 
Did you mean: 

Help regarding proper interrupt configuration for PWM and DMA

skuma.8
Associate III

Hello !

I am using DMA with pwm and working on unipolar SPWM.

i have configured DMA with an array of pwm and is working fine. i am trying to get the interrupt after either each DMA transfer or after the reload of ARR register. According to the documentation i tried using function 

 

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
	if (htim->Instance == TIM1 && htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) {
		HAL_TIM_PWM_Stop(&htim1, TIM_CHANNEL_1);
	}
}

 

but it doesnt seems working.

I doubt i couldnt configure proper interrupt for it. here is the NVIC setting 

skuma8_0-1723205110099.png

Any guidance please...

 

1 REPLY 1
Sarra.S
ST Employee

Hello @skuma.8, sorry for the delayed answer, 

Is there any news about this? Is the timer started with the interrupt enabled? Using the HAL_TIM_Base_Start_IT function?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.