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.

TM4C1233H6PM UART DMA

Other Parts Discussed in Thread: TM4C1233H6PM, SW-TM4C

Hi,

I am working on both "LM4F120H5QR" and "TM4C1233H6PM" and using "TivaWare_C_Series-2.0.1.11577" Tivaware.

Working on implementing the UART transmission using DMA. However, did not find any example code for the same.

Any sugesstions???

Regards,

Shri

  • Working on implementing the UART transmission using DMA.However, did not find any example code for the same.

    Perhaps because it is simpler to use the FIFO, which can be viewed as a "dedicated DMA" with fixed length ?

    Perhaps TI people know.

    Any sugesstions???

    The decision is yours. But I would rather use the FIFO. That would leave DMA for other peripherals, and would not compete with the core for AHB cycles.

  • Hi,
    No no, what i mean is DMA is must due to other constraints..

    I was looking for some example code since the code i tried is giving FaultISR()..

    Regards,

    Shri
  • No no, what i mean is DMA is must due to other constraints..

    That is actually your problem - the FIFO is there anyway, if you use it or not.

    I was looking for some example code since the code i tried is giving FaultISR()..

    There are several good tutorial on the web on how to "decode" a hardfault from the SCB register contents. BTW, when starting your search engine, don't use the TI-specific term "FaultISR" - this is actually incorrect, because it deals with a synchronous event (better called "exception"), and not an asynchronous one, like with real interrupts.

    I don't have any specific example for your issue. But you can try combining an UART example code with a DMA example (peripheral-to-memory DMA). SPI or I2C would be a good candidate.

    Perhaps the TI staff can provide a more appropriate example.

  • Hello Shri,

    As f.m. has pointed out, in most of the cases a task can be accomplished by using the UART FIFO with interrupts. Setting up uDMA and maintaining it requires lot of time and effort. Also for transferring small amounts of data, using DMA does not make sense as it might actually take up more time setting up the DMA for every transaction, than transferring data using FIFO and interrupts. Eventually you have to make the decision if using uDMA is the best solution for your use case.

    I noticed that you are using a very old version of TivaWare. Is there a particular reason for that? If not, then please get the latest TivaWare from the link: www.ti.com/tool/sw-tm4c

    Did you look at the example "./examples/boards/dk-tm4c123g/udma_demo/"? This example is designed to run on DK-TM4C123G board and transfers data over UART using uDMA. The UART is configured in internal loopback mode, for testing. You might have to modify it to run on the board being used.

    Thanks,
    Sai