cancel
Showing results for 
Search instead for 
Did you mean: 

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

AndiAndi
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
AndiAndi
Associate II

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.

View solution in original post

3 REPLIES 3

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
Chief II

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
Associate II

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.