1, using the serial port 0 for SPI Slave
The error settings are as follows:
U0CSR &= ~ (u0csr_mode) | U0csr_slave;
The correct settings are as follows:
U0CSR = (U0CSR & ~u0csr_mode) | U0csr_slave;
Where the macro is defined in Ioccxx10_bitdef.h, as shown below:
// U0CSR (0x86)-USART 0 Control and Status #define U0csr_mode 0x80#define u0csr_re 0x40#define u0csr_slave 0x20#define U0CSR_ FE 0x10#define u0csr_err 0x08#define u0csr_rx_byte 0x04#define U0csr_tx_byte 0x02#define u0csr_active 0x01
2, cc1110f32 as SPI slave end, no need to configure baud rate
3, the SPI of the main side and the SPI from the end of the need to configure the size of the end, and need to ensure that the size end setting is consistent. Both MSB or LSB
The size of the end sequence can be verified from the oscilloscope is set in the software.
4, different SPI Master and SPI from the end, its Cpol and cpha configuration is not necessarily the same, need to be verified. Can be used in poor lifting method.
For example, SPI from the end of good debugging Test Cpol, Cpha, Cpol+cpha, no cpol+ no cpha four cases.
CC1110F32 for SPI slave-side configuration