Filippo Damiani

MC13213 : Problem using KBI interrupt

Discussion created by Filippo Damiani on Feb 19, 2008
Latest reply on Feb 20, 2008 by Jim Donelson
I'm trying to use keyboard interrupt without success. I must count a number of pulse on PTA7 pin using interrupt routine.

This is my simply code:
KBI_Init(){  KBISC = 0x02;  // Interrupt enable, KBEDG7 falling edges  KBIPE = 0x80;  // Pin 7 enable}__interrupt void PulseDetected(){  KBISC = 0x04; // Interrupt disable, KBACK = 1  pulse++;  KBISC = 0x02; // re-enable interrupt}

 My problem is that after first interrupt the micro can't trigger another edge and don't call the interrupt routine anymore...
Anyone can help me?