cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7: possible to configure HRTIM1 TIMA to trigger TIM13 start without SW ISR?

Torben1
Associate II

I'm working on a solution using STM32H753 MCU. HRTIM1 TIMA needs to generate short periodic 100 ns pulses periodically and drive MDMA channels. This already works fine.

In addition to above, I need to drive GPIO F8 low for a short 500 ns time window then set it again. F8 must go low synchronized to the HRTIM1 TIMA CH1 being set with max latency of 200 ns.

From AF mappings only timers TIM13 and TIM16 allows me to do this, so I moved on with TIM13.

Using SW IRQs (SET1 on HRTIM triggering ISR which starts TIM13) works fine but has too high latency (cannot get it below 2.2us running MCU at 480MHz and TIM13 at 120MHz) so gave up on that path.

 

I'm looking for a HW configuration solution. I have been perusing the reference manual and datasheet documentation but do not see a clear way to map this correctly. I believe I will need some sort of slave mode configuration for TIM13/TIM16 and route some OC/SETx1 event from HRTIM1 TIMA to generate a start trigger on the TIM13/TIM16 timers, but per the reference manual and datasheet it does not look like this is possible.

Out of curiosity I tried a quick CoPilot search which tells me some contrasting information. I tried it without success. It suggests:

HRTIM1->sCommonRegs.OENR |= HRTIM_OENR_TA1OEN;
TIM13->SMCR |= TIM_SMCR_TS_2 | TIM_SMCR_TS_0; // Select HRTIM TIMA event as trigger
TIM13->SMCR |= TIM_SMCR_SMS_2; // Set TIM13 to trigger mode

 but TIM13 is never started, so I don't think it's useful (can't find any information on SMCR availability for TIM13/TIM16 in reference manual nor in datasheet).

 

Please advise - this is a critical problem which I will need to address somehow. Preference is not to make a costly HW change as product is ready for pre-production.

Thank you.

0 REPLIES 0