cancel
Showing results for 
Search instead for 
Did you mean: 

How do I cascade the output of TIM1 into HRTIM count?

Aqwer.1
Associate II

I need to use the HRTIM for it's 10 phase synced outputs, but at a lower speed than what pre-scale and period can cover.

I have TIM1 producing the base waveform I want, and now I need HRTIM counts to be based on that, instead of the CPU clock. I found things in the DS and RM to hint that this can be done, but I haven't yet found the right collection of settings to do it.

Specifically, Figure 281 of RM0433 shows hrtim_in_sync[3:1], which I believe would let me start all 5 timers at once. Also, Table 299 says "hrtim_in_sync2: the source is a regular TIMx timer (via on-chip interconnect)".

In searching online, I found a reference that said: tim_itr10 = hrtim_out_sync2. I haven't yet found a figure or table that shows such mappings. Is that the right path? Where should I look for on-chip interconnect information?

Chip is STM32H743, and I'm using the STM32CubeIDE v 1.4.2 environment.

3 REPLIES 3
TDK
Guru

Those are sync signals, not the same as a clock source.

HRTIM can't be chained after another timer. You can adjust it to have the same clock as other timers through RCC_CFGR_HRTIMSEL, which will give you another factor of 2 reduction in speed, or more if you're willing to sacrifice performance.

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

Can you use external sync?

Use that to reset MASTER timer and master timer will count to what period you need and trigger another HR timer.

Or you can cascade different HR timer to reset the HRtimer until you can achieve the desired timing.

marbel
Associate II

Hi Vicagayun

Did you find a solution to this? I am in a similar situation where I do need the syncing and interconnecting with the crossbar, but need it in a much lower frequency than what the HRTIM can produce.

BR

Martin