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.
Tool/software: Code Composer Studio
Hello!
I'm writing a firwmware in which I get a lot of measurement data that doesn't fit the RAM. I need to save this data on FRAM for getting it later. It seems to be very simple, but I'm failing.
For what I understood, I can use the vacant memory not used in the memory organization table 6.6 of the microcontroller datasheet. There are 2 vacant memory gaps on the table: 0x1B00-0x1BFF (256 16-bit positions) and 0x2400-0x43FF(8192 16-bit positions). I'm trying to use the biggest one.
I press a button and try to record a number in the position 0x2400 and read it. Below, a part of my code:
unsigned int *address=(unsigned int *)0x2400; // 9216 char buffer[30]; snprintf(buffer, 30, "address = %lu.\r\n", address); transmitUSB(buffer); snprintf(buffer, 30, "*address = %u.\r\n", *address); transmitUSB(buffer); *address=0x0001u; snprintf(buffer, 30, "*address = %d.\r\n", *address); transmitUSB(buffer); snprintf(buffer, 30, "*address = %d.\r\n", *(address++)); transmitUSB(buffer); snprintf(buffer, 30, "*address = %d.\r\n", *(address++)); transmitUSB(buffer);
But the response I get is:
address = 9216.
*address = 16383.
*address = 16383.
*address = 16383.
*address = 16383.
I'm not saving the number, and all the 3 consecutive addresses give the same result.
**Attention** This is a public forum