我在使用EZSDK 06_00_00_00
缺省UART是Disable DMA的;
我Enable了EDMA之后,发现经常丢数据,但是不使用DMA, 用polling就没有问题;
请问,在SDK6.0上,如果要Enable DMA, 要怎么做?
有什么例程可以参考吗?
有文档来介绍,如何Enable UART DMA吗?
关于AM335X UART DMA,有什么已知的issue吗?
谢谢!
Steven Liu1:
Linux EZSDK的6.0中尚未支持UART DMA,你那个enable的操作,底下有实现么?印象中是没有的,需要自己加入相关的DMA支持代码。、
UART DMA在starterware中有一个历程,你可以参考这个去做相关的工作。装完starterware后,在导入该目录的工程即可:C:\ti\AM335X_StarterWare_02_00_01_01\build\armv7a\cgt_ccs\am335x\evmAM335x\uart_edma
Yaoming Qin:
回复 Steven Liu1:
除了starterware外,也可以参考下面的描述
Just to be sure I am not confusing linking and linked PaRAM set, assume linked transfer as at Figure 11-11 in chapter 11.3.3.9.
In my case Parameter Set 3 would be mapped to URXEVT0 (27) and the event is enabled in EER/EERH. Parameter Set 255 has no channel association, that is, it is used only as new PaRAM Set storage for linking.
After the total number of characters as specified in PaRAM Set 3 is transferred, new EDMA transfer parameters are loaded from PaRAM Set 255 into PaRAM Set 3. EDMA transfer continues moving RX characters to another buffer until the (linked) transfer is exhausted.
Do you see any potential problem with this?
yu zheng:
回复 Steven Liu1:
hello,
我们已经自己实现了UART DMA,现在能连续跑起来,但是调试中发现丢包很严重,错包率0.004,比较高;
比如下面接收的一段数据,应该全是0x33, 但是最后一段数据变成了0x39,错掉了;而且,0x33到0x39之间的数据都丢失了;不知道什么原因?
0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
根据我的debug,发现数据时好时坏,有时候连续几秒钟,都是对的,但是有时候数据就出错了;
请帮忙看看是什么问题?
yu zheng:
回复 Steven Liu1:
hello,
我们已经自己实现了UART DMA,现在能连续跑起来,但是调试中发现丢包很严重,错包率0.004,比较高;
比如下面接收的一段数据,应该全是0x33, 但是最后一段数据变成了0x39,错掉了;而且,0x33到0x39之间的数据都丢失了;不知道什么原因?
0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
根据我的debug,发现数据时好时坏,有时候连续几秒钟,都是对的,但是有时候数据就出错了;
请帮忙看看是什么问题?
yu zheng:
回复 Yaoming Qin:
hello yaoming,
不是太明白这段话的意思;
UART EDMA有硬件BUG吗?或者known issue?
我们的UART EDMA能跑起来,但是有时候会有大段数据丢失,并不是所有的数据都出错;不知道什么原因?
Jian Zhou:
回复 yu zheng:
现在用的波特率是多少,有没有把波特率降低试试