Init_eDMA bug - can't input negative number for SLAST

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

Init_eDMA bug - can't input negative number for SLAST

跳至解决方案
1,110 次查看
bowerymarc
Contributor V

SLAST in the Kinetis eDMA engine is a 32-bit number. As such it can be treated as either signed or unsigned.  One might use this to implement a circular buffer in which case it makes sense to enter it as a negative number.  The Init_eDMA bean doesn't allow this (called Address adjustment field in data source/destination).

Also - while not a bug a shortcoming is that while you can put an #include in the 'external object declaration' and use symbols in the Address field, you can not in the Address offset/adjustment fields.  It would be nice to allow that (toggle D, H, or text), to be able to use #defines and formulas from stuff in the #include you can put in.

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
971 次查看
Petr_H
NXP Employee
NXP Employee

Hi,

Yes, you are right, currently it's not supported, the address adjustment is unsigned field. As a workaround, it's necessary to compute the 32-bit number corresponding to the negative value yourself and put it there. I'm passing your comment to the development team to possibly improve the component in the next releases.

To change the adjustment value (after the initialization or later in the code), you can also use PDD macro DMA_PDD_WriteLastSourceAddressAdjustmentReg (see the PDD folder under the Init_eDMA component).

best regards

Petr Hradsky

Processor Expert Support Team


在原帖中查看解决方案

0 项奖励
回复
2 回复数
972 次查看
Petr_H
NXP Employee
NXP Employee

Hi,

Yes, you are right, currently it's not supported, the address adjustment is unsigned field. As a workaround, it's necessary to compute the 32-bit number corresponding to the negative value yourself and put it there. I'm passing your comment to the development team to possibly improve the component in the next releases.

To change the adjustment value (after the initialization or later in the code), you can also use PDD macro DMA_PDD_WriteLastSourceAddressAdjustmentReg (see the PDD folder under the Init_eDMA component).

best regards

Petr Hradsky

Processor Expert Support Team


0 项奖励
回复
971 次查看
bowerymarc
Contributor V

Yes, of course I input the unsigned equivalent and that works.

0 项奖励
回复