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.

CCS/TMDX5535EZDSP: DMA problem after bootloader

Part Number: TMDX5535EZDSP

Tool/software: Code Composer Studio

Hello, I'm trying to copy one buffer to another using DMA. 
The program successfully works under the debugger, but after loading from micro SD the DMA does nothing.
I checked that after configuring DMA and performing DMA_start,
the DMA registers contain the correct values, but they do not change in the future.
Can someone point out an error or show a working example with DMA?
Here is my code:

#include "csl_dma.h" #include "csl_gpio.h" #include "csl_sysctrl.h" #include <csl_general.h> #define SIZE 1024 #define CSL_RED_LED 16 extern void VECSTART(void); /* Declaration of the buffer */ Uint16 src[SIZE]; Uint16 dst[SIZE]; CSL_DMA_ChannelObj dmaObj; CSL_DMA_Handle hDMA; CSL_DMA_Config dmaConfig; CSL_GpioObj gpioObj; GPIO_Handle hGPIO; CSL_Status status; CSL_GpioPinConfig gpioConfig = { CSL_RED_LED, CSL_GPIO_DIR_OUTPUT, CSL_GPIO_TRIG_CLEAR_EDGE }; void main(void) { //-------------------------------------------------------- // System init //-------------------------------------------------------- IRQ_globalDisable(); // Disable interrupts CSL_SYSCTRL_REGS->PCGCR1 = 0; // Enable all pereferials CSL_SYSCTRL_REGS->PCGCR2 = 0; CSL_SYSCTRL_REGS->PSRCR = 0x0020; // Reset all pereferials CSL_SYSCTRL_REGS->PRCR = 0x00BF; while (CSL_SYSCTRL_REGS->PRCR != 0); //-------------------------------------------------------- // GPIO init //-------------------------------------------------------- // Pinmux for red LED SYS_setEBSR(CSL_EBSR_FIELD_PPMODE, CSL_EBSR_PPMODE_1); hGPIO = GPIO_open(&gpioObj, &status); // Init GPIO module GPIO_configBit(hGPIO, &gpioConfig); //-------------------------------------------------------- // DMA init //-------------------------------------------------------- dmaConfig.pingPongMode = CSL_DMA_PING_PONG_DISABLE; dmaConfig.autoMode = CSL_DMA_AUTORELOAD_DISABLE; dmaConfig.burstLen = CSL_DMA_TXBURST_8WORD; dmaConfig.trigger = CSL_DMA_SOFTWARE_TRIGGER; dmaConfig.dmaEvt = CSL_DMA_EVT_NONE; dmaConfig.dmaInt = CSL_DMA_INTERRUPT_DISABLE; dmaConfig.chanDir = CSL_DMA_READ; dmaConfig.trfType = CSL_DMA_TRANSFER_MEMORY; dmaConfig.dataLen = SIZE * 2; dmaConfig.srcAddr = (Uint32)src; dmaConfig.destAddr = (Uint32)dst; DMA_init(); hDMA = DMA_open(CSL_DMA_CHAN0, &dmaObj, &status); DMA_config(hDMA, &dmaConfig); //-------------------------------------------------------- // Algorithm //-------------------------------------------------------- DMA_start(hDMA); // Start transaction GPIO_write(hGPIO, CSL_RED_LED, 1); // led OFF while(DMA_getStatus (hDMA)) // Wait until transaction finished { // Here the program remains on boot from SD } GPIO_write(hGPIO, CSL_RED_LED, 0); // led ON while(1); // Here the program remains on loading through the debugger
}