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.

MSP-EXP430FR5994: Storing Class Object and its contents in FRAM instead of RAM

Part Number: MSP-EXP430FR5994

Hi,

I have a class called coordinator which has 3 other classes constructed within it. I receive bytes from UART and store it into a vector. I am having a problem with memory allocation because once the size of the vector reaches 256, the capacity is automatically changed to 512 which causes my program to not work due to it exceeding the RAM memory capacity. The incoming packet is roughly 450 bytes so having a capacity of 512 is OK. I want to move the entire object to FRAM and allow it to be read and write to it. I thought using #prama NOINIT would move it however I can see from the memory browser that the vector is still in RAM. My coordinator class contructs the Manager classes which constructs the buffers and vector.

#include "driverlib.h"
#include "setup.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <msp430.h>
#include "rtc_c.h"
#include "Coordinator.h"
#include <vector>

using namespace std;


#pragma PERSISTENT;
Coordinator coordinator = Coordinator();

#pragma NOINIT
Calendar currentTime;

int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop Watchdog
initGPIO(); // Initializes GPIO pins
initClockTo16MHz(); // Initialize Clock
initUART(); // Initializes UART Communication
timerSetup();
rtcSetup(&currentTime);
gpsConfig(&coordinator);

__bis_SR_register(GIE); // interrupts enabled

while (1)
{
coordinator.process(&currentTime); // continuously read parse buffer, once "$" is read starts storing characters in packetbuffer till "/n" character then runs NMEAParse function
coordinator.processQueue(&currentTime);
}
}

class Coordinator
{
public:
Coordinator();
virtual ~Coordinator();

void process(Calendar *currentTime);
void processQueue(Calendar *currentTime);

AresManager aresManager;
GPSManager gpsManager;
ModemManager modemManager;
queue<TransitPacket> coordinatorQueue;

private:

};

#endif /* COORDINATOR_H_ */

 

**Attention** This is a public forum