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

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

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

701 次查看
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 项奖励
回复
1 回复

606 次查看
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