I'm developing an RTOS application that triggers on a GPIO interrupt. I'm working with a custom board which is based on the XCORE.AI Explorer Board.
My application follows this basic example:
https://github.com/xmos/xcore_iot/blob/ ... pio_ctrl.c
I enable the GPIO port, set the callback and enable the interrupt. The ISR then notifies my main loop. Just like in the example above.
The problem I am having is that the interrupt triggers on both rising and falling edge. I want it to trigger only on the rising edge.
I had a look at the GPIO RTOS driver and it should only trigger on rising edge (assuming the GPIO is 0 during configuration):
rtos_gpio.c, line 147-149
Code: Select all
value = port_peek(p);
port_set_trigger_in_not_equal(p, value);
triggerable_enable_trigger(p);
(PS: Simply checking the GPIO state in the ISR is one way to do this, but I'd like to prevent the ISR calls on falling edge altogether)
Thanks
Alex