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.

[参考译文] AWR6843AOP:带 DMA 的 UART、读取通道当前帧 cnt 返回旧值

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

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1371468/awr6843aop-uart-with-dma-reading-channel-current-frame-cnt-return-old-value

器件型号:AWR6843AOP

工具与软件:

您好!

我有 带 DMA 的6843AOP UART:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
UART_Params_init(&uartParams);
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.clockFrequency = gMmwMssMCB.cfg.platformCfg.sysClockFrequency;
uartParams.baudRate = gMmwMssMCB.cfg.platformCfg.commandBaudRate;
uartParams.isPinMuxDone = 1;
uartParams.dmaHandle = dmaHandle;
uartParams.txDMAChannel = UART_DMA_TX_CHANNEL; //1
uartParams.rxDMAChannel = UART_DMA_RX_CHANNEL; //2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

我没有确切的输入数据长度、因此我修改了 UartSci_read (在 uartsci.c 中)而不等待信标。

Fullscreen
1
// status = SemaphoreP_pend (ptrUartSciDriver->readSem, ptrUartSciDriver->params.readTimeout);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

´m 在其他任务中、我查找传输的数据数量:

Fullscreen
1
2
3
memset(&pChanStatus, 0, sizeof(pChanStatus));
retCode = DMA_getChannelStatus(handlee, 2, &pChanStatus);
cnt_1 = pChanStatus.chCurrFrameCnt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

高于所需限制的情况为:

Fullscreen
1
UART_readCancel(gMmwMssMCB.commandUartHandle);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

但在 readCancel 和 UART_READ 的新调用后、dma_getChannelStatus 仍返回最后一个值(cnt_1)。 这是因为在我收到例如30B 长消息后、执行 readCancel+UART_Read 、 然后又收到30B 消息时、该值未更改。 第二次接收到此消息后、值发生了变化。

是否有其他方法可以检查接收到的 DMA 字节的数量? 或者如何纠正此行为?  

提前感谢您!

x 出现错误。请重试或与管理员联系。