Skip to main content
victagayun
Senior III
November 6, 2019
Solved

HAL of HRTIM Master timer

  • November 6, 2019
  • 1 reply
  • 1393 views

How to convert these LL to HAL?

 /* Clear ISR flag */
 HRTIM1->sMasterRegs.MICR = HRTIM_MASTER_IT_MREP;

and

HRTIM1->sMasterRegs.MCMP1R = (MULTIPHASE_PERIOD / 5);

If I use Timers A-E

I usually use these:

/* Clear Interrupt flag */
__HAL_HRTIM_TIMER_CLEAR_IT(&hhrtim1, HRTIM_TIMERINDEX_TIMER_A, HRTIM_TIM_IT_REP);

and

/* Update Duty1A on BUCK side */
__HAL_HRTIM_SETCOMPARE(&hhrtim1, HRTIM_TIMERINDEX_TIMER_A, HRTIM_COMPAREUNIT_1, CurrentDutyA);

This topic has been closed for replies.
Best answer by victagayun

Sorry for the stupid question.

Got it on the manual https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/8c/dc/58/e5/4c/87/43/39/DM00610707/files/DM00610707.pdf/jcr:content/translations/en.DM00610707.pdf

/* Clear Interrupt flag */
__HAL_HRTIM_TIMER_CLEAR_IT(&hhrtim1, HRTIM_TIMERINDEX_MASTER, HRTIM_TIM_IT_REP);

and

/* Update Duty1A on BUCK side */
__HAL_HRTIM_SETCOMPARE(&hhrtim1, HRTIM_TIMERINDEX_MASTER, HRTIM_COMPAREUNIT_1, CurrentDutyA);

So basically "HRTIM_TIMERINDEX_TIMER_A" to "HRTIM_TIMERINDEX_MASTER"

1 reply

victagayun
victagayunAuthorBest answer
Senior III
November 6, 2019

Sorry for the stupid question.

Got it on the manual https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/8c/dc/58/e5/4c/87/43/39/DM00610707/files/DM00610707.pdf/jcr:content/translations/en.DM00610707.pdf

/* Clear Interrupt flag */
__HAL_HRTIM_TIMER_CLEAR_IT(&hhrtim1, HRTIM_TIMERINDEX_MASTER, HRTIM_TIM_IT_REP);

and

/* Update Duty1A on BUCK side */
__HAL_HRTIM_SETCOMPARE(&hhrtim1, HRTIM_TIMERINDEX_MASTER, HRTIM_COMPAREUNIT_1, CurrentDutyA);

So basically "HRTIM_TIMERINDEX_TIMER_A" to "HRTIM_TIMERINDEX_MASTER"