Valentina
To use DMA you have to ensure that access rights are set up correctly.
Try the following, which is needed for the UART to access from RAM:
// General access set up
GPACR0 = SUP_USER_FULL_ACCESS; // enable peripheral SRAM access
// Access set up per UART channel
PACR_UART1 |= (SUP_USER_FULL_ACCESS SHIFT_LEFT_BY UART1_ACCESS_SHIFT); // enable DMA access to UART1
(SHIFT_LEFT_BY is the sign to shift left. This gets removed when posting...)
// some defines to go with it
#define SUP_USER_FULL_ACCESS 0x04
#define UART0_ACCESS_SHIFT 4
#define PACR_UART1 PACR2
#define UART1_ACCESS_SHIFT 0
#define PACR_UART2 PACR3
#define UART2_ACCESS_SHIFT 4
Regards