s32k142 LPSPI interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k142 LPSPI interrupt

Jump to solution
1,523 Views
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 ?

Labels (1)
0 Kudos
1 Solution
1,455 Views
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

View solution in original post

0 Kudos
4 Replies
1,488 Views
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 Kudos
1,482 Views
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 Kudos
1,456 Views
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 Kudos
1,451 Views
Teja114
Contributor III

Thanks alot...

0 Kudos