DrOldies

TM4C1294 Interrupt enabled uDMA SPI freezes

11 posts in this topic

I am trying to take the code from here: http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/367620.aspx and convert it to a Arduino/Energia library.  The setup and initialization gets through the SSI configuration, and the uDMA configuration. However, at the last step to enable the interrupt it does not return from this call:

 

    // Enable the SSI0 peripheral interrupts.

    ROM_IntEnable(INT_SSI0);   
 
The original code was very well documented, but I'm including a version of my code with the comments removed for easier reading. There are so many steps to get SSI, DMA, and INT functions enabled, its hard too tell what might be wrong with this.

 

SpiDmaInt_cpp.txt

SpiDmaInt_Example_ino.txt

Share this post


Link to post
Share on other sites

i would add a line in the handler to turn a led on. This just to see if the code isn't actually stuck on the handler. The led would be off otherwise, if it did never gone through the handler.

 

Also try removing IntEnable to see if the same doesn't happen. I will look better into the code other day

Share this post


Link to post
Share on other sites
Good suggestions. I tried both and added print statements to the 3 error handlers included from the previous code:

1. The LED statement  in SSI0IntHandler does NOT turn with ROM_IntEnable(INT_SSI0); enabled.

2. The code returns to main when IntEnabled is commented out. ( As expected, without the Interrupt enabled, nothing else happens)

3. None of the error traps below report an error.

 

static void NmiSR(void)

    Serial.println ("processor received a NMI");//debug

 

static void FaultISR(void)

    Serial.println ("received a fault interrupt");//debug

 

static void IntDefaultHandler(void)

    Serial.println ("processor received an unexpected interrupt");//debug

 

Since the code was taken from code for the TM4C129x, I have assumed all the setting in the other macros are set properly. The Peripherals Guide explanations are very limited on  explaining the various setting options.

Share this post


Link to post
Share on other sites

Where are you registering SSI0IntHandler as interrupt handler for SSI0?  (I don't see this listed in the code.)

 

Most programs I have seen start by setting the system clock.  I do not know that it will cause problems to wait until late in the program to set the clock, but unless you have a particular reason for postponing it, I would put the system clock setting back up at the beginning, as it was in the example code (rather than burying it down in ConfigureSSI0.

 

This is also a little confusing, because you said you were converting this to Energia, yet you have a bunch of calls in there which are likely to conflict with (or at least duplicate) Energia's set up.  (I realize you may be part way through the conversion.)  At this point are you trying to run this in Energia, or are you still running it in Code Composer studio?

 

If you are running it in Energia, then I would try stripping out all the things which Energia's setup already does - setting clock speed, systick, etc.

 

Also might look at the Energia SPI driver for comparison/inspriation, if you haven't already.

Share this post


Link to post
Share on other sites

I registered the IntHandler and stripped out all the unnecessary calls as you suggested. I added LED toggles to the interrupt handler and the .ino sketch. It is functioning properly now, toweling 2 LEDs  for each. However,     ROM_SysTickPeriodSet(Period) seem to change the interrupt timing interval. I think that the uDMA may be triggering the interrupt every time the data send is completed (regardless of the tick period), but I can't see what I might have set incorrectly. I would like to be able to set the frequency from a few hertz to over 1 Mhz from the sketch.

 

Here is the .cpp with the initialization and intHandler. The 2nd listing is the .ino sketch.

uint8_t pui8ControlTable[1024] __attribute__ ((aligned(1024)));


//---------------------SSI SPI Handler---------------------------------------
// SSI0 Interrupt Handler

void SSI0IntHandler(void) {
    uint32_t ui32Status;
    uint32_t ui32Mode;
    static bool ledon;

    if (ledon){
       digitalWrite(82, LOW); 
       digitalWrite(81, HIGH);  
        ledon = 0;
    }
    else{
        digitalWrite(81, LOW);
        digitalWrite(82, HIGH); 
        ledon = 1;
    }

    ui32Status = ROM_SSIIntStatus(SSI0_BASE, 1);
    ui32Mode = ROM_uDMAChannelModeGet(UDMA_CHANNEL_SSI0RX | UDMA_PRI_SELECT);
    if(ui32Mode == UDMA_MODE_STOP) {
        g_ui32SSIRxCount++;
        ROM_uDMAChannelTransferSet(UDMA_CHANNEL_SSI0RX | UDMA_PRI_SELECT,
                UDMA_MODE_AUTO,
                (void *)(SSI0_BASE + SSI_O_DR), g_ui8SSIRxBuf, sizeof(g_ui8SSIRxBuf));
        ROM_uDMAChannelEnable(UDMA_CHANNEL_SSI0RX);
    }
        //AUTO or BASIC?????
    if(!ROM_uDMAChannelIsEnabled(UDMA_CHANNEL_SSI0TX)) {
        g_ui32SSITxCount++;
        ROM_uDMAChannelTransferSet(UDMA_CHANNEL_SSI0TX | UDMA_PRI_SELECT,
                UDMA_MODE_AUTO, g_ui8SSITxBuf, 
                (void *)(SSI0_BASE + SSI_O_DR),sizeof(g_ui8SSITxBuf));
        ROM_uDMAChannelEnable(UDMA_CHANNEL_SSI0TX);
    }
     ROM_SSIIntClear(SSI0_BASE, ui32Status);
}

void SSI_Init(void) {
//uDMA SSI0 RX
    ROM_uDMAChannelControlSet(UDMA_CHANNEL_SSI0RX | UDMA_PRI_SELECT,
           UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 |
           UDMA_ARB_4);

//uDMA SSI0 TX
    // Configure the control parameters for the SSI0 TX.
    ROM_uDMAChannelControlSet(UDMA_CHANNEL_SSI0TX | UDMA_PRI_SELECT,
          UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE |
          UDMA_ARB_4);
    //Registers an interrupt handler for the synchronous serial interface.
   SSIIntRegister(SSI0_BASE, *SSI0IntHandler); 
    //As soon as the channels are enabled, the peripheral will
    // issue a transfer request and the data transfers will begin.
    ROM_uDMAChannelEnable(UDMA_CHANNEL_SSI0RX);
    ROM_uDMAChannelEnable(UDMA_CHANNEL_SSI0TX);    //no led 0n 43 if commented out
    ROM_SSIDMAEnable(SSI0_BASE, SSI_DMA_RX | SSI_DMA_TX);   //33
    // Enable the SSI0 DMA TX/RX interrupts.
    ROM_SSIIntEnable(SSI0_BASE, SSI_DMATX | SSI_DMARX);
    // Enable the SSI0 peripheral interrupts.
    ROM_IntEnable(INT_SSI0);                     //<<<<<<<<<<<<<< locks in this function
}

//-------------------SSI----------------------------
void ConfigureSSI0(void) {
    uint32_t trashBin[1] = {0};

    // Enable the SSI0 Peripheral.
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
    ROM_SSIConfigSetExpClk(SSI0_BASE, F_CPU, SSI_FRF_MOTO_MODE_0,
                                                SSI_MODE_MASTER, 16000000, 8);   //16000000
      ROM_SSIEnable(SSI0_BASE);   //ppd , SSI_DMA_TX ???
    /* Clear SSI0 RX Buffer */
    while (ROM_SSIDataGetNonBlocking(SSI0_BASE, &trashBin[0])) {}
}

//-------------------uDMA----------------------------
void CongifureuDMA(void){
    
    // Configure SysTick to occur 100 times per second, to use as a time
    // reference.  Enable SysTick to generate interrupts.- between 1 and 16, 777, 216, inclusive.

    ROM_SysTickPeriodSet(10000)
   
    ROM_SysTickIntEnable();
    ROM_SysTickEnable();
    // Enable the uDMA controller at the system level.  
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
    // Enable the uDMA controller.
    ROM_uDMAEnable();
    // Point at the control table to use for channel control structures.
    ROM_uDMAControlBaseSet(pui8ControlTable);
}


#define LED1 (81)    //Energia 4 led pins 81,82,83,84
#define LED2 (82) 
#define LED3 (83) 
#define LED4 (84) 

void setup(void) {
 
   // Serial.begin(9600);
   // delay(5000);
   // Serial.println ("start");
    pinMode(LED1, OUTPUT);    //these two are in the Interrupt handle routine
    pinMode(LED2, OUTPUT);
    pinMode(LED3, OUTPUT);    //these two are in the .ino routine
    pinMode(LED4, OUTPUT);

     CongifureuDMA();
    ConfigureSSI0(); 

    //this was test data    <<<<<<<<<<<<<<<<<<<<<<<<<<<
    // Fill the TX buffer with a simple data pattern. 
    uint16_t dummy = 0b1101010101011101;
    for(uint_fast16_t ui16Idx = 0; ui16Idx < SSI_BUFFER_SIZE; ui16Idx++)
        {
            g_ui8SSITxBuf[ui16Idx] = dummy;     //ui16Idx;
        }
   
    SSI_Init();     // Initialize the uDMA SPI transfers.
}

void loop(){
    // Loop forever with the CPU not sleeping, so the debugger can connect.
   static bool led;

    if (led){
       digitalWrite(84, LOW); 
       digitalWrite(83, HIGH);  
        led = 0;
    }
    else{
        digitalWrite(83, LOW);
        digitalWrite(84, HIGH); 
        led = 1;
    }
}

Share this post


Link to post
Share on other sites

I registered the IntHandler and stripped out all the unnecessary calls as you suggested. I added LED toggles to the interrupt handler and the .ino sketch. It is functioning properly now, toweling 2 LEDs  for each. However,     ROM_SysTickPeriodSet(Period) seem to change the interrupt timing interval. I think that the uDMA may be triggering the interrupt every time the data send is completed (regardless of the tick period), but I can't see what I might have set incorrectly. I would like to be able to set the frequency from a few hertz to over 1 Mhz from the sketch.

A bit unclear what the problem is (i.e. what you want it to do that is different from what it is doing).

You asked for SSI TX and RX interrupts, and it sounds like it is giving you those.

What frequency are you trying to set (i.e. frequency of what).

 

 

This bit is a little strange

ROM_SSIIntEnable(SSI0_BASE, SSI_DMATX | SSI_DMARX);

those are not standard arguments allowed for SSIIntEnable. 

If that was intentional, I would suggest documenting any non-standard usage like this really clearly.

(i.e. SHOUT IT OUT with a big, hard to miss comment pointing out that it is nonstandard, why you did it, and what it is intended to achieve).

Share this post


Link to post
Share on other sites

Sorry I was not clear in my last post. I'm learning that I cannot easily copy code from another MCU's program.

 

The interrupt now works. It appears that the interrupt is based on the DMA Transmit completing (SSI_DMATX). 

The SysTickPeriod Set(period) has no effect and I can even comment out the 3 lines below in my CongifureuDMA() routine. What would I need to change to have the SysTick period  control the interrupt timing?


   ROM_SysTickPeriodSet(100);
   ROM_SysTickIntEnable();
   ROM_SysTickEnable();

 

BTW: The SSIIntEnable values are from ..\cores\lmf4\driverlib\ssi.h. They seemed like the best of the choices.

#define SSI_TXEOT               0x00000040  // Transmit FIFO is empty
#define SSI_DMATX               0x00000020  // DMA Transmit complete
#define SSI_DMARX               0x00000010  // DMA Receive complete
#define SSI_TXFF                0x00000008  // TX FIFO half full or less
#define SSI_RXFF                0x00000004  // RX FIFO half full or more
#define SSI_RXTO                0x00000002  // RX timeout
#define SSI_RXOR                0x00000001  // RX overrun

Share this post


Link to post
Share on other sites

Sorry I was not clear in my last post. I'm learning that I cannot easily copy code from another MCU's program.

 

The interrupt now works. It appears that the interrupt is based on the DMA Transmit completing (SSI_DMATX). 

The SysTickPeriod Set(period) has no effect and I can even comment out the 3 lines below in my CongifureuDMA() routine. What would I need to change to have the SysTick period  control the interrupt timing?

Where is the code for the SysTick interrupt handler? What is it supposed to do? (i.e. what do you want to have happen when the SysTick interrupts?)

 

BTW: The SSIIntEnable values are from ..\cores\lmf4\driverlib\ssi.h. They seemed like the best of the choices.

#define SSI_TXEOT               0x00000040  // Transmit FIFO is empty
#define SSI_DMATX               0x00000020  // DMA Transmit complete
#define SSI_DMARX               0x00000010  // DMA Receive complete
#define SSI_TXFF                0x00000008  // TX FIFO half full or less
#define SSI_RXFF                0x00000004  // RX FIFO half full or more
#define SSI_RXTO                0x00000002  // RX timeout
#define SSI_RXOR                0x00000001  // RX overrun

 

Interesting - the driverlib users guide makes no mention of SSI_DMARX/TX (it says that the others are the acceptable arguments). Likewise the documentation in ssi.c only talks about the other values. I see those values are new with the 1294.

Share this post


Link to post
Share on other sites

I obviously don't know what SysTick is supposed to do. Reviewing other code (very few examples are available) I gathered that it is a counter and when the SysTick value is reached it trips a DMA service interrupt. For the Arduino I would use a Timer interrupt. SysTick seems like a more efficient way to do this. Using SSI_DMARX/TX the interrupt occurs as soon as the array being transferred has been sent - the program has no control over the timing - so its not clear when I update that array. In my code these 3 line of code do nothing (I commented them out during testing).

ROM_SysTickPeriodSet(period);
ROM_SysTickIntEnable();
ROM_SysTickEnable();

I appreciate your comments. 

Share this post


Link to post
Share on other sites

SysTick is a counter tied to one of a couple of clocks (e.g. the processor clock).  When the counter reaches 0 (it counts down) it can fire a SysTick interrupt (nothing particular to do with DMA, although the interrupt service routine is free to do whatever), and the counter is reset.  I believe it is typically used for things like making something happen at regular intervals (say 100 times per second).  Like keeping a count of milliseconds.  (See for instance the Energia source code.  wiring.c  SysTick is used to implement things like millis and delay. )

 

There are also a bunch of general purpose timers, which are more flexible in what they can count, what they can control (e.g. toggling an output pin), etc.

 

Usually using DMA to do transfer you prepare the data to send (e.g.) then tell the device/DMA to send it.  The TX/DMA done interrupt lets you know when it has been sent, then you can use that buffer for something else, or get it ready for the next transfer.  

 

Often used with multiple buffers. e.g.. if you have two send buffers, you fill buffer A while the DMA is sending buffer B.  When you get the interrupt you change over so that the DMA is sending the contents of buffer A, while you start filling buffer B.  (For read it is pretty much the same, except your code is emptying the buffers.)

 

If you need to transmit something at a particular time, you could use a timer to trigger your program to set up/start the DMA, (or to directly trigger the DMA transfer to start from the timer, as long as you have ensured that it will be all set up.)

 

There are some threads on this board and on 43oh about using DMA (e.g. for writing LED drivers, using ping-pong, etc.) which might help give a feel for how DMA can be used.

(e.g. they show triggering a DMA transfer from a timer, where the device being controlled needs data output on a port at a particular time).  e.g. http://forum.stellarisiti.com/topic/2107-ws2812b-matrix/

Share this post


Link to post
Share on other sites

SOLVED! Using your advice I  looked for an alternative to SSI_DMARX/TX.  SSI_TXEOT (transfer buffer empty) gives the program control for updating the send array if used in SSI_Init., and the interrupt function. I also found that the interrupt frequency can also be set during initialization.

void SSI_Init(uint32_t _freqHz_){
   ROM_SSIIntEnable(SSI0_BASE, SSI_TXEOT); 
   ROM_SSIConfigSetExpClk(SSI0_BASE, F_CPU, SSI_FRF_MOTO_MODE_0,
                           SSI_MODE_MASTER, _freqHz_, 8);
} 
void SSI0IntHandler(void)
  if (ui32Status == SSI_TXEOT) {
  //update send array 
  }
}
 

Here is the code.

//SpiDamInt_E.h

#ifndef SPI_DMA_INT_H
#define SPI_DMA_INT_H

#include <Energia.h>
#include <driverlib/ssi.h>
#include <inc/hw_ssi.h>
#include <driverlib/sysctl.h>
#include <driverlib/udma.h>
#include <driverlib/rom_map.h>
#include <inc/hw_ints.h>

// How do we want the DMA process to proceed?
#define AUTO (1)    //DMA will read from the program buffer every time its 
                    //transfer buffer is empty. It will send continuously.
//#define SEMI (2)    //DMA will read from the program buffer only when
                    //_changedBuffer = true. It will send continuously.
#define MANUAL (3)  //DMA will read from the program buffer AND send only 
                    //when _changedBuffer = true
#define STOP (0)    //disable dma/spi transfers

void ConfigureSSI0(uint32_t _freqHz_);
void SSI_Init(uint32_t _freqHz_);
void SSI0IntHandler(void);
void CongifureuDMA(void);
void SSIEnableTemp(uint32_t numBytes);
void SSIEnable(void);


// The count of SSI0 buffers filled
static uint32_t g_ui32SSIRxCount = 0;
static uint32_t g_ui32SSITxCount = 0;

// The size of the memory transfer source 
//and destination buffers (in bytes)
#define SSI_TX_BUFFER_SIZE (1024)
#define SSI_RX_BUFFER_SIZE (1024)

#endif //SPI_DMA_INT_H
//SpiDamInt_E.cpp
//SSI / uDMA Example TM4C1294XL

#include "SpiDmaInt_E.h"
template<class T> inline Print &operator <<(Print &obj, T arg) { obj.print(arg); return obj; }

// The control table used by the uDMA controller.  This table must be aligned
// to a 1024 byte boundary.
uint8_t pui8ControlTable[1024] __attribute__ ((aligned(1024)));

//Gives the sketch control of the send buffer length.
extern uint8_t g_ui8SSITxBuf[];
extern uint8_t g_ui8SSIRxBuf[];

//variables for class:private later
uint32_t g_actualBufferSize;
uint8_t g_dmaControl = AUTO;   //the default - under program control
                    
// single buffer write/DMA read management 
bool g_writingBuffer = false;  //Are we writing new data to the Buffer? 
bool g_changedBuffer = true;    // Has the Buffer been changed?
bool g_DMAreading = false;       //If the DMA interrupt routine reading the Buffer?


void led12(){
       static bool ledon;
    if (ledon){
       digitalWrite(82, LOW); 
       digitalWrite(81, HIGH);  
        ledon = 0;
    }
    else{
        digitalWrite(81, LOW);
        digitalWrite(82, HIGH); 
        ledon = 1;
    }
}


//---------------------SSI SPI Handler---------------------------------------
// SSI0 Interrupt Handler

void SSI0IntHandler(void) {
    uint32_t ui32Status;
    uint32_t ui32Mode;

    //Int flag needs to be clear early in thid function
    ui32Status = ROM_SSIIntStatus(SSI0_BASE, 1);
    ROM_SSIIntClear(SSI0_BASE, ui32Status);

    // Interrupt due to TX FIFO empty so buffer is empty
    if (ui32Status == SSI_TXEOT) {

      //TRANSFER DONE, take SS HIGH
      ROM_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, GPIO_PIN_3);
      led12();    //<<<<<<<<<<<<<<<< test

      if (g_dmaControl == MANUAL & !g_changedBuffer){  //do nothing
        return;
      }
      g_DMAreading = true;       //I'm using the buffer
      while (g_writingBuffer);   //wait until buffer is available
      SSIEnable();    //restart with current data and numbytes
      g_DMAreading = false;    //done      
    }
}

void SSIEnableTemp(uint32_t bufferSize){
  //update buffer size
  g_actualBufferSize = bufferSize;
  SSIEnable();
}
//---------------enable ---------------------------
void SSIEnable(void){
  //As soon as the channels are enabled, the peripheral will
  // issue a transfer request and the data transfers will begin.
  ROM_uDMAChannelTransferSet(UDMA_CHANNEL_SSI0RX | UDMA_PRI_SELECT,
                            UDMA_MODE_BASIC,
                            (void *)(SSI0_BASE + SSI_O_DR),
                            g_ui8SSIRxBuf, 
                            g_actualBufferSize);

  ROM_uDMAChannelTransferSet(UDMA_CHANNEL_SSI0TX | UDMA_PRI_SELECT,
                            UDMA_MODE_BASIC, 
                            g_ui8SSITxBuf, 
                            (void *)(SSI0_BASE + SSI_O_DR), 
                            g_actualBufferSize);
  //start a new transfer take SS LOW
  ROM_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, 0);
  //The uDMA controller disables the channel at 
  //the completion of a transfer. Restart here.
  ROM_uDMAChannelEnable(UDMA_CHANNEL_SSI0RX);
  ROM_uDMAChannelEnable(UDMA_CHANNEL_SSI0TX);
}
//----------------------initialize SSI ---------------------------
void SSI_Init(uint32_t _freqHz_) {

    CongifureuDMA();
    ConfigureSSI0(_freqHz_); 

    //uDMA SSI0 RX (receive functionality not tested)
    ROM_uDMAChannelAttributeDisable(UDMA_CHANNEL_SSI0RX, 
                                    UDMA_ATTR_ALTSELECT |
                                    UDMA_ATTR_HIGH_PRIORITY | 
                                    UDMA_ATTR_REQMASK);
    ROM_uDMAChannelControlSet(UDMA_CHANNEL_SSI0RX | UDMA_PRI_SELECT,
                                    UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 |
                                    UDMA_ARB_4);

    //uDMA SSI0 TX
    ROM_uDMAChannelAttributeDisable(UDMA_CHANNEL_SSI0TX, 
                                    UDMA_ATTR_ALTSELECT |
                                    UDMA_ATTR_HIGH_PRIORITY | 
                                    UDMA_ATTR_REQMASK);
    ROM_uDMAChannelControlSet(UDMA_CHANNEL_SSI0TX | UDMA_PRI_SELECT,
                                    UDMA_SIZE_8 | 
                                    UDMA_SRC_INC_8 | 
                                    UDMA_DST_INC_NONE |
                                    UDMA_ARB_4);

    //Registers an interrupt handler for the synchronous serial interface.
    SSIIntRegister(SSI0_BASE, *SSI0IntHandler); 
    ROM_SSIDMAEnable(SSI0_BASE, SSI_DMA_RX | SSI_DMA_TX); 
    
    // Enable the SSI0 DMA TX/RX interrupts.
    //ROM_SSIIntEnable(SSI0_BASE, SSI_DMATX | SSI_DMARX);   //95
   ROM_SSIIntEnable(SSI0_BASE, SSI_TXEOT);   //95

    // Enable the SSI0 peripheral interrupts.
    ROM_IntEnable(INT_SSI0); 
}
//-------------------SSI----------------------------
void ConfigureSSI0(uint32_t _freqHz_) {
    //uint32_t trashBin[1] = {0};

    // Configure GPIO Pins for SSI0 mode.
    ROM_GPIOPinConfigure(GPIO_PA2_SSI0CLK);
    ROM_GPIOPinConfigure(GPIO_PA4_SSI0XDAT0);
    ROM_GPIOPinConfigure(GPIO_PA5_SSI0XDAT1);
    ROM_GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5 | GPIO_PIN_4 | GPIO_PIN_2);
 
    // Configure GPIOA_3 as the SSI Chip Select
    ROM_GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_3); 
    ROM_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, GPIO_PIN_3); //HIGH

    // Enable the SSI0 Peripheral.
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);

    _freqHz_ = (_freqHz_ > 16000000) ? 16000000 : _freqHz_;
    _freqHz_ = (_freqHz_ < 1000) ? 1000 : _freqHz_;
    ROM_SSIConfigSetExpClk(SSI0_BASE, F_CPU, SSI_FRF_MOTO_MODE_0,
                           SSI_MODE_MASTER, _freqHz_, 8); //1000 min - 16000000 maximum
    ROM_SSIEnable(SSI0_BASE); 
    /* Clear SSI0 RX Buffer */
    //while (ROM_SSIDataGetNonBlocking(SSI0_BASE, &trashBin[0])) {}
}
//-------------------uDMA----------------------------
void CongifureuDMA(void){
  // Enable the uDMA controller at the system level.  
  ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
  // Enable the uDMA controller.
  ROM_uDMAEnable();
 // Point at the control table to use for channel control structures.
  ROM_uDMAControlBaseSet(pui8ControlTable);    //note: must BE LAST STATEMENT
}

I plan to convert this to an Energia compatible class with write and read functions. I'll post the link here when I add it to github. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now