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.

GPIO Interrupt on Piccolo F28027F in Simulink

I have some troubles about GPIO Interrupt  on Piccolo F28027F in Simulink.

I am working on a project for a controller of elevator. I chose F28027 with Embedded Coder Support Package for Texas Instruments C2000 Processors, so I want to model-based development.

The GPIO 18 is bounded with an interrupt signal from an I2C-Slave. That is, if GPIO18 an interrupt signal received, it will do something.

However I do not know, how to configure the GPIO Interrupt in Simulink.

 

There is an example about I2C Interrupt from Mathworks. ‘Using the I2C Bus to Access Sensors’

In this example I can’t understand, how can I define the ‘Source code Symbol’ in the block Memory Copy.

 

In my case, for example, I want to configure GPIO18 as Interrupt, then I must configure the Register of GPIOXINT3SEL and XINT3CR. But how and where?

 

I hope someone can help me. Thank you very much.

  • Jijing,

    There are multiple ways to configure an interrupt in Simulink.:

    You can trigger the GPIO and use "c28x Hardware Interrupt" block then select your interrupt and PIE number based on the table in "help".

    If you're not using the predefined interrupts in your MCU, you can read the GPIO by using "GPIO DI" and trigger a software interrupt by using "Software Interrupt Trigger" block. Then the rest is the same as first approach,  you need to define the interrupt and PIE number in your software interrupt block and use a "c28x Hardware Interrupt" block with the same interrupt number. Note in the second approach, use the reserved interrupt and PIE numbers for your software interrupt.

    Hope it helps,

    Kash

    If my post answered your question, please click on "Verified answer" button.