Hi,
I'm writing code for an MSP430F168.
Are there status bits that can be inspected on start-up to determine why we have reset i.e. POR, BOR, watchdog timeout etc?
Thanks,
Ben
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm writing code for an MSP430F168.
Are there status bits that can be inspected on start-up to determine why we have reset i.e. POR, BOR, watchdog timeout etc?
Thanks,
Ben
Hi Ben,
MSP430 has a POR(Power on Reset) and PUC(Power Up clear) which is mentioned in Chapter-2 of the msp430x1xx user guide. A Watchdog timer does a PUC and it can be detected using the WDTIFG flag in IFG1. This flag is cleared by a POR and not by a PUC(which the Watchdog generates). Therefore after a reset if software finds WDTIFG set it means that watch dog generated the reset. Since BOR does a POR differentiating between the two may not be possible. However MSP430F168 also has supply voltage supervisor which can be used to check the supply. SVS has a flag SVSFG which is reset only by BOR (and not POR or PUC).
Regards,
Praval
**Attention** This is a public forum