AnsweredAssumed Answered

In MPC5744P, how do I reset the count after it stops counting in periodic mode.And the count has not reached the comparison value.

Question asked by 金 雨馨 on Feb 20, 2020
Latest reply on Feb 20, 2020 by Petr Stancik

void ETIMER_DRV_SetTimerTicks(const uint16_t instance,
const uint16_t channel,
const uint16_t count)
{
ETIMER_Type * base;

DEV_ASSERT(instance < ETIMER_INSTANCE_COUNT);
DEV_ASSERT(channel < ETIMER_CH_COUNT);
DEV_ASSERT(count < ETIMER_CH_MAX_TIMER_COUNT);

base = s_etimerBase[instance];
/* Sets the timer channel period in count unit */
base->CH[channel].CNTR = count;

}

 

Can I use the function above?

 

                                                                                                                                                                           Thank you.

Outcomes