2020-03-02 11:03 AM
Sorry if the question sounds stupid, I am new to STM32.
I managed to have a PWM working, timer 1, pos/negative, deadtime, working with DMA from an array with pre-calculated values.
HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, sine_val, samples);
HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1);
What does not work for me are the complete and halfcomplete interrupts.
HAL_DMA_IRQHandler gets called in the stm32l4xx_it.c file.
However, in main.c nothing happens:
/* USER CODE BEGIN 4 */
void HAL_DMA_XferHalfCpltCallback(DMA_HandleTypeDef *hdma)
{
GPIOA->ODR ^=GPIO_ODR_OD5; //does not get here
}
/* USER CODE END 4 */
Is there anything I am doing horribly wrong?
Do I need to explicitely enable DMA irqs?
Thanks for any hints