STM32G4 - Using both TIxFPx and Input capture mode on the same channel with advanced timer
So i'm working on a way to generate pulses with both Timer 1 and 8 (advanced motor control timer) independently in OPM PWM mode 2 with the Slave Gated mode to control a each a stepper motor driver. I want to use as much as possible the hardware because sometimes the frequency of the steps are really high and the interruptions are slowing down the process.
Both are using the TI2FP2 on their channels 2 (to stop the timer when raised) for some home sensors (only enabled when going on the home sensor direction by changing the slave mode) and generating the pulse (pwm) on the channel 3 with use of the RCR register to trigger the amount i want thanks to the OPM mode, and sometimes i change the ARR register to modulate the frequency of the steps and then reload the RCR register to be updated on the next UEV.
I'm also counting the number of pulses done by each timer with a secondary timer using the TRGO OC1 (and that's works perfectly) to see if my motor loose steps when doing a movement to the home sensor, so i can be sure that the stepper motor is doing the good number of step and not loose any.
Also i want to have an interruption occurring when the channel 2 is detection a rising edge (meaning the home sensor has been reached), I opted for using also on those channels the Input Capture Direct mode to have a Capture Compare interruption on top of the TI2FP2. The IOC configurator seems to let me do it on channels 2, so it seems to be doable.
It seems to work fine on the timer 1 but not on the timer 8, sometimes the interruption is not triggered at all. With an oscilloscope i see the pin going up but no interruption is going on.
Is there a better way to capture the TI2FP2 event ? Did i missed something ?
Here the configuration of timer 8 :

(Changing also the combined gated reset mode to a simple gated mode, the ioc wont let me do it directly from here)




And the pulse counter timer 20 :

