s32k142 LPSPI interrupt

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

s32k142 LPSPI interrupt

跳至解决方案
2,596 次查看
Teja114
Contributor III

Hi there,

iam currently working with S32K142 , i had written LPSPI driver for SDCARD it is working fine.

i implemented it as a polling method.

Now i want to change as interrupt method.

can you please guide us how do i change my code to interrupt method.

Note: By changing interrupt method can i detect sdcard/slave present and if sdcard not present the processor wont halt at LPSPI driver ?

标签 (1)
0 项奖励
回复
1 解答
2,528 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Unfortunately, there is no library with the direct register names. Inside each function of the API, you can find which registers are set or cleared. On the i.mxrt1050 I suggest you use the example lpspi_interrupt for reference.

 

If you have more questions do not hesitate to ask me.

Best regards,

Omar

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,561 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

 

Unfortunately we don’t have an specific example of the LPSPI in interrupt however you can use as reference examples from other devices to implement it on the S32K1xx. I suggest you to use as reference the LPSPI examples from the I.MX RT1050, this device uses a similar SPI module.

https://mcuxpresso.nxp.com/en/welcome

 

You can enable the interruptions at the Interrupt Enable Register (IER).

 

Let me know if this is helpful, if you have more questions do not hesitate to ask me.

Best regards,

Omar

0 项奖励
回复
2,555 次查看
Teja114
Contributor III

Hi @Omar_Anguiano ,

just i went to the link. 

i got some reference codes but it is difficulty to understand so is there any code having PDL (Peripheral Driver Library)

having register names directly with out having the API'S  just send me the link.

 

Thanks in advance

0 项奖励
回复
2,529 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Unfortunately, there is no library with the direct register names. Inside each function of the API, you can find which registers are set or cleared. On the i.mxrt1050 I suggest you use the example lpspi_interrupt for reference.

 

If you have more questions do not hesitate to ask me.

Best regards,

Omar

0 项奖励
回复
2,524 次查看
Teja114
Contributor III

Thanks alot...

0 项奖励
回复