SPI slave cannot be update response data in PSC continues to be LOW.(K22f))

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

SPI slave cannot be update response data in PSC continues to be LOW.(K22f))

673 Views
jimhuang2
Contributor III

Why does Slave need to switch PSC to update data?

SPI Master/Slave device is MK22FN512xxx12.

Master need to send cmd(1Byte) and dummy(1Byte) in PSC continues to be LOW.
Master send cmd, and Slave receives cmd, It will prapare the data for master. (PUSHR_SLAVE = slave_data)
Master send dummy, Slave sent wrong data to master.

Example:
Step 1.
SPI_Master send : cmd (0x30), dummy(0x00)
SPI_Slave write data: data (0x05), None.
Result:
Master send dummy to receive data : 0x00

Step 2.
SPI_Master send : cmd (0x30), dummy(0x00)
SPI_Slave write data: data (0x08), None.
Result:
Master send dummy to receive data : 0x05.

Slave hardware set:
MCR: 0x6003000
CTAR_SLAVE: 0x38000000
RSER: 0x20000

Master hardware set:
MCR: 0x84010001
CTAR: 0x38006666
RSER: 0x20000

Best Regards

Jim

0 Kudos
Reply
1 Reply

578 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Can you use a oscilloscope to see the SPI waveform? You set the slave MCR 0x6003000. That means PCSS is used and all inactive state of PCSx is high. This setting is different with master.

Regards,

Jing