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