Part Number: MSP432P401R
Other Parts Discussed in Thread: MSP432WARE, MSP430FR5994
Tool/software: Code Composer Studio
I am trying to compile an MSP432 program. I have downloaded MSP432Ware and added a link in the Project Properties Include pointing to it
c:\ti\msp\MSPWare_3_50_00_02\driverlib\driverlib\MSP432P4xx
The first errors are in the following module. Note that the first "while" is line 245. I am probably doing something stupid.
void config_CLOCK48MHZ(void) //SMCLK CONFIGURAATION from the Driverlib
{
while ((PCM->CTL1 & PCM_CTL1_PMR_BUSY)) (); // Change Vcore to 1 to support 48 MHz
PCM->CTL0 = PCM_CTL0_KEY_VAL | PCM_CTL0_AMR_1; // Transition to VCORE Level 1 from current power state properly
while ((PCM->CTL1 & PCM_CTL1_PMR_BUSY)) ();
MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ,
GPIO_PIN3 | GPIO_PIN4, GPIO_PRIMARY_MODULE_FUNCTION); // Pins for peripheral/crystal usage
// MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0); // need a pin to observe mclk??
CS_setExternalClockSourceFrequency(32000, 48000000);
// MAP_PCM_setCoreVoltageLevel(PCM_VCORE1); // VCORE to 1 to support the 48 MHz frequency
MAP_FlashCtl_setWaitState(FLASH_BANK0, 1); // may need fewer wait states with more recent silicon.. check
MAP_FlashCtl_setWaitState(FLASH_BANK1, 1);
CS_startHFXT(false); // Starting HFXT in non-bypass mode without a timeout
MAP_CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1); // Initializing MCLK to HFXT (effectively 48MHz)
MAP_CS_initClockSignal(CS_SMCLK,CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_4); // 12MHz
}
with the following errors:
>> Compilation failure
subdir_rules.mk:9: recipe for target 'main.obj' failed
"../main.c", line 245: error #29: expected an expression
"../main.c", line 247: remark #1528-D: (ULP 3.1) Detected flag polling using PCM_CTL1_PMR_BUSY. Recommend using an interrupt combined with enter LPMx and ISR
"../main.c", line 247: error #29: expected an expression
"../main.c", line 248: warning #225-D: function "MAP_GPIO_setAsPeripheralModuleFunctionOutputPin" declared implicitly
and more errors in later modules.
Since I am new to MSP432 driverlib, I don't know what expression is missing from line 245. Also, I guess that I need to do something more to make "MAP_" work correctly.