Bert Gerlach

interrupt problem MC9S08DZ60

Discussion created by Bert Gerlach on Mar 23, 2017
Latest reply on Mar 31, 2017 by Michael Fugere

Hello guys,

maybe I'm missing something but I ran into the following problem with port-interrupts:

 

A: WORKING FINE:

PTASC_PTAIE=0; //disable int by clearing PTxIE
PTASC_PTAMOD=0; //port detects edges only
PTAES_PTAES6=1; //rising edge
PTAPS_PTAPS6=1; //Enable interrupt pin
PTASC_PTAACK=1; //Clear the interrupt flag
PTASC_PTAIE=1; //Enable interrupts


B: WORKING FINE:

PTASC_PTAIE=0; //disable int by clearing PTxIE
PTASC_PTAMOD=0; //port detects edges only
PTAES_PTAES7=1; //rising edge
PTAPS_PTAPS7=1; //Enable interrupt pin
PTASC_PTAACK=1; //Clear the interrupt flag
PTASC_PTAIE=1; //Enable interrupts


C: NOT WORKING! -> only PTA7 gets triggered!?

PTASC_PTAIE=0; //disable int by clearing PTxIE
PTASC_PTAMOD=0; //port detects edges only
PTAES_PTAES6=1; //rising edge
PTAES_PTAES7=1; //rising edge
PTAPS_PTAPS6=1; //Enable interrupt pin
PTAPS_PTAPS7=1; //Enable interrupt pin
PTASC_PTAACK=1; //Clear the interrupt flag
PTASC_PTAIE=1; //Enable interrupts

 

Does anybody know why in version C: the PTA6 does not trigger the interrupt anymore like it did in version A: ?

 

Thanks in advance for any hint or help!
Greets,
Sundiver

Outcomes