2022-04-08 03:02 AM
I use the HAL to setup multiple HRTIM timers on a STM32G4 and I would like to trigger a simultaneous capture across them using software (the reasons for this are complex but it needs to be a simultaneous capture).
Currently I have a GPIO output pin looped back into a GPIO input pin to trigger a HW EXTI which is then used to perform the actual capture on multiple HRTIM timers. This works but the method seems a bit overkill, inelegant and wastes two pins that I may need for something else.
I suppose I could use TIM2_TRGO but I was wondering if I can do it in any other way?
Note: The CubeIDE does not allow a CAPTURE1 via a SW trigger but I see there is a LL_HRTIM_CAPTURETRIG_SW in the HAL manual. Do I just need to forget the CubeIDE or am I missing something?
2023-05-23 02:08 AM
Hello,
As per my understanding a possible solution could be to have an update event as a source of capture of all Timers, and to program the Master Timer update as a source update for all of them. Then a software update could be triggered by HAL_HRTIM_SoftwareUpdate (HRTIM_TIMERUPDATE_MASTER).
Best regards.
Yassine.
2023-06-08 09:47 AM
@Peter BENSCH
please take a look at this question. I have the same question