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/TMS570LS0432: Gio interrupt not working

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Dear All,

I want to use gio interrupt feature of TMS57004. Hence I have done the following configuration in halcogen.

1. Enable gio driver

2. In Pin MUX activated gio PortA

3. In gio, I set bit 7 in input and enable VIM low priority, falling edge.

4. In VIM Enable channel 9 Gio int A.

and generated code.

In sys_main I have written the following code:

#include<stdio.h>

#include "sys_common.h"

#include "gio.h"
#include "system.h"

int main(void)
{
/* USER CODE BEGIN (3) */

gioInit();

printf("Start\n");

vimInit();

gioSetDirection(gioPORTA,0x00);

gioEnableNotification(gioPORTA,7);


_enable_IRQ();

while(1);
/* USER CODE END */

return 0;
}

void gioLowLevelInterrupt(void) {
printf("Button pressed\n");

}

But I am not getting any response when I presses the button.

I am attaching my files for your reference.

Please help me in resolving the issue.

Regards,

Gunit

2678.gioint.rar

  • Hello Gunit,

    In GIO configuration, you enable the LOW Priority interrupt. But in VIM channel configuration, you only enable Level 1 (channel 9) which is high priority. This is why you don't have interrupt.

    1. select channel channel 23 in VIM config

    or

    2. select high priority in GIO config
  • Hello Wang,

    As per your suggestion, I selected channel 23 in VIM config ( which is written as Gio Int B in halcogen) but I this getting compilation error.

    error #10056: symbol "gioLowLevelInterrupt" redefined: first defined in "./source/gio.obj"; redefined in "./source/sys_main.obj"
    error #10010: errors encountered during linking; "gioint.out" not built

    I am not able to debug the reason for this error.

    Please help me in resolving the issue.

    Regards,
    Gunit
  • Hello Gunit,

    If you enable the GIO interrupt (low or high) in VIM, the ISR will be generated in gio.c. If you need to add code for this interrupt, please add code to notification.c.

    This error is caused by your code:

    void gioLowLevelInterrupt(void) {
    printf("Button pressed\n");
    }

    Please add printf(..) to gioNotification function in notification.c:

    void gioNotification(gioPORT_t *port, uint32 bit)
    {
    /* enter user code between the USER CODE BEGIN and USER CODE END. */
    /* USER CODE BEGIN (19) */
    printf("Button pressed\n");
    /* USER CODE END */
    }