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.

TMS570LC4357: Configure Regular SPI with DMA

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

I have been working on transmitting and receiving data by SPI (regular single buffer)  with DMA. RXDATA has not received actual data but I can see 0x8000 in RXDATA buffer. 

  • Did you try the SPI+DMA example from TI?

  • Can you please share the link for regular SPI example? I tried MibSPI example, works fine

  • This is an example of SPI + DMA on LS1224 device. It should work on TMS570LC43x device. 

    3187.sys_main.c

  • I tried this example as follows but its not working.

    In HalCoGen:

    Enabled RTI, SPI1 and SPI3 drivers.

    Enabled MIBSPI1 and MIBSPI3 under pinmux tab and resolved conflicts

    VIM Channels 39 and 40 are activated (HBC and BTC) and generate the code.

    I have changed the original code provided by you to adapt new library APIs (code attached here).

    When I debug the code it never comes to dmaGroupANotification. So that execution hang in while( SPI3_BTCFlag == 0 )

     

    https://e2e.ti.com/Can you please advise, do I miss anything here?0724.HL_sys_main.c

  • There is no problem in the code. Please double check the wires connecting SPI1 and SPI3 on your board. 

  • These are my configurations and physical connections:

    ---------------                  ---------------
    SPI3 ( Master )            SPI1 ( SLave)
    ---------------                  ---------------
    SIM0                   --->   SIMO (Connected with wire in TMS570LC43X DK)
    S0MI                  <---    SOMI (Connected with wire in TMS570LC43X DK)
    CLK                    --->   CLK (Connected with wire in TMS570LC43X DK)
    CS0                    --->   CS0 (Connected with wire in TMS570LC43X DK)

    ------------------
    GUI configurations
    ------------------

    1. Driver TAB
      1. Select SPI3
      2. Select SPI1
    2. VIm Channel
      1. Enable SPI1 Level 0 and Level 1 channels.
    3. SPI1 TAB
      1. SPI1 Global SubTAB
        1. Uncheck Master Mode
        2. Uncheck Internal Clock
      2. SPI1 Port SubTAB
        1. - Uncheck DIR for CS 0
    4. SPI3 TAB
      1. Have it default
    5. VIm Channel
      1. Enable DMA HBCS
      2. Enable DMA BTCA
    6. Generate Code.

    Only 16 clocks come out of SPI3 and then it stops. Can you please clarify why this is stopped?