kl16 dma with enable circular

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

kl16 dma with enable circular

Jump to solution
833 Views
yourchoochoo
Contributor I

Hi,

I use KL16  DMA  for uart transfer .

When i use DMA, i enable  DMOD (Destination Address Modulo) ,and set circular buffer size 16 bytes(DMOD writed 0000) ,.

After  uart  trans  16  bytes,  receive_buffer will  lost the last data(receive_buffer[15]), and  BCR value  is right.

The same  thing happens when DMOD be set to 0010.Will lost receive_buffer[31].1.png2.png

Labels (1)
0 Kudos
Reply
1 Solution
731 Views
mjbcswitzerland
Specialist V

Hi Yi

Ensure that the memory that you are receiving the data to is also modulo aligned. That is, if you use modulo 16 make sure that it starts on a boundary that is divisible by 16; eg. 0x20000000, 0x20000010, 0x20000020, etc. when in SRAM.

Regards

Mark

View solution in original post

0 Kudos
Reply
1 Reply
732 Views
mjbcswitzerland
Specialist V

Hi Yi

Ensure that the memory that you are receiving the data to is also modulo aligned. That is, if you use modulo 16 make sure that it starts on a boundary that is divisible by 16; eg. 0x20000000, 0x20000010, 0x20000020, etc. when in SRAM.

Regards

Mark

0 Kudos
Reply