This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP432P401R: input Recorder

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hi there, 

I am trying to record the input value into an array for a time period, and this is my following code,

#include <ti/devices/msp432p4xx/driverlib/driverlib.h>

/* Standard Includes */
#include <stdint.h>
#include <stdbool.h>

int count = 0;
double array[100000];

int main(void)
{
/* Halting the Watchdog */
MAP_WDT_A_holdTimer();

//![Simple CS Config]
/* Configuring pins for peripheral/crystal usage and LED for output */
MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(
GPIO_PORT_PJ,
GPIO_PIN3 | GPIO_PIN2,
GPIO_PRIMARY_MODULE_FUNCTION);
MAP_GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN1);
MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P1, GPIO_PIN1,
GPIO_HIGH_TO_LOW_TRANSITION);

/* Just in case the user wants to use the getACLK, getMCLK, etc. functions,
* let's set the clock frequency in the code.
*/
CS_setExternalClockSourceFrequency(32000, 48000000);

/* Starting HFXT in non-bypass mode without a timeout. Before we start
* we have to change VCORE to 1 to support the 48MHz frequency */
MAP_PCM_setCoreVoltageLevel(PCM_VCORE1);
MAP_FlashCtl_setWaitState(FLASH_BANK0, 1);
MAP_FlashCtl_setWaitState(FLASH_BANK1, 1);
CS_startHFXT(false);

/* Initializing MCLK to HFXT (effectively 48MHz) */
MAP_CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
//![Simple CS Config]

/* Configuring SysTick to trigger at 12000000 (MCLK is 48MHz so this will
* make it toggle every 0.025s) */
MAP_SysTick_enableModule();
MAP_SysTick_setPeriod(1200000);
MAP_Interrupt_enableSleepOnIsrExit();
MAP_SysTick_enableInterrupt();

/* Enabling MASTER interrupts */
MAP_Interrupt_enableMaster();

while (count<10000)
{
if (MAP_GPIO_getInputPinValue(GPIO_PORT_P1,
GPIO_PIN1)==GPIO_INPUT_PIN_HIGH)
{
array[count] = 1;
}
else
{
array[count] = 0;
}
}
}

void SysTick_Handler(void)
{

count++;

}

However when I tried to run the code I encountered the following error when debugging. I think it has somehting to do with MAP_GPIO_getInputPinValue(GPIO_PORT_P1,
GPIO_PIN1)==GPIO_INPUT_PIN_HIGH

"../msp432p401r.cmd", line 125: error #10099-D: program will not fit into available memory. run placement with alignment fails for section ".bss" size 0xc3508 . Available memory ranges:
SRAM_DATA size: 0x10000 unused: 0x10000 max hole: 0x10000
error #10010: errors encountered during linking; "Beta_Test.out" not built

>> Compilation failure
makefile:151: recipe for target 'Beta_Test.out' failed
gmake[1]: *** [Beta_Test.out] Error 1
makefile:147: recipe for target 'all' failed
gmake: *** [all] Error 2