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.

sysbios and EDMA

Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm using CCS v4.2, csl and bios_6_30_02_42 with C6474 lite EVM.

I have an app that uses EMAC and EDMA3.

The code was first developed to use CSL only. EMAC and EDMA work correctly.

I have now converted the code to a sysbios app.

Using GUI editor for cfg, I added Hwi for EMAC and it works properly using eventID's 6 and 7

The problem is that now EDMA never recieves the completion interrupt. When program is halted in the debugger,

the Memory widow shows the transfer completed. I have tried to use Hwi with eventID 61 but this also don't work.

Also not clear on GUI entry for IntNum and eventID. My assumption is the eventID corresponds to event numbers defined in soc.h

Any help or pointers appreciated, thanks

Fred

  • Problem solved:

    Original code is based on example with CSL package. In the main() function it manually triggers the EDMA and waits for a completion interrupt in a while loop. Interrupt processes IPR/IPRH and invokes the appropriate handler for the tcc code. In the CSL version, the TCC handler sets the flag and the while loop in function main() falls thru.

    My guess is that this setup conflicts with the task scheduler of sysbios caused by a blocking operation in the while loop. I moved the manual trigger for the EDMA to a task that handles the incoming packets from EMAC. A second task was added that pends on a Semaphore posted by the TCC handler. It works!

    As to the Hwi entries for eventID i used 61 (EDMA3 channel global completion interrupt). Still not clear on appropriate entries or use for IntNum.

    Fred:-)

  • Have a look here : http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/177116.aspx#637557

    I use EDMA transfers with Sysbios on the C66x (very close to C64x) with the CSL.

    I have to working solutions to handle the end of the transfer :

    - polling

    - ISR

    I've tried unsuccessfully to use the HWI gui of sysbios but in fact it was of little interest because it would only replace 4 lines of code of my solution with the ISR.

    Ping me if you have questions.

    Regards,

    CM

  • Hi CM,

    Thanks for the post, I had viewed the post at your link earlier looking for a solution to use of the sysbios gui and EDMA. Never found an example and eventually found a solution.

    In my case, I needed the sysbios model for task support among other things. My app uses EMAC send/receive EDMA and IPC. Use of the sysbios gui to connect EMAC send and receive interrupts to ISR was a simple process. When I initially tried EDMA global completion interrupt it appeared not to work. Transfer would complete but never received the interrupt. The original code was based on CSL example that implemented the entire example in function main(). This example is very similar to your code in the post. In the example I used, the manual trigger was called as in your case followed by  while(!intFlag); This while loop seems to cause a block to the core. I restructured the code to use a Semaphore instead of an int flag. I then added a new task that waits on the semaphore. Finally, I moved the manual trigger for EDMA to a task that handles incoming packets. The TCC/edma interrupt handler posts the semaphore and all is well. The advantage of this approach is the elimination of all CSL_Intc code. The only part I kept was the edma_int_handler that checks IPR/IPRH to dispatch the appropriate TCC. In the end, I wish there were more examples in the package for sysbios that demonstrate hardware usage.

    Thanks, Fred:-)