Paul Robinson

Problem with KBI on MC13213

Discussion created by Paul Robinson on Oct 5, 2006
Latest reply on Oct 9, 2006 by Paul Robinson
I am using the MC13213 (based on the gt60) and am having a problem using the KBI.  I am using 2 encoders connected to PTA4-7.  I set them up as follows
 
KBI1PE = 0xf0;  // enable PTA4-7 as interrupts
KBI1SC_KBACK = 1;  // clear ack
KBI1SC_KBIE = 1;   // enable interrupts
 
Both encoders will generate interrupts but PTA6 and PTA7 will not generate an interrupt if PTA4 or PTA5 is 0 on startup.  Once one of them has generated an interrupt 6 and 7 always can regardless of the state of the other 2 pins.  Also, if the 4 and 5 are 1 on startup then they do not need to generate an interrupt before 6 and 7 can.  I can not see any reason for this behaviour and I do not change the KBI registers anywhere else in the code.

Outcomes