Reset DMA transfer size

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by cracc on Tue May 31 07:26:37 MST 2016
Hi there,
I´m using an LPC4074 and I´m transfering data from UART2 to memory with the DMA.
This works fine as long as the packages are exactly as long as expected.
Every now and then a data package is getting corrupted and some bytes are missing. For those cases I´ve written a routine, that cancels the transfer after a timeout has been reached.
Now I´ve got the problem, that in the Control Register the transfer size is not zero and I can´t reset it.
I´ve already tried to halt the channel, disable the channel, but I can´t set the transfer size to zero.
I couldn´t find what I´m doing wrong.
Has anybody done something similar? Or an idea?
Thanks in advance.

The channel is configured as follows:

Control Register:
Terminal Count Interrupt enabled
Destination Increment enabled
Source Increment disabled
Source Destination Transfer Width Byte
Source Destination Burst Size Byte
Transfersize depending on expected Data package

Config Register:
Lock disabled
Terminal Count Interrupt not masked
Error Interrupt masked
Transfertype Peripheral to Memory Flowcontroller DMA
Destination Peripheral Memory
Source Peripheral UART2 Rx
Channel enabled