I'm trying to generate a power-up clear (PUC) on my MSP430F149 from software, and to do so without setting the WDTIFG bit in IFG1. That last piece is important because I'd like use WDTIFG to distinguish between watchdog-generated and software-generated PUCs. I had hoped to accomplish this with an FCTLx security key violation, but I've found that this action always sets WDTIFG in addition to KEYV in FCTL3. (SLAU049D does not mention this behavior.) I can work around this by testing both WDTIFG and KEYV, but I find this solution to be rather unsatisfying. Does anyone know if there's a way to generate my PUC without setting WDTIFG? Noah
Software-generated power-up clear without setting WDTIFG
Started by ●June 3, 2004
Reply by ●June 3, 20042004-06-03
Set a flag in RAM to a special value indicating you are doing a forced WDT reset. Check it and the WDTIFG at powerup, then immediatly clear the flag. -Bill Knight R O SoftWare On Thu, 03 Jun 2004 19:33:35 -0000, Noah Treuhaft wrote: >I'm trying to generate a power-up clear (PUC) on my MSP430F149 from >software, and to do so without setting the WDTIFG bit in IFG1. That >last piece is important because I'd like use WDTIFG to distinguish >between watchdog-generated and software-generated PUCs. >I had hoped to accomplish this with an FCTLx security key violation, >but I've found that this action always sets WDTIFG in addition to KEYV >in FCTL3. (SLAU049D does not mention this behavior.) I can work >around this by testing both WDTIFG and KEYV, but I find this solution >to be rather unsatisfying. >Does anyone know if there's a way to generate my PUC without setting >WDTIFG? >Noah
Reply by ●June 3, 20042004-06-03
In one of my designs I used this... WDTCTL = 0xFFFF As per the User Guide... A system reset (PUC) is generated if any value other then 05Ah is written to the high byte of address 0120h. ----- Original Message ----- From: Noah Treuhaft To: msp430@msp4... Sent: Thursday, June 03, 2004 3:33 PM Subject: [msp430] Software-generated power-up clear without setting WDTIFG I'm trying to generate a power-up clear (PUC) on my MSP430F149 from software, and to do so without setting the WDTIFG bit in IFG1. That last piece is important because I'd like use WDTIFG to distinguish between watchdog-generated and software-generated PUCs. I had hoped to accomplish this with an FCTLx security key violation, but I've found that this action always sets WDTIFG in addition to KEYV in FCTL3. (SLAU049D does not mention this behavior.) I can work around this by testing both WDTIFG and KEYV, but I find this solution to be rather unsatisfying. Does anyone know if there's a way to generate my PUC without setting WDTIFG? Noah . ------ .