'RS08 Full-chip simulation of a "wait" opcode

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

'RS08 Full-chip simulation of a "wait" opcode

1,604 Views
Curt
Contributor IV
I've seen several statements here and in the 'RS08 app. notes to the effect that a given program can't be simulated because it uses "wait."  Can anyone point me to a reference that explains this in more detail?  I've searched the forums and literature on this to no avail.
 
My own program uses RTI to wake a simulated RS08 from "wait".   The memory dump shows that the RTI interrupt is being asserted (SIP1 = $02) as expected -- but this has no effect on the PC, which remains hung at the "wait" instruction.
 
Sorry in advance for asking a question that has no doubt been raised before...
 
Regards,
Curt
Labels (1)
0 Kudos
3 Replies

310 Views
joerg
Contributor II
Hi Curt

The problem with the WAIT instruction is depending on the MPU you are using. I.e. for the RS08KA2 it does not work, as the simulator does not simulate the WAIT instruction for GBxx devices. But for the QD4 this instruction is implemented. So the problem is a P&E problem and they should resolve it by June in CW 6xx (at least i was told so!). I will be surprised if the really fix all the missing functions (like the OC interrupt not working with the HCS08 devices). So if you will debug your code try it with the hardware!! It works better this way (even if i like to simulate my work first!!).

Saluti Joerg
0 Kudos

310 Views
Curt
Contributor IV
Thanks joerg.  When you run into something like this with an unfamiliar product, you're always left wondering if you've missed something in the data sheet, or don't understand some aspect of using the simulator, or that maybe you don't have all the needed patches that have been introduced...:smileysad:
 
I think the support tools manager at Freescale is in over his/her head, and sure don't envy the job.  Wonder how many different product/dev. tool configurations they're trying to support, all told?  It must be a big number -- and it sure looks like they've lost control of it all.  No wonder, either.
 
Anyway...  thanks again for confirming the problem.  (I like the simulator -- great tool for learning a new instruction set!)
 
Regards,
Curt
0 Kudos

310 Views
OscarPerezTuta
Contributor I

I have the same problem. I'm trying to debug a blinking led program on PTA0. I'm using USBSPYDER  on RS08 KA4 and KA8 and I'm  stuck in the WAIT instruction. I don't know how to solve the problem with this microcontroller.
 

            INCLUDE 'derivative.inc'

            XDEF _Startup
            ABSENTRY _Startup

            ORG    RAMStart

            ORG    ROMStart

_Startup:   mov   #HIGH_6_13(SOPT), PAGESEL
            bclr  SOPT_COPE,MAP_ADDR_6(SOPT)
            mov   #HIGH_6_13(PTADD), PAGESEL
            mov   #$01,MAP_ADDR_6(PTADS)
            mov   #$01,MAP_ADDR_6(PTADD)
            mov   #$77,MAP_ADDR_6(SRTISC)
            mov   #HIGH_6_13(PTAD), PAGESEL
            mov   #$01,MAP_ADDR_6(PTAD)
            
mainLoop:   wait          ; maybe forever
        
   mov    #HIGH_6_13(PTAD), PAGESEL
            lda    MAP_ADDR_6(PTAD)
            eor    #$01
            sta    MAP_ADDR_6(PTAD)
            mov    #HIGH_6_13(SRTISC), PAGESEL
            bset   SRTISC_RTIACK,MAP_ADDR_6(SRTISC)
            bra    mainLoop

            ORG   $3FFD

            JMP _Startup          ; Reset
0 Kudos