Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

HWI and ECM module in DSP/BIOS

In newer DSP, TI introduced new module - ECM to map events into CPU interrupts. But when I work with PSP, I can not find the ISR either in ECM or in HWI. How could I do if  I want to process my own ISR when some events happened?

  •  

    Please look at page 149 of the TMS320C6000 DSP/BIOS 5.x Application Programming Interface (API) Reference Guide.

    Is has the full explanation on how the ECM works. It is used for the case when more than 14 HWI need to be used. In the example case it was probably done to make it easier if you need more than 14 HWIs in the future.

    So basically, assuming that you are using C6747, if you look at the C6747 datasheet page 60, you have a list of events that can generate an interrupt.

    There are 128 events and only 14 HWIs. If you are using more than 14 interrupts, you need to use ECM, if you are not, than you can set the interrupts directly:

    http://tiexpressdsp.com/index.php/Setting_up_interrupts_in_DSP_BIOS

    The event combiner can be used to combine more than one event in one HWI. So if you see in the example (to install the software see GSG):

    C:\Program Files\Texas Instruments\pspdrivers_xx_xx_xx\packages\ti\pspiom\examples\evm6747\i2c\interrupt

    user_i2c_init() {
    ...
    i2cParams.hwiNumber = 8;
    ...
    }


    HWI 8 has event number 1 in the tcf file, and that means that it combines the events 32 – 63 (see page 151 of the first document) – that means that this includes the I2C event that is number 36 (see datasheet page 60) .

    Inside the driver, the function to be called by the ECM for event 36 is being configured dynamically. See function i2cRegisterIntrHandler in the i2c.c file of the driver’s project.

    So whenever events from 32 to 63 occur, HWI 8 is called, HWI 8 calls the ECM_dispatch function that will call the ISR that is configured to that event (and that is done by the driver).

    That is why you see:

    i2cParams.hwiNumber = 8;