BBB GPIO disable interrupt bug

Federico Garcia Cruz federico.garciacruz at
Thu Dec 10 15:29:36 UTC 2015

I'm still working with the latest version of RTEMS in a BBB. I was testing
gpio interrupts and I found that "rtems_gpio_bsp_disable_interrupt" is not
working fine. When this function is called, disables not just the specific
pin interrupt but all the pins interrupts. The problem is that this
function uses mmio_set which does something like:
so that it is clearing all the enalbed bank interrupts.
I've changed mmio_set for mmio_write and it's working fine. Here's the

diff --git a/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
index bd26051..5990211 100644
--- a/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
+++ b/c/src/lib/libbsp/arm/beagle/gpio/bbb-gpio.c
@@ -360,7 +369,7 @@ rtems_status_code rtems_gpio_bsp_disable_interrupt(
   rtems_gpio_interrupt interrupt
 ) {
   /* Clear IRQ generation for the specific pin */
-  mmio_set(bbb_reg(bank, AM335X_GPIO_IRQSTATUS_CLR_0), BIT(pin));
+  mmio_write(bbb_reg(bank, AM335X_GPIO_IRQSTATUS_CLR_0), BIT(pin));

   switch ( interrupt ) {
     case FALLING_EDGE:



Federico Garcia Cruz

Software Engineer

San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina

Phone: +54 351 4217888 / +54 351 4218211

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list