打印
[汽车MCU – KEA]

MPC5643L eDMA tcd描述符smod字段解释

[复制链接]
1026|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
umxxhs|  楼主 | 2016-9-3 12:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
背景:以前都是玩ARM的,各家给的底层支持库都很完备。最近接触MPC5643L,power架构的,加之芯片很多都是汽车级的需求设计的,与工控常用的ARM芯片差异还是不小。加之freescale相应的示例太少,所有底层的操作都得直接取操作寄存器,全是硬编码,也没有宏定义,个人感觉不太好上手,心塞呀。
问题:eDMA模块关于TCD寄存器中smod字段,起什么作用该怎么理解?
以下是手册中过于smod的描述,看了好几遍,还是无法理解,求大侠们帮忙,感激不尽~
Name: smod[0:4]
Description: Source address modulo
Value:
0    Source address modulo feature is disabled.
non-0    The value defines a specific address bit which is selected to be either the value after saddr + soff calculation is performed or the original register value. This feature provides the ability to easily implement a circular data queue. For data queues requiring power-of-2 “size” bytes, the queue should be based at a 0-modulo-size address and the smod field set to the appropriate value to freeze the upper address bits. The bit select is defined as ((1 << smod[4:0]) - 1) where a resulting 1 in a bit location selects the next state address for the corresponding address bit location and a 0 selects the original register value for the corresponding address bit location. For this application, the soff is typically set to the transfer size to implement post-increment addressing with the smod function constraining the addresses to a 0-modulo-size range.

相关帖子

沙发
umxxhs|  楼主 | 2016-9-7 22:32 | 只看该作者
估计没有人回答了,自己都感觉很枯燥,短时间内难消化,还得有例子结合起来学习才好理解。

使用特权

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

本版积分规则

1

主题

6

帖子

0

粉丝