I am coding a simple game and trying to test it on an MSP430F5529 microcontroller. The problem I have encountered is relating to the watchdog timer.
The code I have written causes a device reset, which is an indication of a watchdog timer issue. I assume I need to stop it even before the first line of my main code, some sort of pre-initialisation code. Am I on the right track by sayin that or may the problem lie some other sections of the code as well?
To make it more clear, my main code is as follows (in simple form):
- Stop the watchdog timer.
- Initialize the board (GPIO pins).
- Set up the Vcore voltage for CPU.
- Set up the reference crystal (XTAL).
- Set up the system clock.
- Enable interrupts (globally).
- Set up real time clock (RTC).
- Set up LCD display.
- Initialize the buttons.
- Wait in an appropriate LPM mode for the user input.
As far as I am concerned, this sequence of code should be right.