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.

External interrupt about F28377D

Other Parts Discussed in Thread: CONTROLSUITE

The target I want to achieve is to setup GPIO91 as XINT1. The relevant code is shown below:

EALLOW; 
PieVectTable.XINT1_INT = &xint1_isr;

EDIS;

PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Gropu 1 INT4
IER |= M_INT1; // Enable CPU INT1
EINT;

EALLOW;
GpioCtrlRegs.GPCMUX2.bit.GPIO91 = 0; // GPIO
GpioCtrlRegs.GPCDIR.bit.GPIO91 = 0; // input
GpioCtrlRegs.GPCQSEL2.bit.GPIO91 = 0; // XINT1 Synch to SYSCLKOUT only

EDIS

GPIO_SetupXINT1Gpio(91);

XintRegs.XINT1CR.bit.POLARITY = 0;      // Falling edge interrupt

XintRegs.XINT1CR.bit.ENABLE = 1;        // Enable XINT1

 

When I toggle the GPIO91 level through external circuit, the register value of "GpioDataRegs.GPCDAT.bit.GPIO91" in CCS expression window toggles accordingly.

But the program doesn't enter the interrupt service routine "xint1_isr". However, if I forcedly set the register "PieCtrlRegs.PIEIFR1.bit.INTx4" to 1, it will enter "xint1_isr". 

I also checked the register "InputXbarRegs.INPUT4SELECT", it is set with 91. So I think the problem may be that the GPIO91 doesn't trigger the PIE1.4 correctly. But why? Is there any wrong with my program?

  • Hi,

    As per TRM of this device, following is the step to setup external interrupt -

    " 6. Select external interrupt sources

    Configuring external interrupts is a two-step process. First, the interrupts themselves must be enabled

    and their polarity must be configured via the XINTnCR registers. Second, the XINT1-5 GPIO pins must

    be set by selecting the sources for Input X-BAR signals 4, 5, 6, 13, and 14, respectively. For more

    information on the Input X-BAR architecture, see the ePWM chapter of this manual."

    Can you try changing the programming sequence as per this and see if that resolves the issue.

    Regards,

    Vivek Singh

  • 3 days ago, i also have problem like your problem.
    My problem was about SCI RX interrupt.
    Bytes received but program did not enter the sci isr.

    I solved this problem with bootmode pins.
    My bootmode pins was not set correctly.
    My emu pin (GPIO34) was not pulled up.
    When i pulled up GPIO34, program start to enter sci isr.

    Maybe its only accidental or its wrong way; but i wanted to share with you.

    Mehmet Kucukgoz
    Best regards from Türkiye.
  • As you suggested, I moved "GPIO_SetupXINT1Gpio(91)" after configuring the external interrupt themselves as shown below:
    XintRegs.XINT1CR.bit.POLARITY = 0; // Falling edge interrupt
    XintRegs.XINT1CR.bit.ENABLE = 1; // Enable XINT1
    GPIO_SetupXINT1Gpio(91);

    Still, the program cannot jump into the xint1_isr.
    I think the XINT1 interrupt themselves are configured correctly due to manually set with PIEIFR. The problem may be the setting of the XINT1 trigger source, i.e Input X-BAR.
  • Hi, Kucukgoz

    Thanks for your sharing. I changed XINT1 trigger pin from GPIO91 to GPIO93, and it doesn't work either....
  • Hi,

    There is an example (external_interrupt ) in controlSUITE. Did you try that example code to see if you are able to run that successfully on your setup?

    Regards,

    Vivek Singh

  • I noticed that example in controlSUITE. It needs to externally connect GPIO30 to GPIO0 which is not available in my hardware platform. The other sequence of register configuring is almost the same.
    By the way, the DSP I used is TMX320 F28377D, not TMS320 F28377D.
  • Hi,

    There is no change in functionality of TMX320 F28377D and TMS320 F28377D devices (both are same). What I was suggesting is to use the example code from controlSUITE and change the GPIO pin setting to use GPIO pin which you need.
    Could you send your project which we could try on our setup?

    Regards,
    Vivek Singh
  • OK, I have sent you a private message. Please have a check.
  • Hi,

    I simulated the code sent by your team member on my setup and I don't see any issue. I loop-backed the GPIO30 to GPIO91 on my board and every time GPIO30 is driven low, code jumps to xint1_isr. So no issue with code (SW setting).

    I would suggest to relook at the HW which is connected to GPIO91 pin on your setup to make sure it's toggling as expected (driving the pin low after interrupt setting is done in SW).

    Regards,

    Vivek Singh