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.

CC2642R: cc2642 尝试使用sdk种的uart2callback 实现串口的收发,但能发送 却无法接收数据,不确定什么原因

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
void processReceivedData(void)
{
// RX
size_t bytesRead;
size_t bytesWritten = 0;
bytesRead = 0;
uint32_t status = UART2_STATUS_SUCCESS;
//
status = UART2_read(uartHandle, rxBuffer, 5, &bytesRead);
if (status != UART2_STATUS_SUCCESS)
{
/* UART2_read() failed */
switch (status) {
case UART2_STATUS_EINUSE:
// System_printf("UART read: The UART is currently in use.\n");
sendData("UART read: The UART is currently in use.\n", strlen("UART read: The UART is currently in use.\n"));
break;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

代码如下   运行后

数据可以一直发送 但uart_read  一直显示串口在使用

Hello, UART!
UART read: The UART is currently in use.