PIT0 configuration

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

PIT0 configuration

812件の閲覧回数
kamaleshpatil260493
Contributor I

Hi,

I am working on the S32K311 board, I am trying to configure PIT0 timer for 1 ms with below configurations

PIT_0.MCR.R = 0x02;

PIT_0.TIMER[0].LDVAL.R = 47999;

/*Set TIE bit in TCTRL register Enable timer0 interrupt*/

/* Set TEN bit in TCTRL register to Start timer*/

PIT_0.TIMER[0].TFLG.B.TIF = 1;

PIT_0.TIMER[0].TCTRL.B.TIE = 1;

PIT_0.TIMER[0].TCTRL.B.TEN = 1;

 

/*Enable interrupts for PIT0*/

NVIC_ClearPendingIRQ(PIT0_IRQn);

NVIC_EnableIRQ(PIT0_IRQn);

 

/*Clear MDIS bit to Enable PIT*/

PIT_0.MCR.B.MDIS = 0;

 

It's not working as expected. Can you please suggest me?

 

0 件の賞賛
返信
1 返信

790件の閲覧回数
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Have a look at the reference examples, they are part of RTDs.

petervlna_0-1749542055449.png

 

It's not working as expected. Can you please suggest me?

What do you mean by it is not working? PIT is not counting / not triggering interrupts?

Best regards,

Peter

 

0 件の賞賛
返信