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.

DRA718: IPU1 gpio interruption

Part Number: DRA718
Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm working on a platform based on a dra718 soc with Android 8.0 booting on the A15 and a TI-RTOS running on the IPU1.

We need to enable a GPIO 1 interruption on the IPU1 processor.

Some GPIO 1 inputs are attach to gpio-keys driver handled by A15. Other GPIO 1 inputs are read from IPU1. A new feature requires to enable one IPU1 gpio1 interruption.

Following ti/pdk_dra7xx_1_0_7/packages/ti/csl/example/gpio/gpio_interrupt/main.c example, the integration of the interrupt initialization halts IPU1.

    Intc_Init(); // this call halts the system
    Intc_IntEnable(GPIO1_INT_NUMBER);

    Intc_IntRegister(GPIO1_INT_NUMBER, (IntrFuncPtr) GPIO1_IRQ, (void *) 0);
    Intc_IntPrioritySet(GPIO1_INT_NUMBER, 1, 0);
    Intc_SystemEnable(GPIO1_INT_NUMBER);


We are testing the code from uboot (avoiding starting linux kernel where IPU1 has the same behavior to simplify the code test). Also GPIO1 node is disable in dtb:

&gpio1 {
   status = "disabled";
   ti,no-idle;
   ti,no-reset-on-init;
};

Could you give us some help on that matter? It seems that trying to access WUGEN registers is beeing blocked.

Thanks, best regards

Agustín.

  • Hi Austin,

    Please check if INT_STAT register in the GPIO indicate that the interrupt has been generated. 

    In addition, are you setting interrupt mux to redirect GPIO interrupt to IPU's interrupt line? This is required, without this, IPU will not get any interrupt. S

    Regards,

    Brijesh

  • Hi Brijesh,

    The problem is that an exception happens when we try to occurs:

        Intc_Init();

    This function fails trying to access:

    void IPU_WUGEN_DisableAll(void)
    {
        HW_WR_REG32(SOC_IPU1_WUGEN_BASE + IPU_WUGEN_MEVT0, 0U);
        HW_WR_REG32(SOC_IPU1_WUGEN_BASE + IPU_WUGEN_MEVT1, 0U);
    }

    It is possible that the access to those registers are restricted by our cfg file or memory mapping?

    Regards,
    Agustín.

  • Hi Agustin,

    Not sure why it crashes, have you tried commenting out this API? 

    Do you use sysbios on this core? Then you dont need to call IntC_init API. You should then use Bios APIs, like Hwi_register to register ISR for the give irq number. 

    Regards,

    Brijesh