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.

TMS320F28P650DK: UART with DMA

Part Number: TMS320F28P650DK

Hi,

I would like to know if it is possible to transmit a 16bit buffer using UART and DMA without having to decompose the buffer into bytes.

For example, if my buffer has the values 0x1122, 0x3344, 0x5566 do I need to decompose this buffer into another buffer with the values 0x0022, 0x0011, 0x0044, 0x0033, 0x0066, 0x0055 before transmitting using UART and DMA? Or does DMA have some setting that allows it to do this automatically?

  • Hi,

    DMA supports 16 bit transfer at a time. You dont need to convert it into bytes to transfer the same. 

    Hope this resolves your query.

    Thanks & Regards

    Pramod

  • Hi, Pramod

    DMA transfers in 16 bits, but since the UART only transfers a maximum of 8 bits, I believe that the UART would only transfer the least significant part of each word transferred to its data register.

    Can the UART be configured to transfer the LSB part and then the MSB part of each transferred word to its data register?

    Ari

  • Hi Ari,

    Can you view the "uart_ex2_loopback_udma.c" from F2838x and see if this answers your question.

    Regards,

    Vince

    Regards,

    Vince

  • Hi Vince,

    "uart_ex2_loopback_udma.c" is for the cortex-m4 core. 

    For cortex-m4 there are no problems because it only fits one byte for each consecutive address, so a 16-bit value will be stored as a sequence of 2 consecutive bytes.

    My hope was that Texas had thought of overcoming this disadvantage of the C28x by implementing in this new UART of the F28P65x some logic that when writing a word (16 bits) in the data register of the UART, it would transmit the two bytes (LSB and then the MSB), instead of transmitting only the LSB.

  • Hi Ari,

    I'm double checking with the team, but I believe this is indeed a limitation of using the 16-bit capable DMA with the 8-bit capable UART. I expect to have a reply for you by Friday, but would assume that what you have mentioned is indeed correct.

    Regards,

    Vince

  • Thanks Vince.

     I hope that in the future Texas will release a new CPU for the C2000 that has byte addressing and hardware interrupt nesting. For the time being we have to solve it by software.