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.

How to use ECM in DSP/BIOS

Hello Ti's engineers,

       I want to use ECM module in DSP/BIOS, so I have followed the instructions at page 150 in the datasheet of TMS320C6000 DSP/BIOS 5.x Application Programming Interface Reference Guide. Besides I used GPIO module to produce a external interrupt when it had detected a falling edge of GPIO signals. And I'm sure that this method is successful when I used HWI module directly. After I had transformed HWI into ECM, it didn't work, programme couldn't run into the ISR of event which was configured in ECM module in DSP/BIOS. I had checked the registers about  ECM and I could see that the EVTFLAG, EVTMASK and MEVTFLAG were all right.

      So, I want to know if there are some details I had missed. And my DSP/BIOS is v5.31.02.

     Thank you!

  • Did you map the corresponding ECM interrupt (e.g. #0-3) to one of the DSP interrupts (e.g. 4-15)?  There are a few pieces to doing this and I think the documentation is a tad vague, so perhaps I can help.


    Let's say you're combining events 32-63 (i.e. ECM interrupt #1).  Let's say you're mapping the ECM interrupt to CPU interrupt #5.  You would need to do the following:

    • Right-click HWI5 and select Properties.
    • For the "interrupt selection number" enter 1 (i.e. for EVT #1)
    • For the "function" enter _ECM_dispatch
    • Click on the Dispatcher tab.
    • Tick the checkbox "Use dispatcher"
    • The "Arg" should be the same as what you entered for "interrupt selection number", in this example 1.
    • (Optional) Change the interrupt mask as desired.  Generally I recommend setting it to "all" so there is no pre-emption of hardware interrupts and I try to keep ISRs short and sweet.  This helps prevent stack overflows to do many nested interrupts.

     Brad

  • Hi Griffis,

    Thank you for your technical support, I have done this subject successfully. I found there is no differences between the methods we did. Maybe sometimes there were some strange situations we have to face.

    yours,

    Jay