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 AM335x BSP

Other Parts Discussed in Thread: AM3359, SYSCONFIG

Can anyone verify if the GPIO interrupt API works on the AM335x BSP?

I have something like:

GPIOSetMode(pDevice->hGPIO, pDevice->GPIOIrq1, GPIO_DIR_INPUT|GPIO_INT_HIGH_LOW);

which works just fine on my OMAP35xx device/BSP but does not on my AM335x platform/BSP.

I can see the GPIO line toggeling and I can read the GPIO status and also see it toggeling but I never get the interrupt triggered internally.

I tried both level and edge triggering.

  • Hi, boy, Now I have same issue with you about AM3359 WINCE7 GPIO IRQ.

    could you please help me ?

    below is my code:

     EnableDeviceClocks(AM_DEVICE_GPIO0, TRUE );      

    PHYSICAL_ADDRESS PortAddress = {AM33X_GPIO0_REGS_PA, 0};  

    pGPIORegs = (AM3XX_GPIO_REGS *)MmMapIoSpace(PortAddress, sizeof(AM3XX_GPIO_REGS), FALSE);

        pGPIORegs->SYSCONFIG |= (1<<1);

        pGPIORegs->OE |= (1<<4);  

    pGPIORegs->IRQSTATUS_SET_0  |= (1<<4);  

    pGPIORegs->IRQSTATUS_SET_1  |= (1<<4); 

      pGPIORegs->RISINGDETECT &= ~(1<<4); 

      pGPIORegs->FALLINGDETECT |= (1<<4); 

      pGPIORegs->LEVELDETECT0  |= (1<<4); 

      pGPIORegs->LEVELDETECT1 &= ~(1<<4);

    pGPIORegs->OE &= ~(1<<5); 

      pGPIORegs->DATAOUT |= (1<<5);  

    Sleep(100);  

    pGPIORegs->DATAOUT &= ~(1<<5);  

    Sleep(100); 

      pGPIORegs->DATAOUT |= (1<<5);

        SX8650_Init();

    //    s_TouchDevice.nPenIRQ = GetIrqByDevice(AM_DEVICE_ADC_TSC, NULL);  

    s_TouchDevice.nPenIRQ = IRQ_GPIO_4;//BSPGetGpioIrq(GPIO_4);

        // run intr thread and configure interrupt  

    if (!KernelIoControl(             IOCTL_HAL_REQUEST_SYSINTR,             &s_TouchDevice.nPenIRQ,             sizeof(s_TouchDevice.nPenIRQ),             &s_TouchDevice.dwSysIntr,             sizeof(s_TouchDevice.dwSysIntr),             NULL             ) )  

    {         RETAILMSG(1, (TEXT("ERROR: TOUCH: Failed to request the touch sysintr.\r\n")));      

    s_TouchDevice.dwSysIntr = (DWORD)SYSINTR_UNDEFINED;      

    goto cleanup;     } 

      RETAILMSG(1, (TEXT(" TOUCH: touch sysintr:%d.\r\n"), s_TouchDevice.dwSysIntr));

     

  • Use the zip file from th other post.http://e2e.ti.com/support/embedded/wince/f/353/t/233216.aspx

    and replace the intr.c file in the common ti directory.

    There is a know bug in the 2.30 release (along with many others) that prevented GPIO interrupts from working on the 335x platforms.