Part Number: MSP-EXP432E401Y
Tool/software: Code Composer Studio
Hi. I am beginning to learn how to program MSP432 MCU and I'm facing an issue with a simple code that I made.
#include "msp.h"
#define Peripheral_BASE ((uint32_t)0x40000000) //Peripherals start address
#define WDT_A_BASE (Peripheral_BASE + 0x00004800) //Base address for Watchdog
typedef struct {
uint16_t RESERVED0[6];
uint16_t CTL;
}WDT_A_Type;
#define WDT_A ((WDT_A_Type *)WDT_A_BASE)
int main(void)
{
WDT_A->CTL = 0x5A00 | 0x0080; // Stop watchdog
char c[] = 'Hello World';
int i = 0;
return 0;
}
I don't know why but always the code ended up in the default_handler function. I don't know if I disable properly the WDT (but what I read from the document I think this is the way) or it is something else that I;m doing wrong.