Greetings.
There has been a problem with some of my processor boards whereby the reset switch doesn't restart the processor.
When it occurs even shorting the DVCC pin to ground fails to restart it.
It is a rare occurrence, and I can't reproduce the problem at will.
I don't reprogram the RESET NMI pin, but leave it at the default setting. (WDTCTL = WDT_ARST_1000)
I attach a schematic showing the processor and supply circuit.
Capacitor C17 with Q11 provide an independent supply of about 2V for the processor while the voltage regulator U6 is switched off.
C17 is a double layer capacitor of 0.5F. If fully discharged it takes about 1 minute to charge up to 1.8V whereupon the processor starts.
Is there anything I am overlooking which might prevent the processor starting?
Is there some condition which would prevent the processor starting even after DVCC has been shorted to ground?
main{ init_io ( VCC_off ); switch_on_5V ( void ); run program... } int switch_on_5V ( void ){ /* Check voltage on reservoir capacitor and switch on when it reaches 1.9V */ int i; while(1){ // Check voltage on reservoir cap. SVSCTL = VLD_1_90V; /* Set SVS with 1.9V threshold */ if (!(SVSCTL & SVSOP)) /* bit SVSOP goes low when voltage exceeds threshold */ break; SVSCTL = SVS_off; // Turn off SVS. _BIS_SR(LPM3_bits + GIE); /* Enter LPM3 */ } SVSCTL = SVS_off; P2OUT |= PWR5V0_ON; // Switch on the processor voltage regulator. return SUCCESS; } void init_io ( int VCC_state ){ if ( VCC_state == VCC_off ){ P1SEL = 0x00; P1REN = 0xFF; // Activate pulldown resistors. P1OUT = 0x06; // Set pullup resistors on inputs 1 and 2. P1DIR = 0x00; P3OUT = 0x00; // Set resistors to pulldown. P3REN = 0xF7; // Activate pulldown resistors, except comparator. P3DIR = 0x00; // Set as inputs. P3SEL = PWR_MON; // Disconnect USART Activate PWR_MON input. P4SEL = 0x00; P4OUT = 0x00; // Set resistors to pulldown. P4REN = 0xFF; // Activate pulldown resistors. P4DIR = 0x00; // Set as inputs. P5SEL = 0x00; // Disconnect SPI. P5OUT = 0x00; // Set resistors to pulldown. P5REN = 0xFF; // Activate pulldown resistors. P5DIR = 0x00; // Set as inputs. P6SEL = 0x00; // Didable ADC. P6OUT = 0x00; // Set resistors to pulldown. P6DIR = 0x00; // Set as inputs. P5REN = 0xFF; // Activate pulldown resistors. P2OUT = 0x00; // This line for board 3.4 P2REN = 0xF7; // P2.3 is battery monitor comparitor. P2DIR = 0x00; // Set as inputs. UCA0CTL1 |= UCSWRST; // Turn off USART0 UCA1CTL1 |= UCSWRST; // Turn off USART0 UCB1CTL1 |= UCSWRST; // Turn off SPI } } void RtcSetup(void) { elapsed = (unsigned long *) malloc(sizeof(unsigned long)); BCSCTL3 = XCAP_3; // Set 12.5 pf capacitors for Xtal TBCTL = TBSSEL_1 + TBCLR; // ACLK, clear TBR TBCCTL0 = CCIE; // TRCCR0 interrupt enabled TBCCR0 = 32767; // TBCTL = TBSSEL_1 + MC_1; // ACLK, upmode _EINT(); } #pragma vector=TIMERB0_VECTOR __interrupt void Timer_B (void){ (*elapsed)++; /* increment the real time clock */ TimeOut--; P5OUT ^= LED; // Toggle LED WDTCTL = WDT_ARST_1000; /* Clear watchdog and set to 1 sec timeout. Resetting watchdog here and just before setting LPM3 again in main() function ensures that watchdog doesn't timeout during sleep mode. */ /* wake up processor once per second to check for wakeup conditions; * LPM3 bits set again in main() loop */ _BIC_SR_IRQ(LPM3_bits); /* Clear LPM3 bits from 0(SR) */ }