HAL_TIM_PWM_PulseFinishedCallback

Post here first, or if you can't find a relevant section!
Post Reply
lejibxl
Posts: 3
Joined: Fri Mar 11, 2022 12:44 pm

HAL_TIM_PWM_PulseFinishedCallback

Post 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."
fpiSTM
Posts: 1944
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

Re: HAL_TIM_PWM_PulseFinishedCallback

Post 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...
Post Reply

Return to “General discussion”