Part Number: TDA4AH-Q1
Other Parts Discussed in Thread: TDA4VH, TDA4VM
Hi Team,
When the consumer is debugging a peripheral, it does not respond after registering the interrupt. The peripheral hardware interrupt has been acknowledged to have a waveform that affects the level state of the interrupt line that can be read when set to input mode.
DTS:
gpio_irq = <&main_gpio0 24 GPIO_ACTIVE_HIGH>; /*gpio0_24 AE36*/
The location to call:
client_data->gpio_pin = of_get_named_gpio_flags(
client_data->dev->of_node,
"gpio_irq", 0, NULL);
// client_data->gpio_pin = 388;
PINFO("%s gpio 2 number:%d\n", SENSOR_ACC_NAME, client_data->gpio_pin);
if (client_data->gpio_pin < 0) {
PINFO("%s return gpio number:%d\n", SENSOR_ACC_NAME, client_data->gpio_pin);
err = client_data->gpio_pin;
return err;
}
#if 1
err = gpio_request_one(client_data->gpio_pin,
GPIOF_IN, "smi230_acc_interrupt");
if (err < 0) {
PDEBUG("gpio_request_one\n");
return err;
}
err = gpio_direction_input(client_data->gpio_pin);
if (err < 0) {
PDEBUG("gpio_direction_input\n");
return err;
}
printk("irq 2 %d\n",client_data->IRQ);
#endif
printk("irq 3 %d\n",client_data->IRQ);
client_data->IRQ = gpio_to_irq(client_data->gpio_pin);
printk("irq %d\n",client_data->IRQ);
err = request_irq(client_data->IRQ, smi230_irq_handle,
IRQF_TRIGGER_RISING,
SENSOR_ACC_NAME, client_data);
if (err < 0) {
printk("request_irq %d\n",err);
return err;
}
The following interrupt counts are not incremented:
364: 0 0 0 0 0 0 0 0 GPIO 24 Edge -davinci_gpio SMI230ACC
WKUP_GPIO0_13 K38 is also used to test if interrupts are supported, but failed.
It's found that the corresponding interrupt is already set:

Clear and automatically set to 1:

Now the pin used is AE36, pinmux is set correctly:
devmem2 0x0011C060
/dev/mem opened.
Memory mapped at address 0xffffaf991000.
Read at address 0x0011C060 (0xffffaf991060): 0x00050007

Could you please help check this case? Thanks.
Best Regards,
Cherry








