Aaron,
The bottom line is that you are going to have to rewrite your code.
The only way to get the part to FREEZE is get into the BDM mode. Well, once the part is in FREEZE, the CPU doesn't execute any instructions. So, something external has to issue instructions to the BDM port to get the processor to do stuff.
You can get into the TEST mode but it is really tricky and it basically disables all the safety features, such as not being able to turn the watchdog off.
Here is something you might think about. Use the Watchdog to deliberately cause a Watchdog Reset. In your RESET routine, check the source of the RESET in the Reset Status Register. If it is a Hardware or POR reset, do one thing, and if it is a Watchdog Reset, do something else, i.e., boot up the part a certain way but do not write to the CPR bits.
HERE IS ANOTHER IDEA
The GPT has prescaler bits inside the module. Can you fool around with these bits instead? These can be changed at any time and give you a very wide range of prescaler values for the GPT.
Regards,
Charlie
Show quoted textHide quoted text
-----Original Message-----
From: Aaron J. Grier [mailto:aaron@...]
Sent: Monday, April 28, 2003 10:49 PM
To: 68300@yahoogroups.com
Subject: [68300] GPT and CPR bits
hi Charlie and gang...
I have a 68331 target and am in a quandary. I'd like to be able to
re-set the CPR bits of the GPT a second time.
section 7.7 of the 68331 manual states:
[...] The PPR bits can be written at any time but the
CPR bits can only be written once after reset unless the
GPT is in test or freeze mode.
I had a definite head-slapping moment a few minutes ago after reading
this. it explains why my software runs fine out of RAM but not from
ROM, where it is being called through a bootloader which is setting the
CPR bits, thus preventing me from resetting them.
freeze mode is externally-generated (right?), so it doesn't appear to be
an option, but I don't have any documentation on test mode.
as a last resort, I think I could bully my co-worker into changing his
bootloader code, but it would be nice if there's a simple fix so the two
software pieces could remain somewhat independent.
any suggestions?
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron@...
Yahoo! Groups Sponsor
<http://us.adserver.yahoo.com/l?M=232617.3212172.4524785.2595810/D=egroupmail/S=:HM/A=1555962/rand=175667574>
---------------------------------------------------
To unsubscribe from this group, send an email to:
68300-unsubscribe@yahoogroups.com
To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu <http://www.motorola.com/mcu>
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]