打印

关于DMA的uart FIFO的疑问,请版主明示。

[复制链接]
3411|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
rainbow99|  楼主 | 2011-10-31 21:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
TI的stellarisware里的udma_demo例程中,如下两个设置有些疑问,这里uart的fifo设置4_8,应该为fifo16字节大小的1/2,应该是8字节,这里为啥一直都说是4 byte。

    //
    // Set both the TX and RX trigger thresholds to 4.  This will be used by
    // the uDMA controller to signal when more data should be transferred.  The
    // uDMA TX and RX channels will be configured so that it can transfer 4
    // bytes in a burst when the UART is ready to transfer more data.
    //
    UARTFIFOLevelSet(UART0_BASE, UART_FIFO_TX4_8, UART_FIFO_RX4_8);


    //
    // Configure the control parameters for the primary control structure for
    // the UART RX channel.  The primary contol structure is used for the "A"
    // part of the ping-pong receive.  The transfer data size is 8 bits, the
    // source address does not increment since it will be reading from a
    // register.  The destination address increment is byte 8-bit bytes.  The
    // arbitration size is set to 4 to match the RX FIFO trigger threshold.
    // The uDMA controller will use a 4 byte burst transfer if possible.  This
    // will be somewhat more effecient that single byte transfers.
    //
    uDMAChannelControlSet(UDMA_CHANNEL_UART0RX | UDMA_PRI_SELECT,
                          UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 |
                          UDMA_ARB_4);

相关帖子

沙发
永远的不知| | 2011-10-31 21:38 | 只看该作者
1# rainbow99

楼主看的很仔细啊,这个问题我专门确认过,那个注释有问题,FIFO是16bytes, 1/2trigger是8个bytes触发。
但是DMA arbitration 设置的4个byte是没有问题的,这样是为了DMA的安全进行的配置。
设置成8个byte也可以接受。

使用特权

评论回复
板凳
wuhany| | 2011-10-31 21:41 | 只看该作者
版主大晚上还在回复问题,真是辛苦啊

使用特权

评论回复
地板
rainbow99|  楼主 | 2011-10-31 21:43 | 只看该作者
多谢不知版大了,帮我解释了很多疑问。

使用特权

评论回复
5
永远的不知| | 2011-10-31 21:44 | 只看该作者
3# wuhany

您也很用功,这么晚了还逛技术论坛。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

54

帖子

1

粉丝