Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Hey guys, a friend of mine is currently working on AT91SAM9M10-EKES. The Code registers IRQ for 2 GPIO pins (PA20 & PA21) but only receives 22/26 expected interrupts (random). Could there be an issue in this IRQ handling code?
“` static irqreturn_t wiegand_interrupt(int irq, void *dev_id){
atomic_inc(&counter);
printk(KERN_WARNING “IRQ received, counting… %d\n”, atomic_read(&counter));
return 0;
}
irq1 = gpio_to_irq(AT91_PIN_PA21);
if (irq1 < 0) {
err = irq1;
printk("Unable to get irq number for GPIO %d, error %d\n", AT91_PIN_PA21, err);
goto fail;
}
err = request_irq(irq1, wiegand_interrupt, 0, "wiegand", NULL);
irq2 = gpio_to_irq(AT91_PIN_PA20);
if (irq2 < 0) {
err = irq2;
printk("Unable to get irq number for GPIO %d, error %d\n", AT91_PIN_PA21, err);
goto fail;
}
err = request_irq(irq2, wiegand_interrupt, 0, "wiegand", NULL);
```
Any suggestions for troubleshooting missed interrupts? @Middleware & OS
CONTRIBUTE TO THIS THREAD