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.

TDA4VH-Q1: GPIO Interrupt Problem

Part Number: TDA4VH-Q1

Tool/software:

Hi Neehar,

Referring to the FAQ, single GPIO interrupt  is OK.

But there is an anomaly when using dual channels: the second GPIO interrupt cannot be triggered.

I suspect it is a problem with interrupt routing.Therefore, I would like to ask:

1) WKUP_GPIO0_10's interrupt route number is CSLR_R5FSS0_CORE0_INTR_WKUP_GPIOMUX_INTRTR0_OUTP_16 or CSLR_WKUP_GPIOMUX_INTRTR0_IN_WKUP_GPIO_VIRT_OUT0_10_0?

    Target core is MCU2_0.

2) When the dual channel exception, the gpio_INTSTAT01 register (0x42110034u) is normal, so I suspect the interrupt routing problem, please help to guide, as follows:

(gpio_cfg.intCfg[looper]).intNum = CSLR_R5FSS0_CORE0_INTR_WKUP_GPIOMUX_INTRTR0_OUTP_16;	//WKUP_GPIO0_10
if (looper == 1)
{
    (gpio_cfg.intCfg[looper]).intNum = CSLR_R5FSS0_CORE0_INTR_WKUP_GPIOMUX_INTRTR0_OUTP_17;	//WKUP_GPIO0_9
}


BR
Lei

  • Hi Lei,

    CSLR_R5FSS0_CORE0_INTR_WKUP_GPIOMUX_INTRTR0_OUTP_16

    This should be the correct one.

    Can you provide all the interrupt setup you are doing?

    Thanks,

    Neehar

  • Hi Neehar,

    I found a suspect, I'll check it first and reply to you later.

    BR,

    Lei

  • Hi Lei,

    Ok, feel free to reach out if you need help.

    Thanks,

    Neehar

  • Hi Neehar,

    1.

    Can you provide all the interrupt setup you are doing?

    #define MAX_GPIOS_USED_IN_APP 2
    
    for (looper = 0; looper < MAX_GPIOS_USED_IN_APP; looper++)
    {
        GPIO_socGetInitCfg(looper, &gpio_cfg);
        gpio_cfg.baseAddr = ussGpioAddr[looper].gpioBaseAddr;
    
        /* config Int Router */
        (gpio_cfg.intCfg[looper]).intNum = CSLR_R5FSS0_CORE0_INTR_WKUP_GPIOMUX_INTRTR0_OUTP_16 + looper;
        //(gpio_cfg.intCfg[looper]).eventId = 0;
    
        (gpio_cfg.intCfg[looper]).intcMuxNum = INVALID_INTC_MUX_NUM;
        (gpio_cfg.intCfg[looper]).intcMuxInEvent = 0;
        (gpio_cfg.intCfg[looper]).intcMuxOutEvent = 0;
    
        GPIO_socSetInitCfg(looper, &gpio_cfg);
    }
    ...
    GPIO_init();
    GPIO_enableInt(0);
    GPIO_enableInt(1);

    2. I find that the second interrupt exception is due to  Sciclient_rmIrqFindRoute error, return -1.

    The deeper reason has not been found, please help to have a look.

    3. I found that the first route number is configured to any value, and the single route interruption is OK.
    After checking logs, it is found that the configured route number does not take effect and the number used by the route is 500.
    After I change the number to 488 or 488+32, the single interrupt callback fails. Please help check.

    BR,

    Lei

  • Hi Lei,

    I found that the first route number is configured to any value, and the single route interruption is OK.
    After checking logs, it is found that the configured route number does not take effect and the number used by the route is 500.
    After I change the number to 488 or 488+32, the single interrupt callback fails. Please help check.

    This must be because GPIO_init is called after Board_initGPIO and is overwritten in GPIO_socConfigIntrPath.

    Thanks,

    Neehar

  • Hi Neehar,

    I find that the second interrupt exception is due to  Sciclient_rmIrqFindRoute error, return -1.

    Please look into this problem, too.

    BR,

    Lei

  • Hi Lei,

    Let me look into this API further and get back to you.

    Thanks,

    Neehar

  • Hi Neehar,

    I would like to ask about banked interrupts and line interrupts:

    1) For R5/A72, is the interrupt number the same when the interrupt is triggered for different GPIOs of the same BANK?

    2) How do I use LINE interrupts for MCU2-0 FreeRtos?

    BR,

    Lei

  • Hi Lei,

    1) For R5/A72, is the interrupt number the same when the interrupt is triggered for different GPIOs of the same BANK?

    Do you mean interrupt number at the core such as GIC or R5? At the core, the entire bank has one interrupt line from the GPIO module to the core.

    2) How do I use LINE interrupts for MCU2-0 FreeRtos?

    Let me look into this and respond with a detailed answer.

    Thanks,

    Neehar

  • Hi Lei,

    Sorry for the delay, is this issue still open?

    Thanks,

    Neehar

  • Hi Neehar,

    Thanks for your reply, Question closed.

    BR,

    Lei