Thanks Steve,
 Here's the code I use, free as in beer.

void set_hex(){
WDTCTL = WDTPW + WDTHOLD;       // Stop watchdog timer
dint();
FCTL2 = FWKEY + FSSEL_2 + FN2;  // SMCLK/4 for Flash Timing Generator
3.684Mhz clk
FCTL3 = FWKEY;
FCTL1 = FWKEY + WRT;    
hexToBcd[99] = 0x99;            //flash memory position initialized to 0xff
FCTL1 = FWKEY;
FCTL3 = FWKEY + LOCK;
                                // re-enalble WDT?
eint(); 
};

gcc warns about writing to read-only memory, but it does it.

Regards,
  Garst
Steve Underwood wrote:
> 
> Hi Garst,
> 
> Then use a byte in main memory instead of in info memory. That will be
> wiped when you reprogram the code. Sensing in the JTAG connection isn't
> supported, and doesn't seem like much of a solution - your special
> routine would be run repeatedly during debug work.
> 
> Regards,
> Steve
>

Reply via email to