am335x (beaglebone) problem with interrupt

Skip to first unread message

May 8, 2017, 6:01:02 AM5/8/17
to BeagleBoard
hey everyone,

i hope i post in the right place but if not, please inform me to post it in a more suitable place...
Let me describe my problem..
For my project, i use starterware (version and build my files via code composer studio (version with compiler version:GNU v4.8.4 (Linaro).
My goal is to learn using interrupts. Thus i started with a simple project in mind: by pressing a switch i expect to create an interrupt in an input pin of my beaglebone and via the isr i created, i want to turn off a led that was already on and turn on an other, previously off, led.

The problem seems to be that i can not get an interrupt...
I give you the piece of code responsible for achieving my goal:
IntRegister(SYS_INT_GPIOINT1A, isr_buttonLed);
HWREG(SOC_GPIO_1_REGS + 0x34) = 0x10;
HWREG(SOC_GPIO_1_REGS + 0x38) = 0x10;
HWREG(SOC_GPIO_1_REGS + 0x44) = 0x10;

//------isr function

static void isr_buttonLed(void)
  /*    Clear interrupt      */
  HWREG(SOC_GPIO_1_REGS + 0x2C) = 0x10;
  HWREG(SOC_GPIO_1_REGS + 0x30) = 0x10;
  //turn off led that is already on
  //turn on an other led
  //again enable IRQ
  HWREG(SOC_GPIO_1_REGS + 0x44) = 0x10;//GPIO_IRQWAKEN_0

Unfortunately, nothing happens when i push the switch..can somebody point out to me a possible solution or what is wrong with the above?
Moreover, how can i test if an interrupt is actually triggered or not when i push the switch?

Thanks in advance for any help

Mark Lazarewicz

May 8, 2017, 6:51:59 AM5/8/17
Increment a counter in interupt and print it in background 

For more options, visit
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

May 9, 2017, 10:25:53 AM5/9/17
to BeagleBoard,
firstly thanks for your response, although i was actually more interested in a suggestion of a register, maybe, that could show me the status of the interrupts..meaning if there is a register showing if there is an interrupt produced or not...
To return to the problem, i have tried with a counter in interrupt too, but it doesn't work. I mean it seems like the isr is never taking over and thus none of the "commands" inside the isr are called.
Additionally i would like to add that the pin doesn't seem to have any problem, cause i used the GPIOPinRead function of starterware (which i supposed to return the logic level(value) of the specified gpio pin) and it seems that it works properly.

Update: i also tried to use the starterware's function, GPIOPinIntEnable, cause i thought that it may helps but i have the same results...

The way i think of it, either the interrupt controller is not properly working (but why,what else should i do and how can i find out for sure?) or there are more to be done regarding gpio module when it comes to interrupts (like using GPIOPinIntEnable function, but again is there anyone who knows?).
Last but not least, is there any chance that the problem is created by the linker file used from code composer studio (which is automatically created when the project is created and depends on the compiler to be used)? and if so, can somebody point out to me, what should i check out in the relative linker file?

Thanks again and sorry for the trouble...

Reply all
Reply to author
0 new messages