>-----Original Message----- >From: François Legal <[email protected]> >Sent: Wednesday, June 16, 2021 4:19 PM >To: Chen, Hongzhan <[email protected]> >Cc: [email protected] >Subject: RE: Large gpio interrupt latency > >Le Mercredi, Juin 16, 2021 10:10 CEST, "Chen, Hongzhan" ><[email protected]> a écrit: > >> >> > >> >-----Original Message----- >> >From: Xenomai <[email protected]> On Behalf Of François Legal via >> >Xenomai >> >Sent: Wednesday, June 16, 2021 3:16 PM >> >To: [email protected] >> >Subject: Large gpio interrupt latency >> > >> >Hello, >> > >> >working on a realtime data recorder (for which I submitted a patch to add >> >timestamp retrieval for net packets), I experience a strange latency >> >problem with taking GPIO interrupts. >> > >> >So basically my app monitors network packets (which as received by the DUT >> >would trigger toggling of a GPIO on the DUT) and one GPIO. >> >We know (from some ohter reference instrument) that the DUT would toggle >> >the GPIO 1-2ms after receiving a specific network packet. >> > >> >My recorder app relies on the timestamping of events done in interrupts >> >service routines for GPIOs and network interface. By checking the >> >timestamps returned by the application, I get an about 50ms delay between >> >the network packet and the GPIO (so something between 51 and 52ms delay). >> > >> >> Are you toggling gpio and access gpio device through your rtdm device like >> on path /dev/rtdm/your_gpiocontroller/gpio*? >> > >Maybe my setup was not very clear. >I've got a DUT that receives network data, and toggles one of its GPIOs >depending one the network data. > >I've got another device running my realtime recording app, that receives the >same network data as the DUT, and that has one of its GPIO connected to the >DUT GPIO. > >On the recording app, I use the RTDM device to open, ioctl (enable interrupt + >timestamp), then select & read the GPIO value.
When issue happen, the recording app side have got same number of network data packages and gpio interrupts with that DUT have been toggling? I am asking this because I met gpio hardware issue that would cause gpio interrupt missing or invalid gpio interrupts when gpio is connecting on two different boards. > >François > > >> Hongzhan Chen >> >> >I wonder where that might be coming from. >> > >> >Any idea ? >> > >> >thanks in advance >> > >> >François > > >
