I have a mc9s12XDP512 Board where in AC Fails or anyone Tampers NMI is generated which is given to XIRQ Pin of the XDP512 Controller. I am supplying the High to Low going pulse to XIRQ Pin and indicated the PORT Toggle in the NMI routine. After Successive Operations of the Port Toggle when AC Fails signal given to NMI(XIRQ) Pin the system fails to generate Toggle of Port Pin. That is the Port goes into Tristate. As we want to store important Data like NV Eeprom write during AC fail which is not repeating. I am facing the problem of Data corrupting at next power on sequence which is not acceptable. I need the NMI to behave in the same manner for any no of iteration of AC fail. Pls do the needfull in answering the query asap.