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.

configure interrupts with DSP\BIOS

Other Parts Discussed in Thread: TMS320C6455

I'm writing real-time software on C6455 DSP. In my system I have several GPIO events, two HWI interrupts and some EDMA events.

Till now I used CSL_Intc commnads do configure the interrupts, but I wan't to move to DSP\BIOS configuration to use more tasks and semaphores.

I configured the two HWI interrupts with the DSP\BIOS gconf (interrupt selection number, ISR) but I need to call C64_plug to plug again the ISR before it works.

now I tried to configure the EDMA events, but I don't know how to do this. I don't need to call any ISR or HWI, just plug GPIO event to EDMA event.

 

 

  • eli a,

    It would appear that your post's title should be "configure EDMA3 with DSP/BIOS". If that is not correct, then I have missed your question and will need you to restate it, please.

    eli a said:
    now I tried to configure the EDMA events, but I don't know how to do this. I don't need to call any ISR or HWI, just plug GPIO event to EDMA event.

    DSP/BIOS does not have any features to support EDMA3 directly. It does not have features to configure most of the DSP's peripherals, other than the EMIFs and one timer; maybe I forgot one or two, but not EDMA3.

    Instead, you will want to either use CSL or the EDMA3 Low Level Drivers (LLD). The CSL is what I know how to use, and I would point you to a repaired CSL example that I posted to the thread problem with EDMA3 chaining and look for the attached file in a post about 3/4 of the way down the page (as of this writing). This example sets up 2 DMA channels using 0 and 8 arbitrarily for a manually triggered pair of transfers. In your case, you would change the channel number to match the EDMA3 synchronization event number for the GPIO pins you want to use for triggering, such as 48 for GPINT0.

    The example code has a part that is "commented out" using #if 0, but this code sets the corresponding bit in EER to enable an event to trigger the channel instead of the manual trigger that the example code uses now. Search for (EER) and you will find this, which is required for the event from your GPIO pins to get forwarded into the EDMA3 event queue.

    Everything in the example after that point is not of use for your case, but most of the code above it is useful as an example.

    Please let me know if you have any issues using this or understanding what I have tried to say here. I am not sure I have worded this well, so I will count on you to figure out what I meant to say, or else ask me again.

    Regards,
    RandyP

     

    If this answers your question, please click the  Verify Answer  button below. If not, please reply back to clarify what you are asking for or to get clarification on what I failed to say.

  • Hi RandyP

    Thank you for your replay. I would like to explain my problem in details.

    I have two gpio pins that connects to HWI, and some gpio EDMA events. Today I use CSL_intc to configure both the interrupts and the events. The interrupts is plugged to the HWI function, and the events are configured as drop events, like this:

    gpioIntcHandle = CSL_intcopen(&gpioIntcObj, CSL_INTC_EVENTID_GPINT7, &vectid, &intStat);

    CSL_intcHwControl(gpioIntcHandle, CSL_INTC_CMD_EVTDROPENABLE, NULL);

    I configured the EDMA channel to work with GPINT7 as you said, and it works fine.

    Now I want to disconnect from CSL_intc and use the DSP\BIOS interrupt controller, to work with tasks and semaphores, whitch CSL_intc does not support (as I understand).

    I managed to configure the HWI through DSP\BIOS gui, but I need to call C64_plug to plug the interrupt and the HWI ISR, although it was suppose to work without it.

    I don't manage to configure the EDMA events. Do I need to configure them as drop events (without using CSL_intc)?  The EDMA isn't working now. I guess I missed something.

    Regrads,

    eli

     

     

  • eli,

    Usually, it is easy to use DSP/BIOS as your RTOS and still use CSL to control the things that CSL can control. CSL is not an OS, so CSL and BIOS do not interfere with each other, in most cases. With the INTC module, since there can only be one interrupt vector table, and since both DSP/BIOS and CSL_intc want to create and maintain one, there would be collisions. After that point, though, you can still use some commands from CSL to take care of things outside of that.

    But before we come up with the solution for you, I really need to get past some major confusion about what you are doing already.

    eli a said:
    gpioIntcHandle = CSL_intcopen(&gpioIntcObj, CSL_INTC_EVENTID_GPINT7, &vectid, &intStat);

    This line is clear enough. You are setting up to pass a GPIO7 event to the DSP as an interrupt, whichever interrupt number 4-15 is in the vectid variable. Note that DSP/BIOS will want to use DSP interrupt 15 for its timer, so try to avoid that one.

    eli a said:
    CSL_intcHwControl(gpioIntcHandle, CSL_INTC_CMD_EVTDROPENABLE, NULL);

    I have no idea why you are doing this. The mechanism for detecting dropped interrupt events is not something that would be related to EDMA3 events. My suspicion is that this line is not needed for anything you are doing.

    eli a said:
    I have two gpio pins that connects to HWI, and some gpio EDMA events.

    How many GPIO pins are you using for all of this, in total?
    Which ones are supposed to cause interrupts?
    Which ones are supposed to trigger EDMA3 transfers?
    Is there any possibility that you wanted to trigger an EDMA3 transfer when a GPIO7 interrupt is missed but not when it successfully causes a DSP interrupt?

    DSP/BIOS uses the acronym HWI for its hardware interrupts, so using the same acronym outside of DSP/BIOS is arbitrarily correct but is also a source of confusion in this case.

    eli a said:
    I managed to configure the HWI through DSP\BIOS gui, but I need to call C64_plug to plug the interrupt and the HWI ISR, although it was suppose to work without it.

    Please take a look at the TI Technical Training Organization's latest DSP/BIOS workshop material on the TI Wiki Pages, here. There is a section on configuring interrupts which will take you through the steps required to configure interrupts using DSP/BIOS. Even though the labs are targeted to a different DSP, the steps will be the same with some different numerical values instead.

    eli a said:
    I don't manage to configure the EDMA events.

    Please go to the thread to which I provided a link in my previous posting. You will find an example project there with code you can use as an example for configuring EDMA3 with CSL commands. This is completely compatible with DSP/BIOS, as no interrupts are involved in that example.

    You do not want to use Dropped Interrupt Events for EDMA3 events. You can read up on the IDROP mechanism in the C64x+ Megamodule Reference Guide which you can download from the TMS320C6455 Product Folder; use the red link to get there and look for Technical Documents.

    Regards,
    RandyP

     

    If this answers your questions, please click the  Verify Answer  button below. If not, please reply back with more information.

  • Hi RandyP

    I managed to solve the problem.

    First, you was right and I didn't need to use event drop in EDMA channel. It works without it.

    Second, I manged to configure the EDMA without CSL_intc. My mistake was that I confused between CSL_INTC_EVENTID_GPINT7 (= 58) and CSL_EDMA3_GPINT7 (=55). I open EDMA channel with the CSL_INTC number, instead of CSL_EDMA3 number. Now the HWI and EDMA work with DSP\BIOS only, without CSL_intc. It is more simple now and clearer.

    Thank you for your help,

    eli