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.

Interrupt handling in C6747 ?

I am reading interrupt controller part in megamodule User's Guide.(C6747)

I have some questoin as below:

Q1.  Can only one event be allocated into CPU Interrupt by Interrupt Selector?

         Ex.  (Yes)  EVT5 -> CPUINT4 , EVT5 -> CPUINT5

                 (No)  EVT4,EVT5 -> CPUINT4

Q2. Can I  allocate two or more events into CPU interrupt by use of Event Combiner?

          Ex.   EVT4,EVT5 -> Event Combiner -> EVT0 -> CPUINT4

                  Can we detect which event occur in ISR of CPUINT4 by reading EVT4's Flag and EVT5's Flag?

I need expert advice. ^ . ^ ;

 

  • yeunhun choi said:

    Q1.  Can only one event be allocated into CPU Interrupt by Interrupt Selector?

             Ex.  (Yes)  EVT5 -> CPUINT4 , EVT5 -> CPUINT5

                     (No)  EVT4,EVT5 -> CPUINT4

    You need the event combiner to do that.

    yeunhun choi said:

    Q2. Can I  allocate two or more events into CPU interrupt by use of Event Combiner?

              Ex.   EVT4,EVT5 -> Event Combiner -> EVT0 -> CPUINT4

                      Can we detect which event occur in ISR of CPUINT4 by reading EVT4's Flag and EVT5's Flag?

    Yes you can. Please look at page 149 of the document: http://www-s.ti.com/sc/techlit/spru403. 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.

    So basically, 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. The event combiner can be used to combine more than one event in one HWI.

    So if for example I put event number 1 in HWI 8, that means that it combines the events 32 – 63 (see page 1541 of the first document). If you wanted the I2C event that is number 36 (see datasheet page 60) , you can do in the ECM configuration for that event in the DSP/BIOS configuration file and put the name of the function you want to be called for event 36:

     


    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.