SPI interface at fixed intervals based on eTimer_0 in MPC5744P

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

SPI interface at fixed intervals based on eTimer_0 in MPC5744P

1,204 次查看
azeemsha_poyil
Contributor I

Hi All

I am stuck with an issue using MPC5744P for SPI interface with an external sensor. I want to set the rate of calling the readSensor() function to 1KHz. I am trying to use the eTimer 0 based ISR to call the function at this rate.

Both the SPI interface and eTimer 0 works completely fine when run independently.

However, when I combine these two functions, the timer ISR is never entered. There seems a mismatch in the Mode or Clock configuration or in setting the interrupt priority.

It works if I comment out the below code, but then, only SPI works fine.

// INTC_0.PSR[611].R = 0x8001;    //set interrupt priority for eTimer 0

If I keep this line, neither the timer ISR nor the SPI works.

Please see the code attached.

Am I missing something here?

Thanks

Az

0 项奖励
回复
2 回复数

1,152 次查看
azeemsha_poyil
Contributor I

Hi

Thanks for your comments. I was doubting the project settings too. Just ported the code to an existing timer project, which solved this issue. I am not sure what exactly fixed this.

0 项奖励
回复

1,153 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi  Az,

the piece of code you provided looks normal, so hard to suggest. It is needed to debug full project to find the issue.

Are you able to upload the project so we can debug it on the EVB?

BR, Petr

0 项奖励
回复