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.

TMS570 Interrupts + ADC & DMA

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

Hi Everyone,


My basic question is how do you get interrupts to work with peripherals?

On all my projects I have VIM setup and enabled, as well as _enable_IRQ()

So far I've tried to trigger the ADC1EV via the RTI_COM0, the breakpoint I setup in rtiNotification() is triggered though ADC1EV is not. setup via halcogen and adcInit() has been called before setting up rti or dma.


Altering the code to skip this problem

I've setup the ADC1EV to trigger the DMA after completing all selected channels with adcREG1->EVDMACR = 0x00000008; however the DMA does not initiate.

The DMA is configured as (trying on standard arrays first)

    adc1_dmaCTRLPKT.SADD      = (uint32)&(first[0]);            //source address
    adc1_dmaCTRLPKT.DADD      = (uint32)&(second[0]);            //destination address
    adc1_dmaCTRLPKT.CHCTRL    = DMA_CH1;                             //channel
    adc1_dmaCTRLPKT.FRCNT     = 1;                        //frame count
    adc1_dmaCTRLPKT.ELCNT     = 7;                        //element count
    adc1_dmaCTRLPKT.ELDOFFSET = 0;                        //element destination offset
    adc1_dmaCTRLPKT.ELSOFFSET = 0;                        //element source offset
    adc1_dmaCTRLPKT.FRDOFFSET = 0;                        //frame destination offset
    adc1_dmaCTRLPKT.FRSOFFSET = 0;                        //frame source offset
    adc1_dmaCTRLPKT.PORTASGN  = 4;                        //port b
    adc1_dmaCTRLPKT.RDSIZE    = ACCESS_8_BIT;                //read size
    adc1_dmaCTRLPKT.WRSIZE    = ACCESS_8_BIT;                //write size
    adc1_dmaCTRLPKT.TTYPE     = BTC;                    //transfer type
    adc1_dmaCTRLPKT.ADDMODERD = ADDR_INC1;                    //address mode read
    adc1_dmaCTRLPKT.ADDMODEWR = ADDR_INC1;                    //address mode write
    adc1_dmaCTRLPKT.AUTOINIT  = AUTOINIT_ON;                //autoinit

Then 

    dmaSetCtrlPacket(DMA_CH0,adc1_dmaCTRLPKT);
    //configure channel 0
    dmaSetChEnable(DMA_CH0, DMA_HW);
    //set DMA_CH0 to be triggered by hardware (adc1_ev complete)
    dmaReqAssign(DMA_CH0,7);
    //apparently ADC1_EV calls request line 7

and finally

dmaEnable();

no data is transferred.

What am I missing?