Skip to main content
AndiAndi
Associate II
September 6, 2019
Solved

How to trigger a timer to start from an external rising edge?

  • September 6, 2019
  • 3 replies
  • 3361 views

Hello,

for a measurement task, I have to perform an ADC readout a certain time after a rising edge occurs from an external device.

My idea was to use the HRTIM with an external event but I am unsure if it is possible to trigger a timer start with an EEV.

I am using a STM32H743ZI currently on a Nucleo board with CubeMX with the MCU package 1.5.0.

This topic has been closed for replies.
Best answer by AndiAndi

Thanks for your help. I know that the HRTIM is kind of complex for the task but I can take advantage of some of its functionality for other parts of the measurement.

I solved the problem by using the Sync functionality, connecting my signal to HRTIM_SCIN. The timers I use are configured to start on sync and it is working as expected.

3 replies

waclawek.jan
Super User
September 6, 2019

IMO HRTIM is way too complicated for this simple task which can be accomplished by any normal timer.

See for example the [CubeH7]\Projects\STM32H743I-EVAL\Examples\TIM\TIM_OnePulse example, and there are surely more such. Combine this with ADC being triggered from timer, there are also examples for that.

I don't use Cube/CubeMX.

JW

Piranha
Principal III
September 6, 2019

Take normal timer and connect the external signal to TIMx_ETR pin.

Set timer slave mode to "trigger" or "combined reset + trigger" mode and set trigger source to ETR.

AndiAndi
AndiAndiAuthorBest answer
Associate II
September 9, 2019

Thanks for your help. I know that the HRTIM is kind of complex for the task but I can take advantage of some of its functionality for other parts of the measurement.

I solved the problem by using the Sync functionality, connecting my signal to HRTIM_SCIN. The timers I use are configured to start on sync and it is working as expected.