I'm trying to determine the reset reason for a MSP430F2618 device, but I'm not getting the results I expect. I'm reading the IFG1 register at the start of `main()` and logging it to flash. My test involves pressing the reset button and doing a power cycle. When pressing reset button the value `10` (0x0A) is logged => RSTIF + OSCFault. When power cycling, the value `11` (0x0B) is logged => RSTIF + OSCFault + WDTIFG. Is that correct? I wouldn't expect the watchdog flag to be set on a power cycle. Should the OSCFault be set? How do I determine a power cycle (cold boot) versus and warm boot (e.g. reset pin asserted, watchdog timeout, illegal instruction, etc) ?? Thanks, Brendan.
↧