AnsweredAssumed Answered

UART and DMA on BF504

Question asked by grzegorz on Feb 2, 2013
Latest reply on Feb 5, 2013 by grzegorz

Hello.

 

I try to send data using UART1 and DMA on BF504. I have following code:

 

void configureUART() {

    *pPORTF_FER |= PF6 | PF7; //enable UART1 pins

    *pUART1_GCTL = UCEN; //enable UART clocks

    *pUART1_LCR = WLS(8); //8 data bits

    *pUART1_DLL = 1;

....

    *pDMA10_CONFIG = WNR | WDSIZE_16 | FLOW_AUTO; //UART1 RX, memory write, 16-bit, autobufer mode

    *pDMA10_START_ADDR = i2s_buf_out;  /* start address of data buffer */

    *pDMA10_X_COUNT = MAX_SAMPLES;     /* DMA loop count */

    *pDMA10_X_MODIFY = 4; /* DMA loop address increment */

....

    *pDMA11_CONFIG = WDSIZE_16 | SYNC | FLOW_AUTO; /* UART1 TX, memory read, 16-bit transfers, autobuffer mode */

    *pDMA11_START_ADDR = i2s_buf_in; /* start address of data buffer */

    *pDMA11_X_COUNT = MAX_SAMPLES;

    *pDMA11_X_MODIFY = 4; /* DMA loop address increment */

....

    *pDMA10_CONFIG |= DMAEN; /* enable DMA for RX */

    *pDMA11_CONFIG |= DMAEN; /* enable DMA for TX */

}

 

Unfortunately it doesn't work, the UART1_TX pins remains in high state, not data are transmitted. Expect the contents of i2s_buf_in to be continously transmitted, but nothing is happening. Am I missing something?

Outcomes