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.

RTOS/TMS320C5534: DSP/BIOS DMA HWI support

Part Number: TMS320C5534

Tool/software: TI-RTOS

Hello,

I am trying to enable an DMA HWI with DSP/BIOS, with DPS/BIOS 5.42, CSL 3.08 and using CCS7 (linux).

I checked virtually everything + browsed the forums, and basically i just cannot make my DMA generating interrupts.

IMPORTANT: i am currently experimenting with a memory-to-memory DMA transfer, not with IO (not yet..)

So basically, the HWI is defined correctly in my .cfg file :

var HwiDMA = bios.HWI.instance("HWI_INT8");
HwiDMA["fxn"]= prog.extern("Dma_HWI");
HwiDMA.useDispatcher = 1;
bios.HWI_INT8.interruptMask0 = "self";
bios.HWI_INT8.interruptMask1 = "self";    

running with the debugger (ezDSPC55 board) i can see:

- all the DMA config registers contain sensible values (using the DMA0CHO).

- The dma0ch0tcr2 has the EN and INTEN set

- the DMAIER has all bits sets

- address and length params are correctly set.

If i put a BP at the dispatcher_isr8 address, i never stop there, although i verified that the timer (used by rtos ) dispatcher correctly steps in.

Breaking with the debugger, i also checked that the IPVD resgister holds the correct address for the vectors. The INTM bit is disabled .... but i believe this is becuase the debugger has stopped (am i right ?). Anyway, DSP/BIOS dispatcher should handled that (from the doc ..).

So basically, i juts cannot figure out what else to check. Also, i am using CSL code as much as possible, and i also stepped into it, nothing bizarre at all.

My code init the dma in the main, but leaves the INT (DMAEVENT) disabled. Then, in my Task, i enable the DMA interrupt (    IRQ_enable(DMA_EVENT);) and do a DMA_start() ....

 

Does anybody have a suggestion of what i could have done wrong ?

thanks,

Jacques

  • The team is notified. They will post their feedback directly here.

    BR
    Tsvetolin Shulev
  • OK, after a lot of tests, i think I get it.
    The killer here is that, I am using CSL to access and handle the dma, so the sequence is:

    DMA_init --> DMA_open --> DMA_config --> DMA_start

    DMA_open is given a ptr to an CSL_DMA_ChannelObj. it would return an handle which will later be used by DMA_config, DAM_Start etc ... This handle is the address of the previous CSL_DMA_ChannelObj, and therefore its scope HAS TO BE GLOBAL in case the start is done in another scope :(
    In my case, the handle was global ... but the channelObj was local to my init function, called from Main.
    As the DMA_start was done in a Task context, the handle was pointing to garbage :)

    After fixing all this ans reorganizing the code a bit, interrupts started firing :)