I need to detect a falling edge on a GPIO input, then change the same GPIO into an output and drive it high. This needs to happen within 0.1ms.
How can I ensure a fast reaction time? Most interrupt examples use a queue, but I am worried that this will introduce too much latency. Is there any problem with doing all of this in the ISR? Or do I have to use a queue?
React to GPIO fast: ISR or queue?
-
- Posts: 131
- Joined: Tue May 17, 2016 8:12 pm
Re: React to GPIO fast: ISR or queue?
I suggest having a setup routine that sets the gpio as input and adds it as isr int. Call it from within the ISR after setting it for output. I presume you are not making a delay within, just gpio_ser_level(pin,1) and then gpio_set_level(pin,0) basically a pulse.
Who is online
Users browsing this forum: Baidu [Spider] and 338 guests