Gunde Nilsson

Watchdog vector issues

Discussion created by Gunde Nilsson on Aug 12, 2011
Latest reply on Aug 15, 2011 by Gunde Nilsson

Hi all :smileyhappy:


i´m working with MC9S12A256 and i´m trying to resolv a problem with the controller.

To do that i have started the watchdog and configured the vector to jump to a routine there i want to save the contents pushed to stack just as the controller jumps to that vector.


I have tryed many ways as: 


movb 0,sp,SaveCCR          (SaveCCR is a ram location)

ld a,0,sp   

staa SaveCCR


But whatever i do it frezees the controller and i can just start it with a hardware reset.


This problem just occur if i try to use any fatches to ram.


If i do like this: (nothing i can use to solve my problem)


movb #10,SaveCCR


It works just fine.


Anyone having any idea what it can be?


I want to have a copy of the value of some ram locations but this doesnt seemes to be possible. Have tryed many different approaches.


Best regards. Gunde