I am coding a simple game and trying to test it on the MSP430F5529 microcontroller. The problem I encountered is related to the watchdog timer.
The code I wrote calls the reset device, which indicates a watchdog problem. I assume that I need to stop it before the first line of my main code, a kind of pre-initialization code. Am I on the right track, saying that or could there be a problem in other sections of the code?
To make this clearer, my main code is as follows (in simple form):
- Stop watchdog.
- Board initialization (GPIO pins).
- Set the Vcore voltage for the CPU.
- Install a control crystal (XTAL).
- Set the system clock.
- Enable interrupts (globally).
- Real-time clock (RTC) setting.
- Set up the LCD.
- Button initialization.
- Wait in the appropriate LPM mode for user input.
As far as I know, this code sequence should be correct.
source
share