MATLAB: How do the interrupts in the PIE vector table for the F28335 board correspond to the interrupts in the ePWM block from Embedded Coder 6.2 (R2012a)

Embedded Coderezdspinstrumentspiccolotexas

I am using Embedded Coder 6.2 (R2012a) with Code Composer Studio (CCS) 3.3 and the F28335 board. Specifically, I am working with the interrupts under the "Enable ePWM interrupt" checkbox (under the "Event Trigger" tab) from the ePWM block. I am wondering how these interrupts correspond to the interrupts from the TI chip's PIE vector table.

Best Answer

On the PWM block, the "enable ePWM interrupt" activates the corresponding ePWM interrupt in the PIE matrix. On the F28335, there are 6 PWM modules and 6 corresponding interrupts. On the "general" tab of the ePWM block, you select which module you want to use. The "enable ePWM interrupt" will activate the ePWM interrupt of the specific module. In the PIE matrix, the ePWM interrupts are on CPU line 3. If using ePWM module 1, the interrupt will be INT3.1. If using ePWM module 2, it will be INT3.2, and so on.
Historically, there used to be only 1 ADC interrupt on c2000 devices on INT1.6 in the PIE. TI later broke it into 2 interrupts allowing the user to generate separate interrupts for ADC modules A and B. These 2 new interrupts are on INT1.1 for module A and INT1.2 for module B. They kept INT1.6 for backward compatibility. INT1.6 will trigger on any of the ADC interrupts. INT1.1 will only trigger for module A and INT1.2 will trigger for module B. There are specific rules for cascaded modes and simultaneous modes that are explained in the TI documentation.
Note that we also provide a "Software Interrupt Trigger" block in the list of available blocks. You can use it to raise an interrupt in the PIE via software. You can use it on the "reserved" interrupts in the PIE. We would recommend using it on lines that are completely reserved to prevent interactions with other interrupts on the same line. For example, on the F28335, line 10 of the PIE matrix is entirely "reserved"; therefore, 10 is a good CPU value to use with the Software interrupt trigger block. This block will just raise the interrupt. You would have to use the hardware interrupt block to react on the interrupt and trigger a function-call subsystem on the PIE coordinates. We have a demo called "Asynchronous Scheduling" that shows how to deal with interrupts. The demo model for F28335 can be accessed by typing the following at the command prompt:
>> c28335asyncscheduling