Regarding the XIRQ Behaviour in mc9s12XDP512 Controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Regarding the XIRQ Behaviour in mc9s12XDP512 Controller

1,066 Views
kp2309
Contributor I
Hello Everyone,
 
         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.
 
Regards,
Naveen Richard.
Labels (1)
0 Kudos
1 Reply

331 Views
kef
Specialist I
Did you enable XIRQ? (X-interrupt mask bit in CPU status register). Also is XIRQ vector set up properly?
 
It's not clear, did you set up your Port Pin direction before AC failure, and Pin gets tristate on AC failure? Or maybe your XIRQ ISR is supposed to set up pin direction and then toggle the pin?
 
In your XIRQ routine, do you write your NV stuff and exit, or do you write and start looping forever in XIRQ ISR? If you exit, then CPU will reenter ISR and process will continue until reset or until XIRQ is high again. Data could get corrupted if reset happens in the middle of write.
0 Kudos