This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Running UART with EDMA in big endian mode

Other Parts Discussed in Thread: TMS320C6424

Hi,

I am trying to implement uart receive and transmit with the help of EDMA controller. I have the little endian implementation which is working. But the project specification requires a big endian implementation. I have changed the project settings but it is not working. I find that the issue is with the EDMA controller. In case of uart receive, the data is reaching the RBR register correctly. But the EDMA is only writing 0s as output. I have attached here with the EDMA parameters settings and the functions used. Please help me in tracing the problem with the EDMA part.

Regards,

Ragesh2047.UART_EDMA.zip

  • Ragesh,

    Which DSP device are you using?

    First guess is that you must use 32-bit access for all accesses to the McBSP. 16-bit or 8-bit accesses from the EDMA are not valid for many of the TI DSP devices.

    Regards,
    RandyP

  • Hi RandyP,

    Thanks for the reply.

    I am using TMS320C6424.

    Also one update from my side. After changing the setting in favor of big endian mode we could see that if we set A_CNT to 4,B_CNT to 256 and DST_BIDX to 4, we could get the output correctly. But each byte from UART is written as a 32 bit value by the EDMA. For example: earlier in little endian, if the output was 0xDEADBEEF, now we get 0x000000DE, 0x000000AD..etc as output of EDMA.

    Can you please tell me how to configure it for byte by byte transfer.

    Regards,

    Ragesh

  • Ragesh,

    Accesses to the McBSP peripheral must be 32-bit accesses.

    Once you have copied the values into 32-bit space, you could run another EDMA copy that reads only the byte fields that you want (ACNT=1 BSRCIDX=4) and write those to a byte-packed buffer (ACNT=1 BDSTIDX=1).

    But the original read from the McBSP must be with ACNT=4.

    You may want to study the EDMA3 User's Guide to understand chaining, which could be used to run the second copy of bytes to a new buffer.

    Or I can suggest an EDMA3 training video that may help you understand some of the features explained in the User's Guide.

    Regards,
    RandyP

     

    If you need more help, please reply back. If this answers the question, please click  Verify Answer  , below.

  • Thank you RandyP for the replies.

    We could solve it by changing the SAM(Serial Adrres mode) bit and adding offset to address. Now we are able to do it byte by byte.

     

    Regards,

    Ragesh