I recently completed RTOS course based on MSP432 Red Launchpad. I also came across the driver library (drivelib) for the MSP432 launchpad and I wanted to use it in my existing projects. But whenever I include any driver library functions to my existing project, the code does not run. When I tried to debug, the control is stuck at the Reset_Handler of the startup_msp432p401r_uvision.sfile. Whenever I comment out the driver library functions such as MAP_WDT_A_holdTimer(), the code runs fine. Here's my main function:
int main(void){
OS_Init();
UART0_Init();
OutValue("\n\rPWM Dutycycle =",0);
/* Halting the watchdog */
// MAP_WDT_A_holdTimer();
/* Configuring GPIO2.4 | GPIO2.5 as peripheral output for PWM and P1.4 | P1.1 for button
* interrupt */
// MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN4,
// GPIO_PRIMARY_MODULE_FUNCTION);
// P2SEL0 |= 0x10;
// P1SEL1 &= ~0x10; // configure P2.4 as primary module function
// /* Configuring Timer_A to have a period of approximately 500ms and
// * an initial duty cycle of 10% of that (3200 ticks) */
// MAP_Timer_A_generatePWM(TIMER_A0_BASE, &pwmConfig1);
return 0;
}
Whenever I uncomment any MAP_ functions which are the driver library functions, the code gets stuck:
I have also attached my project folder if anyone wants to try out.6433.Timer_A_with_Lab6.zip
