PIT0 configuration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PIT0 configuration

470 次查看
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 回复

448 次查看
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 项奖励
回复