Init_eDMA bug - can't input negative number for SLAST

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Init_eDMA bug - can't input negative number for SLAST

Jump to solution
541 Views
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.

Labels (1)
Tags (2)
0 Kudos
1 Solution
402 Views
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


View solution in original post

0 Kudos
2 Replies
403 Views
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 Kudos
402 Views
bowerymarc
Contributor V

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

0 Kudos