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.

DSP BIOS Interrupts

Hello,

I am trying to configure a IDMA1 channel to generate the interrupt on transfer complition, on C6747.

The IDMA1 event is number 14, so I configured INT#4 to have interrupt selection number 14 (tcf: HWI->HWI_INT4->Properties->General), and selected IDMA_intHandler() function to be activated.

Also I enabled the use of interrupt dispatcher with "self" mask.  In addition I've included init interrupt function, that configures an interrupt and enables the event:

void InitInterrupts()
{
 C64_clearIFR(0xFFF0);  // Clear all Interrupt flags

 intcRegs->INTMUX1 = 0x0E; // 14 - event number
 intcRegs->EVTFLAG[0] = (1<<CSL_DSPINTC_EVTFLAG_EF14_SHIFT)&CSL_DSPINTC_EVTFLAG_EF14_MASK;

 intcRegs->MEVTFLAG[0] = (1<<CSL_DSPINTC_MEVTFLAG_MEF14_SHIFT)&CSL_DSPINTC_MEVTFLAG_MEF14_MASK;

 C64_enableIER(C64_EINT4); // IDMA1
 HWI_enable();
}

The IDMA transfer is configured to generate an interrupt at the completion:

  idmaRegs->IDMA1_SOURCE = (Uint32)src;
  idmaRegs->IDMA1_DEST = (Uint32)dst;         // Set destination

  idmaRegs->IDMA1_COUNT = CSL_FMKT(IDMA_IDMA1_COUNT_PRI,PRI7) | CSL_FMKT(IDMA_IDMA1_COUNT_INT, INT) | CSL_FMK(IDMA_IDMA1_COUNT_COUNT,length);

I put a break point in IDMA_intHandler() to catch an interrupt, but no result there.

The IDMA transfer works correctly, but no interrupt arrives. I suspect that there is somthing wrong with the macros, can anyone explain me the correct sintaxis for the macros?

Regards

Arye

  • Ok, Found the problem:

     

    \There is a mistake in macro in CSL Library C6747:  In file cslr_idma.h:

    /*----INT Tokens----*/
    #define CSL_IDMA_IDMA1_COUNT_INT_NOINT (0x00000001u)
    #define CSL_IDMA_IDMA1_COUNT_INT_INT (0x00000000u)

    shoud be swapped:

    /*----INT Tokens----*/
    #define CSL_IDMA_IDMA1_COUNT_INT_NOINT (0x00000000u)
    #define CSL_IDMA_IDMA1_COUNT_INT_INT (0x00000001u)

    That took me some time to find!!

     

  • I am working with the C6747 DSP. I have written three different projects in CCS; one that successfully setups SPI1 and and its interrupt to transmit and receive data from a master peripheral, one that successfully setups USB2.0 and its interrupts to successfully enumerate with a Linux host, as well as transmit and receive data with the Linux host, and finally one that setups and uses Timer12 and its interrupt to count clock cycles. Now, I have to integrate these projects and get them to work in harmony. So far USB works the same. However, I am not getting subsequent SPI1 interrupts, nor at the right time. I get a transmit interrupt immediately after SPI1 is setup and its interrupts (SPI and INTC) is setup and enabled. Once I get to the portion of the integrated program that writes data to SPIDAT0, I do not get another interrupt.

    TI Employees, Please help! I need to know what the missing peice of this puzzle is to get all three interrupts to be invoked properly and work in harmony.

    Thanks,

    Okie.