AnsweredAssumed Answered

UART and DMA on 5676R

Question asked by Fabrizio Santini on Jan 21, 2019
Latest reply on Jan 28, 2019 by David Tosenovjan

In my current implementation of a project, I am using a UART to send and receive messages. However, the reception part is pretty inefficient as it can only receive one byte at the time. I have to send one byte at the time from the host. This works just fine when one is using a terminal like Putty, but it doesn't work when used with Python.serial.


    unsigned int receivedBytes = 0;
    while (receivedBytes < length)
        while (ESCI_A.SR.B.RDRF == 0) {}
        ESCI_A.SR.R = 0x20000000; // Clear the RDRF flag
        *(static_cast<char*>(bytes) + receivedBytes) = static_cast<char>(ESCI_A.DR.B.D); // Read the byte from the register
        receivedBytes += 1;

    return receivedBytes;


My understanding is that with a DMA transfer, it would be possible to receive an entire array of bytes. However, I have no experience about setting up a DMA transfer for the ESCI_A.


Can anyone point out to an example with the MPC5676R and DMA transfer with ESCI_A (I couldn't find any) or help me to set it up?




uart dma receiver