cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 MCUs

Leylifer
Associate II

Hi,

I want to use input capture mode with high resolution timer(HRTIM) on stm32f334r8 microprocessor. I am sending a pulse signal over the oscilloscope. I use one of the External Event Input pins for this. I want to capture the rising edges of the pulses I send using the HRTIM_Simple_Base_Start function. However, I couldn't do that. The settings I made regarding the configuration are as attached. How can I use input capture mode with HRTIM?

 
Updating Media
7 REPLIES 7
Leylifer
Associate II

1t.png

2t.png

Issamos
Lead II

Hello @Leylifer 

Referring to the RM0364. I see that the input capture mode is not defined in the chapter 22 off the ref.man (High-Resolution Timer (HRTIM)). I think that the HRTIM of the f334 doesn't support the input capture mode. 

Best regards.

II

AScha.3
Chief III

capture should work - but what you wanna capture ??

you set counter free running + capture (event 5) -> seems no sense to me, you will get just random values this way.

 

If you feel a post has answered your question, please click "Accept as Solution".

Hi @AScha.3 

Can you give me more details about how to use HRTIM in input capture mode . 

Best regards.

Referring to the RM0364. p.643 read:

AScha3_0-1694007631662.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Well, there are two options besides the free running mode option.

1-The timer operaters in non triggerable single shot mode

2-The timer operaters in retrigerable single-shot mode.

Which of these would I choose? I want to capture the signal that I send as two pulses from the oscilloscope, to capture between the two rising edges, adjust the configuration and set HAL_HRTIM_SimpleBaseStart(&hhrtim1, HRTIM_TIMERINDEX_TIMER_C);

I tried to use the function.

i wold try :

- timer start on trigger , not retrigg., one shot counting up from zero

- capture on trigger -> int.

then capture should have the time yo want (and possible get int on start/first pulse also...just ignore.)

If you feel a post has answered your question, please click "Accept as Solution".