for (int i=0; i<2; i++)
{
DMA.CTRL = 0;
DMA.CTRL = DMA_RESET_bm;
while ((DMA.CTRL & DMA_RESET_bm) != 0)
DMA.CTRL = DMA_ENABLE_bm;
DMA.CH0.SRCADDR0 = (((uint16_t)addr[i]) >> 0) & 0XFF;
DMA.CH0.SRCADDR1 = (((uint16_t)addr[i]) >> 8) & 0XFF;
DMA.CH0.SRCADDR2 = 0;
DMA.CH0.DESTADDR0 = (((uint16_t)&USARTC0.DATA)>>0 & 0XFF);
DMA.CH0.DESTADDR1 = (((uint16_t)&USARTC0.DATA)>>8 & 0XFF);
DMA.CH0.DESTADDR2 = 0;
DMA.CH0.ADDRCTRL = DMA_CH_SRCRELOAD_NONE_gc | DMA_CH_SRCDIR_INC_gc | DMA_CH_DESTRELOAD_NONE_gc | DMA_CH_DESTDIR_FIXED_gc;
DMA.CH0.TRFCNT = 5;
DMA.CH0.REPCNT = 0;
DMA.CH0.TRIGSRC = DMA_CH_TRIGSRC_USARTC0_DRE_gc;
DMA.CH0.CTRLA = DMA_CH_ENABLE_bm | DMA_CH_SINGLE_bm | DMA_CH_BURSTLEN_1BYTE_gc /*| DMA_CH_REPEAT_bm*/;
while(!(DMA.INTFLAGS & DMA_CH0TRNIF_bm));
_delay_ms(500);
}