Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL
Hi All,
uDAM writes buffer to UART
Section 9.3 to 9.3.2.3 of Tiva TM4C123GH6PM Microcontroller, SPMS376E.
I followed the instructions and I was able to transfer words from buffer to buffer as well as bytes buffer to buffer.
Section 9.3.3 to 9.3.3.3 Configuring a Peripheral for Simple Transmit.
I followed the instructions, but the UART didn't receive data from DMA; because
when I write characters to the UART's buffer, it sends them to Putty terminal.
am I missing some instructions.
Here is a snip of instructions related to the initialization and transfer
#define CH7 (7*4)
#define BIT7 0x00000010
#define SIZE 64
uint8_t SrcBuf[SIZE];
uint32_t ucControlTable[256] __attribute__ ((aligned(1024)));
//*********************** added to select a peripheral *******************
UDMA_REQMASKCLR_R = BIT7;
// Select peripheral for channel 7
UDMA_CHMAP0_R = 0x20000000; // UART5_TX
UDMA_USEBURSTSET_R= BIT7; //µDMA channel [n] responds only to burst requests.
//*************************************************************************
//******************* Modified to trasnfer from buffer to peripheral ******
ucControlTable[CH7] = (uint32_t)source+63; // last address
//2. Program the destination end pointer at offset 0x074 to the address of the peripheral's transmit
//FIFO register (UART5_DR_R).
ucControlTable[CH7+1] = (uint32_t)UART5_DR_R; // last address
ucControlTable[CH7+2] = 0xC0008001+((count-1)<<4); //DMA Channel Control (DMACHCTL)
//Start transfer
UDMA_ENASET_R = BIT7; // µDMA Channel 7 is enabled.
UART5_DMACTL_R =UART_DMACTL_TXDMAE ;// µDMA for the transmit FIFO is enabled
UART5_DMACTL_R |=(1u<<1); // Transmit DMA Enable
//*************************************************************************
//**************************UART registers related to DMA ******************
UART5_LCRH_R= 0x00000070;// SPS:WLEN[2]:FEN
UART5_CC_R=0x0 ;//System clock (based on clock source and divisor factor)=80Mhz
UART5_CTL_R|=(1u<< 8)|(1u <<0)|(1u<<4); //UARTEN=1, FIFO enable
UART5_ICR_R =0xFFFFFFFF; // clear all int
UART5_IFLS_R |=0x00000003; // 4bytes or less generate event
//*************************************************************************