AnsweredAssumed Answered

BF538F EZ KIT Pin Change Interrupt

Question asked by theaman24 on Aug 23, 2011
Latest reply on Sep 13, 2011 by theaman24

Hi,

I'm using the BF538FEZKIT and want to generate an interrupt when port F pin 0 is high.  I'm using the following configurations for port F:

 

*pPORTFIO_DIR = 0xFFFE; //sets PF0 as input
*pPORTFIO_INEN = 0x0001; //input enable set for PF0
*pPORTFIO_POLAR = 0x0000; //sets PF inputs to active high/rising edge
*pPORTFIO_EDGE = 0x0000; //sets PF inputs to level sensitive (not edge)
*pPORTFIO_BOTH = 0x0000; //sets edge sensitive inputs to single edge
*pPORTFIO_MASKA = 0x0001; //enables interrupt mask for PF0
*pPORTFIO_MASKA_SET = 0x0001; //sets interrupt mask for PF0

 

This should cause GPIO interrupt A to trigger when PF0 is high, correct?  But what happens when that interrupt is triggered?  How do i change the interrupt service routine- say for instance i want to toggle an LED whenever PF0 goes high?

 

Are GPIO interrupts (global interrupts?) enabled by default, or do I have to set them first somehow?

 

I dont have a good understanding of how interrupts work.  Thanks!

Outcomes