STM32H730 / timer capture triggered by USB_SOF not working
Hello,
we are having an issue on the STM32H730 ; we would like to have a Timer Capture triggered by the USB OTG SOF signal. This should be straightforward since the USB1_OTG_HS_SOF signal is connected to TIM2 ITR5.
However, we never managed to have the capture triggered by this signal.
We use the following code:
// Start the USB stack, etc.
// Configure the TIM2 IC
__TIM2_CLK_ENABLE();
LL_TIM_IC_Config(TIM2, LL_TIM_CHANNEL_CH1, LL_TIM_ACTIVEINPUT_TRC | LL_TIM_IC_FILTER_FDIV1 | LL_TIM_IC_POLARITY_RISING);
LL_TIM_SetTriggerInput(TIM2, LL_TIM_TS_ITR5);
LL_TIM_IC_SetActiveInput(TIM2, LL_TIM_CHANNEL_CH1, LL_TIM_ACTIVEINPUT_TRC);
LL_TIM_EnableCounter(TIM2);
When there is USB audio traffic (that we also receive on the PC, so it is definitely working), the TIM2->CCR1 stays at zero and never changes (+ we have checked that the timer is counting of course).
Also, when we enable the USB SOF IRQs, they are triggered indeed. But the timer capture still isn't triggered and stays at zero.
Has this feature been tested at all? Is there something we are missing in the timer configuration?
Thanks,
Florent

