cancel
Showing results for 
Search instead for 
Did you mean: 

HAL of HRTIM Master timer

victagayun
Senior III

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);

1 ACCEPTED SOLUTION

Accepted Solutions
victagayun
Senior III

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"

View solution in original post

1 REPLY 1
victagayun
Senior III

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"