[S32K146] SPI#2 doesn't receive any data from Rx FIFO

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

[S32K146] SPI#2 doesn't receive any data from Rx FIFO

935 Views
yongho_shin
Contributor I

Dear NXP team,

In my automotive project, the S32K146 controls the ADSP via SPI.

The SPI#2 (PTB25,27,28,29) is used for it and I can see the valid signals on the PTB28 (LPSPI2_SIN).

But the data from RX FIFO is always empty (0x00).

I've checked the PINMUX configuration for them, but there's no problem.

Here is a register dump for SPI#2.

Could you check whether there is a problem on it ?

========== PINMUX for SPI#2 ==========
PORTB->PCR[25] = 0x00000500
PORTB->PCR[27] = 0x00000500
PORTB->PCR[28] = 0x00000500
PORTB->PCR[29] = 0x00000500
=====================================
========== SPI#2 registers ==========
LPSPI2->PARAM = 0x00000202
LPSPI2->CR = 0x00000009
LPSPI2->SR = 0x00000001
LPSPI2->IER = 0x00000000
LPSPI2->DER = 0x00000000
LPSPI2->CFGR0 = 0x00000000
LPSPI2->CFGR1 = 0x00000001
LPSPI2->DMR0 = 0x00000000
LPSPI2->DMR1 = 0x00000000
LPSPI2->CCR = 0xdcdcdc6e
LPSPI2->FCR = 0x00020001
LPSPI2->FSR = 0x00000000
LPSPI2->TCR = 0x0000007f
LPSPI2->RSR = 0x00000002
=====================================

Tags (3)
0 Kudos
2 Replies

773 Views
yongho_shin
Contributor I

Hello Daniel,

I've tried with short frame sizes - 8bits, 16bits, 32bits, but it also has same problem.

Currently I'm testing with the reference code of the S32K SDK and will let you know the result.

Thanks for your help.

BR,

Yongho Shin.

0 Kudos

773 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,
You configured 128-bit long frame (TCR_FRAMESZ).
Can you try with a short frame first?
Can you share your code?

Regards,
Daniel

0 Kudos