DMA question. What is the differences between MLNO vs MLOFFNO vs MLOFFYES

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

DMA question. What is the differences between MLNO vs MLOFFNO vs MLOFFYES

跳至解决方案
867 次查看
nijo
Contributor II

Hey,

 

Could anyone help me with the difference between then these fields:

 

DMA_TCD0_NBYTES_MLNO
DMA_TCD0_NBYTES_MLOFFNO
DMA_TCD0_NBYTES_MLOFFYES

 

Any help greatly appreciated.

0 项奖励
1 解答
608 次查看
konrada
Contributor IV

They refer to the same memory address, so it doesn't matter which one you use. Depending on the DMA settings, the TCDx_NBYTES field has a different bit layout, and the different names are one way of coping with that. (My guess is that Freescale uses a generator to generate header files and documentation from a chip description, and the generator doesn't support a register with varying bit layouts).

在原帖中查看解决方案

0 项奖励
2 回复数
609 次查看
konrada
Contributor IV

They refer to the same memory address, so it doesn't matter which one you use. Depending on the DMA settings, the TCDx_NBYTES field has a different bit layout, and the different names are one way of coping with that. (My guess is that Freescale uses a generator to generate header files and documentation from a chip description, and the generator doesn't support a register with varying bit layouts).

0 项奖励
608 次查看
nijo
Contributor II
Thank you very much for you answer.
Just for future reference this is what I found after you "tip", this is taken from MK60N512VMD100.h

 

union {
uint32_t NBYTES_MLNO;
uint32_t NBYTES_MLOFFNO;
uint32_t NBYTES_MLOFFYES;
};

 

(That is, they do indead reference the exact same memory address).

0 项奖励