Program that talks via monitor port in RAM doesn't work right running in flash

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

Program that talks via monitor port in RAM doesn't work right running in flash

Jump to solution
489 Views
PabloMac
Contributor II

I just designed a new board around the MC908GZ60CFUE and am talking through the debug port via a program I wrote and downloaded to RAM. The program turns three LEDs on and off via single key commands. I then altered the program so I can burn it into flash and run it that way. There are only two differences between the programs. The RAM version is loaded to starting location $0580 while the flash version is loaded to flash location $8000 plus I am adding this address to the reset vector at $FFFE. Also I am setting IRQ to Vtst for the RAM version vs. Vdd for the flash version for power on reset. I am using an 8MHz crystal and pin inputs are (PTA0=1,TPA1=0,TPB0=1,PTB1=0,PTB4=1) which makes it configure the monitor to generate a 7200 BAUD rate from the 8MHz clock (not divided by 2) for the debug port. When I power up, the Green LED goes on briefly (biased on by a resistor) then it turns off via initialization code like it is supposed to so I know that code is running. However, I can't talk to the debug port any more. I suspect that the monitor does something to configure the PLL which sets the bus clock frequency that my code is not doing. Can anyone tell me what I am missing?

 

Thanks.

Labels (1)
0 Kudos
1 Solution
308 Views
PabloMac
Contributor II

It turns out that the problem was with my programming tools and not the microcontroller.

View solution in original post

0 Kudos
2 Replies
307 Views
PabloMac
Contributor II

I just wrote another simpler program that blinks the LED and outputs the ASCII 'U' via the debug port. It has a delay loop between every LED blink and output of the 'U' character. This program is working. In this program I only wrote the one reset vector at $FFFE. For the other program that is not working, I had written all from $FFCC to the end.

0 Kudos
309 Views
PabloMac
Contributor II

It turns out that the problem was with my programming tools and not the microcontroller.

0 Kudos