cancel
Showing results for 
Search instead for 
Did you mean: 

Can I select TRGO2 for my ITR selection? (STM32H5)

yang2
Associate III

Dear All,

Can I select TRGO2 for my ITR selection?
The table below is extracted from the STM32H563 Reference Manual (RM).
Does it mean that ITR does not support TRGO2?

yang2_0-1747212454714.png

2 REPLIES 2
Sarra.S
ST Employee

Hello @yang2

TIM_TRGO2 is generally used for synchronizing other peripherals, such as ADCs, but not as an internal trigger for other timers , so if If you need to use TRGO2 for ADC synchronization, you should be able to configure TIM1 or TIM8 to output TRGO2 to the ADC directly

For inter-timer synchronization, refer to the table you've shared. 

 

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.

Dear Sarra

I understand your description.

In my case, I am developing a dual-channel three-phase motor driver.  (control 2 motors simultaneously)
This means I need two timers to generate 2 sets of the upper/lower side three-phase PWM signals respectively. 

Currently, I am using TIM1 and TIM8 to output the two sets of three-phase PWMs.

TIM1 is master and TIM8 is the slave (synchronized via ITR using TIM1's TRGO).

TIM1 TRGO2 is used to trigger ADC1 for sampling the current of Motor 1.
TIM8 TRGO2 is used to trigger ADC2 for sampling the current of Motor 2.

Additionally, I have configured TIM3 and TIM4 in Encoder mode.
I would like to use TRGO2 as the ITR input for TIM3 and TIM4 to synchronize and latch the encoder count values.
However, I found that ITR does not support selecting TRGO2, which is why I raised this question.

The following figure is what I would want to implement.

yang2_0-1747218122095.png