Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/12/03 20:03
Read: times


 
#52502 - RE: Danger with NoTouch?
Responding to: ???'s previous message
An old thread, but I thought I'd update on my solution.

My concern arose from the eratta on the new Rx2/01 parts that might not want to enter boot mode when the PSEN line is help low at power up.

So I tied a port pin to PSEN so I could check it.

I incorporated code that watched a port pin immediately after boot-up, and if the pin was held low the software invoked the bootloader.

The Status vector was not affected, and if Flashmagic was not used the part would resume normal operation upon next reset.

Code below

void CheckBoot(void) //cannot call from within an interrupt.
{// if ForceBoot pin is low the the outside world is requesting boot mode

if(ForceBoot_pin == 0) // if boot is really desired.
{
// set system up for reboot
ResetDetect = 0;
WD_Detected = 0;
WD_TripCount = 0;
IE = 0;
P0 = P1 = P2 = P3 = 0xff; // ports
CCON = CMOD = CCAPM0 = CCAPM1 = CCAPM2 = CCAPM3 = CCAPM4 = 0x00; //
CL = CCAP0L = CCAP1L = CCAP2L = CCAP3L = CCAP4L = 0x00;
CH = CCAP0H = CCAP1H = CCAP2H = CCAP3H = CCAP4H = 0x00;
CKCON = 0x00;
AUXR = 0x08;
TCON = 0x00;
TMOD = 0x00;
TH1 = TH0 = TL1 = TL0 = 0x00;
T2MOD = 0x00;
T2CON = 0x00;
RCAP2L = RCAP2H = TL2 = TH2 = 0x00;
SADEN = SADDR = 0x00;
SCON = 0x00;
PCON = 0x10;
AUXR1 = 0x20;
IP = IPH = 0x00;
DPL = DPH = 0x00;
B = ACC = 0x00;
SP = 0x07;
((void (code *) (void)) 0xfc00) (); // force jump to boot code
}
}

Thanks guys!

Bob

List of 13 messages in thread
TopicAuthorDate
Danger with NoTouch?            01/01/70 00:00      
   RE: Danger with NoTouch?            01/01/70 00:00      
      RE: Danger with NoTouch?            01/01/70 00:00      
   RE: Danger with NoTouch?            01/01/70 00:00      
      RE: Danger with NoTouch?            01/01/70 00:00      
         RE: Danger with NoTouch?            01/01/70 00:00      
      RE: Danger with NoTouch?            01/01/70 00:00      
         RE: Danger with NoTouch?            01/01/70 00:00      
            RE: Danger with NoTouch?            01/01/70 00:00      
               RE: Danger with NoTouch?            01/01/70 00:00      
                  RE: Danger with NoTouch?            01/01/70 00:00      
                     RE: Danger with NoTouch?            01/01/70 00:00      
                     RE: Danger with NoTouch?            01/01/70 00:00      

Back to Subject List