MATLAB: How to generate code for TC2000 in order to output pulses on a GPIO(General Purpose Input Output) port using ePWM (Enhanced Pulse Width Modulator) interrupts

Target Support Package TC2

I have a TMS320F28335 board and would like to use the "ePWM" block to output pulses on the GPIO port on this board.

Best Answer

The ability to generate code for TC2000 in order to output pulses on a GPIO port using ePWM interrupts is available in Target Support Package TC2 3.2 (R2009a).
The following steps have been implemented in the attached example to use the "ePWM" block to output pulses on the GPIO port on the board.
1. Configure the "ePWM" block to produce interrupts.
2. Configure the hardware interrupt block to call function call subsystem on PWM interrupt.
3. Configure the sub-system to output the pulses on the GPIO port.
For more information on the "ePWM" block, refer to the documentation link below.
<http://www.mathworks.com/access/helpdesk/help/toolbox/targetsupport/tic2000/c280xc28x3xepwm.html>