Hi:
I am working on i.MX 8DualX processor and Linux is 5.4.70.
I am using like this : One CPU(rtos on it) sends a falling edge pulse at 1ms intervals, the i.MX 8 gets it and returns a falling edge pulse.
But I noticed that the i.MX 8 missed some pulses from the logic analyzer.the dts and driver like this:
dts:
```
front@0 {
......
interrupt-parent = <&lsio_gpio3>;
interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
........
};
```
driver:
static int32_t front_request_irq(struct front *fs)
{
return devm_request_threaded_irq(&fs->front->dev, fs->front->irq,
NULL, front_irq_handler,
IRQ_TYPE_EDGE_FALLING | IRQF_ONESHOT,
DEVICE_NAME, fs);
}
static inline irqreturn_t front_irq_handler(int32_t irq, void *dev_id){
//TO DO
......
gpiod_set_value(front.gpiod_ack, 1);
gpiod_set_value(front.gpiod_ack, 0);
udelay(1);
gpiod_set_value(front.gpiod_ack, 1);
.......
return IRQ_HANDLED;
}
could you give me some suggestions ?
Best regards!
Hi Kai
one can try irq affinity to perform interrupts on some core as on examples:
https://community.nxp.com/t5/i-MX-Processors/i-mx6-Linux-CPU-IRQ-affinity/m-p/220314#303749
https://stackoverflow.com/questions/33994983/assigning-a-cpu-core-to-a-process-linux
Best regards
igor