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.

TMS320F28388D: using DMA for SCI TX

Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

hello,

I would like to use the SCI UART TX with GPIO 29 as the transmit port but I want to do it using the DMA channel.

There is no example for that in the C2000 examples folder (or at least I could not find such example)

I only found the "sci_ex1_loopback" example and I was able to change the GPIO ports there from 135 to 29 using the syscfg file.

and this worked fine.

Is it possible to make a change to this project and make it use the DMA for the TX?

Thanks.

  • Hi Yair,

    There is no direct DMA trigger linked to the SCI peripheral hardware on this device. What you can do is setup a software DMA trigger and force the same from within the SCI interrupt.

    You can refer to sci_ex2_loopback_interrupts for setting up SCI interrupt (the same can also be done through Sysconfig), and you can check out the examples in the dma/ directory for reference on how to setup software triggered DMA channels

    Regards,

    Arnav

  • Hello,

    Thanks for the answer, so in the dma examples folder I have the "dma_ex1_gsram_transfer" and "dma_ex2gsram_transfer" examples.

    are those good examples to find how to setup software triggered DMA channels?

    and are you talking about the DMA_forceTrigger(DMA_CH6_BASE) function?

    but how do I use the DMA to push the data to the SCI like this?

  • Yes, you can refer to those examples for reference code on how to setup the DMA configs, source and destination addresses etc. And yes, that is the function I meant.

    In your case, the destination address will be the transmit buffer (SCITXBUF). Burst and transfer size configurations can be adjusted according to your FIFO depth, and how many words you need to transfer.

    Regards,
    Arnav

  • ok thanks,

    I added to my "sci_ex1_loopback" the function of the initDMA() from the "dma_ex2_gsram_transfer" example program, 

    I tried to change the line with the destAddr to be like this:

    destAddr = (const void * )SCITXBUF; 

    but its not working the compiler is not familiar with the SCITXBUF identifier.

    do you know how can I reffer to the SCITXBUF? as if I understand you correctly this is the address of the register that transmit the SCI?

    Thanks

  • am I in the direction to solve this? or Im not in the direction at all...?

  • SCITXBUF is the naming of the SCI register, you would need to refer to the actual address of this register corresponding to your SCI instance. For eg, for SCIA, it would be 0x7209 (0x7200 + 0x9)

    Regards,

    Arnav

  • thanks I will try this