# Interrupt on the XMEGA

I have 3 buttons connected to PIN1, PIN3, PIN5 of PORTA of an XMEGA. If pushed they deliver a falling edge. I'm try to generate interrupt using those buttons, I started with one, here is what I have done:

void buttonINT(){
// PORTA
PORTA.PIN1CTRL = PORT_OPC_PULLUP_gc | PORT_ISC_FALLING_gc;
PORTA.INTCTRL = PORT_INT0LVL0_bm;
PMIC.CTRL = PMIC_LOLVLEN_bm;
sei();
}
ISR(PORTA_INT0_vect){
printf(" INTERRUPT \n");
}


in the main I call buttonINT() once , but I get the message all time printed?

Any idea what I'm doing wrong here?

PORTA.INT0FLAGS = PIN1_bm;