I have a Nucleo board, and want to update the DAC output each time one of the PWM rising edge occurs.
When I configure a PWM using a timer, it auto generates the following interrupt only:
void TIM1_UP_TIM16_IRQHandler(void)
{
/* USER CODE BEGIN TIM1_UP_TIM16_IRQn 0 */
/* USER CODE END TIM1_UP_TIM16_IRQn 0 */
HAL_TIM_IRQHandler(&htim16);
/* USER CODE BEGIN TIM1_UP_TIM16_IRQn 1 */
/* USER CODE END TIM1_UP_TIM16_IRQn 1 */
}
I should add the HAL_DAC_SetValue function to some section so that at each rising edge of the PWM HAL_DAC_SetValue outputs a value. Is there a function or way to do that using HAL library or else?
edit:
HAL_DAC_SetValue
there. Not sure what you are really asking. \$\endgroup\$