This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请问CC2540 USART1 uart怎么配置

Other Parts Discussed in Thread: CC2540

目前CC2540 USART0 uart用的是P0_2,P0_3已经调通,USART1串口要用的是P1_6,P1_7,我调了很久没调通,请问该怎么配置呢 ?相关寄存器该如何配置?

下面的宏该怎么看呢

#if (HAL_UART_ISR == 1)                                         //串口的模式是什么样的呢
#define HAL_UART_PERCFG_BIT 0x01               // USART0 on P0, Alt-1; so clear this bit.
#define HAL_UART_Px_RX_TX 0x0C                    // Peripheral I/O Select for Rx/Tx.
#define HAL_UART_Px_RX 0x04                           // Peripheral I/O Select for Rx.
#define HAL_UART_Px_RTS 0x20                        // Peripheral I/O Select for RTS.
#define HAL_UART_Px_CTS 0x10                        // Peripheral I/O Select for CTS.
#else
#define HAL_UART_PERCFG_BIT 0x02             // USART1 on P1, Alt-2; so set this bit.//Alt-1、Alt-2是什么意思呢
#define HAL_UART_Px_RTS 0x20                       // Peripheral I/O Select for RTS.
#define HAL_UART_Px_CTS 0x10                       // Peripheral I/O Select for CTS.
#define HAL_UART_Px_RX_TX 0xC0                  // Peripheral I/O Select for Rx/Tx.
#define HAL_UART_Px_RX 0x80                          // Peripheral I/O Select for Rx.
#endif