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.

CCS/TMS570LC4357: Problem in GIO interrupt 0 bit for port A

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hi,

For the GIO interrupt i tried the following code:

_enable_IRQ();
gioInit();
gioEnableNotification(gioPORTA,0);

gioSetDirection(gioPORTA,0x01);
gioSetBit(gioPORTA,0,1);

but when same i tried with the bit 7 instead bit 0 it worked.

why is it so?

What if i want to use the same bit in my application?

Please help me in the case.

Regards,

Shivam Kakad

  • Hello Shivam,

    The GIO pin should be configured as INPUT to generate GIO interrupt.

    gioSetDirection(gioPORTA,0x01); --> GIOA[0] is configured as OUTPUT

    The following is the sequence to configured a GIO pin for Interrupt:

    0. Select a GIO pin to generate interrupt: for example GIOA[0]

    1. Configure the selected GIO pin as INPUT

    2. Enable the Interrupt: GIOENASET

    3. Select the edge on the selected GIO pin that is used to generate interrupt: rising/falling/both: GIOPOL, GIOINTDET

    4. Select the interrupt priority (Low- or high-level interrupt): GIOLVLSET, GIOLVLCLR

    5. Individual interrupt flag is set in the GIOFLG register

    I suggest you to use HALCoGen to enable the GIO interrupt.

  • Can you please provide the working example. as i tried but except 7th bit it is not working?

    My requirement is to get the interrupt for the GIO pin. as i can able to get for the 7th bit but not for the other bits.

    Any pull up,Pull down register settings i need to consider?

    Please assist me as early as possible.

    Regards,

    Shivam Kakad

  • Hi Shivam,

    If you have the GIO pin pulled up, can you verify the pin is going low as expect by probing it?

    Make sure you having the PINMUX configured correctly as well for GIO bit 7.

    Make sure you have the VIM configured correctly as well. If GIO bit 7 is configured as High Priority, then the GIO High channel should be enabled.

    For example, the screenshot below configures Bit 7 pulled high, triggered on falling edge, and high priority interrupt.

    Therefore, we need to enable the GIO High Priority interrupt channel in VIM:

    Hope this helps.