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.

AMIC110: EDMA parameters

Part Number: AMIC110
Other Parts Discussed in Thread: AM3359

Hi,
I'm trying to verify my understanding of EDMA when working with MCSPI.
Before triggering a transfer, parameters should be filled up. There is a list of parameters for data transfer.

I have a few question about the parameter.
(SRC)source: Is it source address of variables to be transfered? the EDMA3 user guide says this address should be aligned to 256bit aligned address.
Where is the 256bit address to be aligned?
(DST)destination: Is it destination address, such as peripherals tx registers of i2c, spi, uart etc specified in the address mapping?
Where is the 256bit address to be aligned?

Kind regards
Orient
  • Hi,

    If you want to use the MCSPI with DMA on AMIC110, the SPI driver under Processor SDK RTOS covers it. The driver uses the DMA, you can look at the source code implementation pdk_am335x_1_0_xx\packages\ti\drv\spi\src, searching for keyword such as: srcAddr, destAddr. 

    If you are doing Tx, the SRC is a memory address holding the data to be transferred, DST is a peripheral register. If you are doing Rx, SRC is a peripheral register. DST is a memory address holding the data to be received.

    From AMIC110 TRM:

    11.3.3.2.2 Channel Source Address (SRC)
    The 32-bit source address parameter specifies the starting byte address of the source. For SAM in
    increment mode, there are no alignment restrictions imposed by EDMA3. For SAM in constant addressing
    mode, you must program the source address to be aligned to a 256-bit aligned address (5 LSBs of
    address must be 0).

    11.3.3.2.3 Channel Destination Address (DST)
    The 32-bit destination address parameter specifies the starting byte address of the destination. For DAM
    in increment mode, there are no alignment restrictions imposed by EDMA3. For DAM in constant
    addressing mode, you must program the destination address to be aligned to a 256-bit aligned address (5
    LSBs of address must be 0).

    When you use increment mode, there is no such 256-bit alignment restriction.

    Regards, Eric

  • Thanks Eric, 

    Do you have a complete path set for SPI in the pdk folder?

    I was trying to organise them together for better reading. Two paths were found.

    pdk_am335x_1_0_12\packages\ti\csl\src\ip\mcspi

    pdk_am335x_1_0_12\packages\ti\drv\spi

    Kind regards

    Orient

  • Hi,

    The best way is to create a CCS project for the SPI on AMIC110. 

    c:\ti>cd pdk_am335x_1_0_14

    c:\ti\pdk_am335x_1_0_14>cd packages

    c:\ti\pdk_am335x_1_0_14\packages>pdkProjectCreate.bat AM335x iceAMIC110 little spi all arm

    =========================================================================
    Configuration:
    SOC : AM335x
    BOARD : iceAMIC110
    ENDIAN : little
    MODULE : spi
    PROJECT_TYPE : all
    PROCESSOR : arm
    PDK_SHORT_NAME : c:\ti\PDK_AM~4\packages\
    =========================================================================
    Checking Configuration...
    Complete
    =========================================================================
    PDK_PARTNO : AM335
    PDK_ECLIPSE_ID : com.ti.pdk.am335x
    RTSC_PLATFORM_NAME : ti.platforms.evmAM3359
    RTSC_TARGET : gnu.targets.arm.A8F
    CCS_DEVICE : "Cortex A.AM3359.ICE_AM3359"
    *****************************************************************************
    Detecting all projects in PDK and importing them in the workspace c:\ti\PDK_AM~4\packages\\MyExampleProjects
    Detected Test Project: MCSPI_Loopback_iceAMIC110_armExampleProject

    --------------------------------------------------------------------------------
    Creating project 'MCSPI_Loopback_iceAMIC110_armExampleProject'...


    Done!
    Copying macro.ini
    1 file(s) copied.
    Detected Test Project: MCSPI_SlaveMode_MasterExample_iceAMIC110_armExampleProject

    --------------------------------------------------------------------------------
    Creating project 'MCSPI_SlaveMode_MasterExample_iceAMIC110_armExampleProject'...


    Done!
    Copying macro.ini
    1 file(s) copied.
    Detected Test Project: MCSPI_SlaveMode_SlaveExample_iceAMIC110_armExampleProject

    --------------------------------------------------------------------------------
    Creating project 'MCSPI_SlaveMode_SlaveExample_iceAMIC110_armExampleProject'...


    Done!
    Copying macro.ini
    1 file(s) copied.
    No projects detected
    Project generation complete
    *****************************************************************************

    c:\ti\pdk_am335x_1_0_14\packages>

    Then you can import the project into CCS and run/step through the code to see how the test application code + driver code are organized.

    Regards, Eric