AnsweredAssumed Answered

PT60 WDOG in emulation CW

Question asked by Stefano De Blasiis on Jan 31, 2014
Latest reply on Feb 11, 2014 by LARRY MITSCHKE

Dear all, I have a MC9S08PT60, I develop the application with CodeWarrior Development Studio Version: 10.3 and USB Multilink.


feed_watchdog: MACRO

            LDHX #-23038      ;first part of reset sequence (0xA602U)

            STHX WDOG_CNT

            LDHX #-19328      ;second part of reset sequence (0xB480U)

            STHX WDOG_CNT

 

          ENDM


I have inizialized the WDOG with:

ldhx    #$C520          
sthx    WDOG_CNT        
ldhx    #$D928          
sthx    WDOG_CNT        
movx    #$04, WDOG_TOVAL
movx    #$00, WDOG_CS2  
movx    #$80, WDOG_CS1  

cli


mainLoop:

nop

feed_watchdog

bra     mainLoop

 

The problem is when I Suspend the excution and go by step, when execute the sthx WDOG_Cnt instruction the execution goes at random address !!

 

 

After the next 2 step:

 

 

How can i solve this problem ?

 

Thanks

 

Stefano

Outcomes