David Weiszbrod

Moving from ICE to stand alone target problems.

Discussion created by David Weiszbrod on Apr 30, 2007
Latest reply on May 4, 2007 by David Weiszbrod
I am having problems getting the target to run on its own.  My first attempt had the bus speed so slow I thought it had locked up until a couple of minutes later it responded to my previous input.
Back to the FSICEBASE.  The Code Warrior Target Settings were used to get the correct bus speed during emulation but the CGM needed correct setting. The Clock Generator Module was not set up correctly.  I found a procedure error and changed it to try getting the PLL and source selected.  That caused the IIC devices to not work.  Also the PLL LOCK never went true.  I don't know if the CGM is suposed to work within the ICE.
Another related issue is getting the target FLASH erased for loading new a program.  The monitor erase function needs to know the bus speed.  Until I can establish what that is I can't write an erase routine.
I am using the serial connection described in the HC908AP data sheet in the Monitor section.  PROG08AZ program works to program the FLASH but it will not access the monitor if the reset vector is not $FFFF.  There is an on board oscillator (32 kHz)driving the OSC1 pin.  No means to apply Vpp.  I need to be able to have the target program erase FLASH.
I need to get the correct bus speed established.
I need to write an erase routine that looks for a port input upon POR.
Where should I start?  BTW, I program in assembly.  I can usually read C.  Here is my CGM set up.  Do you see a problem?
       CLR  PTCL  PLLON = 0  P = 0  E = 0
       LDA  #$80    AUTO = 1
       STA  PBWC
       LDA  #$F5    N = $00F5
       STA  PMSL
       LDA  #$40     L = $40
       STA  PMRS
       LDA  #$01     R = 1
       STA  PMDS
       LDA  #%00100000  PLLON = 1
       STA  PTCL
       LDA  #%00110000   BCS = 1
       STA  PTCL
Please help.