cancel
Showing results for 
Search instead for 
Did you mean: 

HRTIM doesn't run in Fast Mode

cosmic
Associate

I'm trying to use the HRTIM TimerA on the STM32-G474 to generate a one pulse on TA1 output in response to an external event on hrtim_eev1.

I need the pulse to be generate with low latency and low jitter, but I'm not being able to get the Fast mode working.

I've configured external event 1 with level sensing and asynchronous action in CubeMX, but I continue getting high response time latency (>7 cycles of fHRTIM) and a response time jitter of 1 cycle of fHRTIM clock (5.8ns), instead of the minimum jitter I would expect. Also, pulse width has no jitter, as expected when FastMode is disabled.

I start the timer with the HAL_HRTIM_SimpleOnePulseStart function. Afterwards the EE1FAST register (HRTIM_Common->EECR1->EE1FAST) is 0.

I've tried to set it by hand, but with no results.


CubeMX settings are as follows:

HRTIM_One_Pulse_Settings_01.JPGHRTIM_One_Pulse_Settings_02.JPG

 

Am I doing something wrong?

4 REPLIES 4

Hello, 

I agree that 7 cycles are not what is expected. Could you confirm please that you mean by fHRTIM: 170Mhz of the IP clocking? what do you mean by "time jitter"?

What you should expected is:

Output 1: SETx1R = CMP1, RSTx1R = PER or EEV

is it your understanding of the pulse shape you will get?

 

Best regards.

Hi Yassine, thank you for your reply.

Yes, I mean fHRTIM = 170Mhz.

For "time jitter" I actually mean the "Response time jitter" (as in Table 226, pag. 877 of RM0440 Rev 8):

cosmic_1-1717423150503.png

According to this table, the Response time jitter should be "minimal" in Fast mode (EExFAST=1). Instead I get a Response time jitter of 1 cycle of fHRTIM clock (5.8ns). It seems that FastMode is not being effective at all. I don't understand if CubeMX is not setting it properly...

I would need to produce a pulse with minimal latency and no jitter as the one in the lower portion of Figure 217 (EExFAST=1), instead I get a pulse as EExFAST was 0:

cosmic_0-1717423083287.png

Dear user, 

Thank you for your clarification, I will try reproducing this behavior on my side, discuss it internally with designers and then get back to you as soon as possible.

Best regards,

Yassine.

 

 

Hello, 

Thank you for your contributions and for your detailed explanations

After double check, I confirm the issue on my side, it has been reported to STM32CubeMX development team.

Internal ticket number: 183319 (This is an internal tracking number and is not accessible or usable by customers).

HAL_HRTIM_SimpleOnePulseChannelConfig function keeps the FastMode disactivated:

EventCfg.FastMode = HRTIM_EVENTFASTMODE_DISABLE;

However, I propose that you use the Advanced mode, Fast mode is well implemented.

Please, notice also that resolution, pulse width should follow IOs capabilities and Fmax regarding conditions of load and voltage.

I will keep you posted with updates.

Thx