2023-11-21 06:09 AM
Hello,
I'm currently using the HRTimer (on a STM32G474) for duplicating a input PWM signal. That means that in my case, I have one PWM input coming on 2 events (1 for the rising edge, 1 for the falling edge) and the outputs of the HRTimer B, will be set and resets according to those events. So at the 2 outputs of the HRTimer B, I have 2 PWMs that are identical to the input one.
I want to have the possibility to trigger a "flag" whenever I'm receiving an input PWM. It could also be triggered on the output since they are duplicating the analog signal.
For that, I'm seeking for some kind of callback function or interrupt function to use to trigger my flag. I've found out that we have the functions HAL_HRTIM_OutputxSetCallback and HAL_HRTIM_OutputxResetCallback to trigger on the outputs but unfortunately, I'm not able to make them work, it never enter in those functions.
Does it exist any solutions to my issue ?
Thanks for your returns,
Chris
2023-11-22 05:57 AM - edited 2023-11-22 05:58 AM
Hello Chris @Sidius,
Thank you for your question!
Here some questions/points :
Best Regards,
Pierre
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.
2023-11-22 07:15 AM
It was just the fact that I was not using the DMA with the HRTIM, so all the callback functions were not enable.
Thanks for the RM file, it will be very useful.
Kind regards,
Chris