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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

753件の閲覧回数
2030888320
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.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

691件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

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

BR, Petr

0 件の賞賛
返信