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.

[参考译文] CC2340R5:TX 发送 UART RX 收到的消息

Guru**** 2587345 points
Other Parts Discussed in Thread: CC2340R5

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1412708/cc2340r5-uart-rx-received-message-sent-by-tx

器件型号:CC2340R5

工具与软件:

我正在测试 CC2340R5、目前遇到这样的情况。 当我使用 UART 进行通信时、RX 缓冲区将接收 TX 发送的消息或接收到比预期完全错误的消息、但这种情况以前没有发生过。
但是、当我在 UART 线程中添加新的判断或调用函数时、偶尔会出现这种情况。
它是否与螺纹尺寸有关? 或者有什么问题吗? 在什么情况下存储器超出范围?

SDK:7.40.00.64

CCS 版本:12.7.0

示例项目:basic_ble

PS。 sem_wait_1s ()是当我修改 semaphore_pend ();并将其更改为1000个系统时钟周期,即1000ms 后的超时

UART2_Params_init(&uartParams);
uartParams.readMode = UART2_Mode_CALLBACK;
uartParams.readCallback = callbackFxn;
uartParams.baudRate = 9600;

uart = UART2_open(CONFIG_UART2_0, &uartParams);

if (uart == NULL)
{
    while (1) {}
}

UART2_write(uart, message, sizeof(message), NULL);
UART2_write(uart, rx_buffer, sizeof(rx_buffer), NULL);

sem_wait_1s(&sem);