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.

AM6548: AM6548 IDK: How to use UDMA in a SMALL bare metal app without OSAL-NONOS and TISCI

Part Number: AM6548
Other Parts Discussed in Thread: SYSBIOS

Hello,

 I have a big problem with the PDK of the AM6548 in general and the (missing) platform documentation - this time with UDMA:

 

I have to implement a bare metal application (as small as possible) that utilizes DMA to transfer data from DDR4 to shared SRAM. As the application must be as fast as possible, it must reside in shared SRAM.

 

First I had a look at examples in the PDK. And (this is a general problem with your PDK!) After several hours, I noticed, that the EDMA examples cannot be used for the A53 core. This is because I found another document in some subtree that states how to port applications using EDMA to UDMA - stating that UDMA is something new and even more complex. So I must use UDMA. And there is only one usable example I thought I could break down: the one in this porting document.

pdk_am65xx_1_0_7\packages\ti\drv\udma\docs\Migrating_Applications_from_EDMA_to_UDMA_using_TI-RTOS.pdf

(but I don't want to use TI-RTOS!)

So the UDMA Driver

 

packages/ti/drv/udma/lib/am65xx/mpu1_0/release/udma.aa53fg

 

depends on

 

packages/sciclient/lib/am65xx/mpu1_0/release/sciclient.aa53fg

packages/osal/lib/nonos/am65xx/a53/release/ti.osal.aa53fg

 

and hence introduces dependencies into OSAL which leads to linking my bare metal app to these. Why is there a hard dependency to semaphore support, firmware library (!) ? (This means I also have to load a firmware binary to use DMA !?, because otherwhise the UDMA init function hangs...) So far no RTOS dependency, so the pdf title is misleading as well, don't you agree?

 

This leads to an application that does barely fit into half a Megabyte, i.e. if two cores share the MSMC SRAM equally, the software that should run the UDMA transfer is already full...

 

So the following thoughts and questions arose:

 

  1. Why are a lot (if not most) examples in the PDK, that I download for the 6548 (!) not for the 6548 but for other platforms – that does not make sense!
  2. Where is an understandable documentation of UDMA. One cannot follow any usable register access order from the 14 thousand pages of TRM.
  3. How can I use UDMA without introducing a ton of dependencies to other libraries...
  4. UDMA is a very basic feature and as such, software needed for it should also be small and fast! 170 lines of C code to transfer 1024 bytes seem like a bad joke – and with the documentation I fould almost nothing of the defines, macros and functions is really explained. It is merely an empty doxygen documentation... at least IMHO.

 

I am looking forward to any help!

Andreas

  • Andreas,

    The AM65 architecture is updated from that of previous devices, including the DMA architecture. Though many of the concepts from the EDMA do carry in to the new DMA architecture, it unifies the memory-to-memory and packet transfer support into the architecture.

    It is correct that in the SDK 6.3 releases the CSL carries a superset of modules spanning multiple devices and there is an edma folder, which is not used for the AM65. The SDK 7.0 release does not include it. 

    In terms of operating system, SYSBIOS is not required for most of the RTOS PDK components. For a simple, baremetal UDMA memcopy specifically, please look within the driver folder for an example - <pdk>\packages\ti\drv\udma\examples\udma_memcpy_test

    The overall DMA architecture is complex, and described in full in section 10 of the TRM - https://www.ti.com/lit/pdf/spruid7 , as well as an overview document in the PDK at <pdk>\packages\ti\drv\udma\docs\UDMA_Overview.pdf Basic operations are still supported, in addition to more complex dataflows.

    The resource allocation and management is through the system firmware, which is regardless of the application and DMA usage, via the SciClient. This does not require SYSBIOS and can be used also by baremetal applications.

    Best regards,

    Dave