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.

SCI DMA

Other Parts Discussed in Thread: HALCOGEN

Normal 0 MicrosoftInternetExplorer4

Hello,

I am trying to configure SCI/LIN 1 to use DMA... but still can't get it to work. I followed the steps provided by the MIBSPI example I found on the forum..

I started by setting up the SCI port as following

1. Enable transmit/ receive

2. Set pins to be used for SCI

3. Disabled all interrupts

4. Enabled RX and TX DMA

5. Started the SCI module.

I then configured the DMA as Following

1. Reset DMA,

2. Enable DMA.

3. Set debug mode to 3

4. Configured channel Packet 1 with 1 Frame with 1 Element... 0 for Frame and Element offsets, read and write element sizes = 32bit, transfer type = frame, no auto init, and read/ write from/to fixed addresses.

5. Assigned PortB to Channel 1. in PAR0

6. Assigned DMA request to Channel 1in REQASI0

7. Bypassed the FIFO buffer

6. Enabled Hardware triggering for channel 1, in HWCHENAS.

OK... this didn't work,

I tried to use Software DMA requests to Channel 1 and that worked fine... so I think somehow when SCI receives a byte it is not triggering the DMA request.

 

  • Hi Tareq,

    Can you please share the source code (attached the relveant files), 

    Regards

    Hari

  • Attached are the CPP file and Doc file with Memory dump for DMA and SCI registers.

  • Hi Tareq,

    Software DMA trigger does not look for the data receive, the moment Channel is enabled it transfers data from source to destination.

    The probable checks that you can do are,

    From SCI side
    1)  Try enabling "SET RX DMA ALL" in SCISETINT register.
    2)  If you are not using TX DMA do not set it in SCISETINT register

    From DMA side
    1)  Probe PEND and DMA status register.

    Best Regards
    Prathap

     

  • Enabling the "SET RX DMA ALL" fixed the problem..

    Thanks alot

  • Thank you very much for the C++ sample code, that will save me a lot of time.

    Would it be possible to also get the .h files that declare things like the mUARTPorts structure, DMA_CHA1, DMAGCHIENAS_bit and DMADREQASI0_bit??

    For example, some of these:

    #include <sciopta.h>
    #include "GlobalTypes.h"
    #include "Uart.h"
    #include "TMS570_DMA.h"
    #include "CDI_UART.h"

    Thanks in advance.

    Rick Corey

  • If these files appear when I create a CC Studio v4 project, I'll find them.

     

    Corey

     

  • I'm still trying to find a .h file where the structures used in CDI_UART.cpp.txt are defined.  That was a SCI-DMA example posted by    on 10/26/2010

    I searched my CCS-4 directories and did not find them.

    I created a HalCoGen project with SCI, but can't find the DMA peripheral or any DMA options in  HalCoGen.

    All these .h files are used in the sample code, but neither CCS-4 nor I can find them.  Would it be possible to get those, to go with the SCI_DMA example?

    It would be very handy to have a structure that matches the DMA control registers.  Does that already exist, ro do we each have to create our own?

    Any help would be appreciated.

    /*---------------------------------------------------------------------------*/
    /* INCLUDES */
    /*---------------------------------------------------------------------------*/
     #include "sconf.h"
     #include <sciopta.h>
     #include "GlobalTypes.h"
     #include "ErrorCodes.h"
     #include "RBuffer.h"
     #include "Uart.h"                 < - - - -
     #include "iotms570LS20216.h"
     #include "TMS570_DMA.h"    < - -
     #include "CDI_UART.h"    < - - -
     #include "Config.h"

    CDI_UART
    Where can I find the structures needed by CDI_UART.cpp, such as these?
    DMA_CH * DMA_CHA1= ((DMA_CH *)0xFFF80020U);
    mUartPorts
    DMAGCHIENAS_bit
    DMAPAR0_bit
    DMADREQASI0_bit
    DMAPTCRL_bit
    DMAHWCHENAS_bit
    DMAFTCINTENAS_bit
  • Rick,

     

    This code is not TI code.

    I will suggest to contact Tariq and ask him for this missing h file.

     

    Regards,

     

    Jean-Marc