CC1110F32 for SPI slave-side configuration

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.