Skip to main content
Associate
August 26, 2026
Solved

G474RE + Workbench6.4.2 HSO:ADC trigged by TIM3 or TIM1 ??

  • August 26, 2026
  • 3 replies
  • 66 views

I am developing a control board based on the STM32G474RE microcontroller. This board is self‑designed using Board Designer within Workbench 6.4.2. After configuration and project generation in Workbench, the generated project works fine. The HSO option can be enabled, and no errors or warnings are reported for all parameters. Compilation in MDK‑ARM completes without any issues. I have reviewed the initialization code for ADC1 and ADC2, which are used for phase‑current and phase‑voltage sensing. In principle, the HSO measurement mechanism relies on synchronization with the PWM signals. The PWM waveforms are generated by TIM1. However, I observe that TIM3 is configured as the input trigger source for the ADCs in the initialization code, instead of TIM1 as I expected. Is this a bug in the code‑generation output? Please provide assistance.

今天 11:32

聊聊新话题

Best answer by GMA

Hello ​@JAMES1968,

Auxilliary TIM3 is used to trigger A/D converter peripherals several times (by default it is four times) per period.

3 replies

GMA
ST Technical Moderator
August 26, 2026

Hello ​@JAMES1968,

Refer to the HSO current and voltage sampling in three-shunt topology chapter in the user manual from Workbench tool > About > Documentations > Documentation.

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
JAMES1968Author
Associate
August 27, 2026

During a PWM period, currents and voltages are sampled several times (by default it is four times per period). To do so, an auxiliary timer is used to trigger A/D converter peripherals. The next figure shows the synchronization strategy between the TIM PWM output, auxiliary timer and the ADCs.

auxiliary timer  (Oversample TIM)    is TIM3  in MY project , so  I think    adc1,adc2  is trigged by TIM3   in  the  project  is right.!    ok?

GMA
GMABest answer
ST Technical Moderator
August 27, 2026

Hello ​@JAMES1968,

Auxilliary TIM3 is used to trigger A/D converter peripherals several times (by default it is four times) per period.

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA