Page 1 of 1

HAL_TIM_PWM_PulseFinishedCallback

Posted: Tue Dec 17, 2024 7:44 am
by lejibxl
Hello
In an Arduino program, I use DMA transfer to the timer. At the end of the transfer, I want to stop the timer. With STM32CubeIDE, I can do this using the "handler": HAL_TIM_PWM_PulseFinishedCallback.

But in STMduino, this callback doesn't seem to be called.

Here is my code:

Code: Select all

extern "C" void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
{
	if (HAL_TIM_PWM_Stop_DMA(htim, TIM_CHANNEL_1)!= HAL_OK){
	}
	datasentflag = 1;
}
For you, Is there a particular reason for this?

Thank you in advance for your help."

Re: HAL_TIM_PWM_PulseFinishedCallback

Posted: Tue Dec 17, 2024 9:02 am
by fpiSTM
Hard to tell with only this part of code.
How do you configure the Timer? Did you used the HardwareTimer library or use the HAL_TIM_MODULE_ONLY, or other...