Skip to main content
Visitor II
July 24, 2026
Solved

Can HRTIM be used in Input Capture mode on STM32G4x4 series?

  • July 24, 2026
  • 2 replies
  • 119 views

 

Hello ST Community,

I am considering using the High-Resolution Timer (HRTIM) on the STM32G4 series (specifically STM32G4x4 / G474) and would like to ask a few technical questions regarding its Input Capture functionality:

1. Is my understanding correct that the 184 ps high-resolution feature applies mainly to PWM generation (using DLL), while the Input Capture function operates at the base HRTIM clock frequency (up to 170 MHz, giving ~5.88 ns resolution)?
2. Is it possible to capture the timer counter values using the HRTIM capture units (CPT1 / CPT2) triggered by External Events (EEV) or internal signals (such as comparator outputs)?
3. If Q2 is yes, does capturing via internal signals (e.g., comparator) yield the same measurement resolution (~5.88 ns based on 170 MHz) as capturing via external pins?

Any clarification would be greatly appreciated. 

Thank you in advance!

Best answer by MasterT
  1. Yes.
  2. Yes.
  3. Yes.

Input capture on G4 HRTIM has the same resolution as any other timers. Doesn’t matter is it external or internal peripherial events.

 

2 replies

MasterT
MasterTBest answer
Lead II
July 24, 2026
  1. Yes.
  2. Yes.
  3. Yes.

Input capture on G4 HRTIM has the same resolution as any other timers. Doesn’t matter is it external or internal peripherial events.

 

T_Hamdi
ST Employee
July 28, 2026

Hello ​@KenInoue 

 Welcome to the ST community, and thank you for your questions.

referring to the STM32G4 reference manual.
For the first question, the answer is yes.

 

For the second question, the answer is also yes.

 

 

yes, the capture resolution is about the same, around 5.88 ns at 170 MHz, whether the trigger comes from an external pin or an internal signal like a comparator.

 

For more information on how to use the HRTIM in your application, you can refer to the HRTIM cookbook as a reference guide.

HRTIM cookbook - Application note

Best regards,

Hamdi

 

 

"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.Hamdi Teyeb"