MATLAB: How to configure a pin on the 28335 eZdsp board to be an interrupt signal source in Target Support Package TC2 3.1 (R2008b)

gpiointTarget Support Package TC2

I would like to have an external device trigger an event on the 28335 eZdsp board via XINT1.
The TI manual indicates that the default pin for XINT1 is GPIO0. I put in a Hardware Interrupt block in my model to generate a function call triggered by XINT1. I expected to get an interrupt whenever I toggle GPIO0, but this does not happen.

Best Answer

The Hardware Interrupt block allows you to generate a function call triggered by XINT1 (CPU number = 1, PIE number = 4). However, you would still need to select a pin (for example, GPIO0) to be the interrupt signal source of XINT1.
To do this, you can add a "System Initialize" block (from the Real-Time Workshop -> Custom Code library) to your model and add some custom code that selects GPIO0 as the interrupt source. The attached model includes a System Initialize block, which does this.