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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

69 Views
Contributor I

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.

Labels (1)
Tags (1)
0 Kudos
1 Reply

7 Views
NXP TechSupport
NXP TechSupport

Hi,

if you need to modify the CNTR value then this function can be used.

BR, Petr

0 Kudos