RT1170-EVK LPSPI full duplex error

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

RT1170-EVK LPSPI full duplex error

Jump to solution
870 Views
yf2
Contributor III

Dear support,

 

We am learning RT1170-EVK examples in MCUXpresso SDK v2.11 release.

We noticed that the LPSPI demo works well in half-duplex mode. Then we tweaked the demo to do full duplex SPI communications, to our surprise, the communication is only correct in MOSI direction but wrong in MISO direction. We checked the signals of SPI slave's TX pin and found it doesn't match the expected value.

Are there any special settings needed?

 

Regards,

yf2

 

Tags (1)
0 Kudos
1 Solution
838 Views
yf2
Contributor III

@PabloAvalos 

Thank you very much for following up.

Actually I forgot to mention that my SPI communication test was half-way working. My RT117x is playing slave role, the data from master is correct but the data from slave to master is incorrect. The master used to work well with a S32K slave before.

We checked the signals for the MISO direction. We noticed that slave.TX pin has correct signals when we unwire the MISO link at master side. That is the situation when I created the ticket.

Later, we rewired the SPI connection using shorter cable and used closer ground and got correct result. 

So our conclusion is that our initial LPSPI wiring was not okay. We found that 30cm wiring between two EVK boards didn't work, though that wiring length worked well with two S32K devices before. I am wondering if you have additional tips on wiring the LPSPI of the EVK? 

 

Regards,

yf2

  

View solution in original post

Tags (1)
0 Kudos
2 Replies
845 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @yf2 

 

Thanks a lot for reaching our technical support and for your patience.

 

I understand what you are trying to do, but it is unclear to me why you are checking the signals of SPI slave's TX pin if you are using SPI protocol, you should check firstly that your master is sending the SS (Slave Select) signal, and after sending data from your slave, check the MISO pin on your slave, and you have to see the frame.

 

If does not happen, you may share your piece of code here to see if you are setting up correctly the full duplex mode having MasterTransferBlocking and MasterReceiveBlocking functions.

 

Hope this helps you, please let me know some updates or more questions you have.

 

Thank you in advance.
Sincerely,
Pablo Avalos.

0 Kudos
839 Views
yf2
Contributor III

@PabloAvalos 

Thank you very much for following up.

Actually I forgot to mention that my SPI communication test was half-way working. My RT117x is playing slave role, the data from master is correct but the data from slave to master is incorrect. The master used to work well with a S32K slave before.

We checked the signals for the MISO direction. We noticed that slave.TX pin has correct signals when we unwire the MISO link at master side. That is the situation when I created the ticket.

Later, we rewired the SPI connection using shorter cable and used closer ground and got correct result. 

So our conclusion is that our initial LPSPI wiring was not okay. We found that 30cm wiring between two EVK boards didn't work, though that wiring length worked well with two S32K devices before. I am wondering if you have additional tips on wiring the LPSPI of the EVK? 

 

Regards,

yf2

  

Tags (1)
0 Kudos