Thanks again.
I understand I have given a very short description before.
Now, one more comprehensive.
VECTOR0 #AdressToMain ; Normal starting point
VECTOR2 #AdressToWD_Service ; COP reset entry
WD_Service:
movw #PatternWord1,RamWord1
movw #PatternWord2,RamWord2
; If I put some more instructions as described before here I´t doesn´t´t´t work
bra Main
Something else of my program
Main:
lds #AdressToStackArea
jsr InitSystem InitSystem: Init Watchdog
Init Everything else
as 3 SPI
as 2 SCI
as 1 IIC
as RAM
rts
MainLoop:
Refresh Watchdog
DoEverything else needed to be serviced
bra MainLoop
When I test the COP I have just put a counter inside the main loop and the it reaches 0 I start an infinite bra $ to trigger the COP.
I know that the system gets frozen in 3 ways:
1) I have a LED flashing at 2 Hz. That stops
2) I use one of the SCI;s for getting a "start up"-string and that doesn't get send
3) It doesn't respond to any system codes issued to the SCI
If I, takes away the instructions, mentioned before. I.e. ldaa staa It works just fine
If I jump directly to the WD_Service, without reset it works just fine
If the WD reset ist triggered by the COP it doesn't work, if I have the instructions in it
The main issue right know is to try to understand why this is happening.
We have already distributed around 1250 such systems out in the world, after a testing period (not the COP-reset
) of more then 14 months in 42 installations, and we have just recently run into this problem in some installations in Poland and USA.
Of course, normally the COP shouldn't trigger, but it is anyway a good way to solve a problem at first, during the time it takes to find the real source of the firmware weakness.
Br. Gunde