AnsweredAssumed Answered

9S08QE8 - 6 lines of code runs in FLASH but not in RAM

Question asked by Dennis Laczny on Oct 21, 2010
Latest reply on Oct 25, 2010 by Dennis Laczny

Checking high FLASH registers in a 9S08QE8 works when code is executed in FALSH butcannot gain access to the registers when the same code is in RAM.  Anybody have any ideas?

 

Try these six lines of machine code in FLASH, then try it executed from RAM::

 

         ORG  ROMStart (for FLASH)  ORG RAMStart (for RAM)

         LDA   #$09

         STA  FCDIV

LP    LDA  FCDIV

         BPL  LP

LP2  JMP  LP2

 

I use CodeWarrior v6.3 and load the code into the QE8.  Run in FLASH and LP@ is were it ends up.  Run in RAM and the code loops at LP since it cannot read FCDIV from FLASH.  Is there something I should check?

Outcomes