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.
Hi Team,
What can I do to preserve data on FRAM? So that I can read them out when I am debugging the program.
Can you provide some examples and reference docs?
With kind regards,
Gaosheng
You can store any kind of data you want in FRAM any time you want. Just like RAM. Then read it back when you want.
The details are up to you.
An example of what precisely? I have used FRAM for the heap in FreeRTOS and for dictionary space for eForth. Both are examples of very particular needs unlikely to match what you want to do. Which is still a mystery.
Yes. It could be better if you can provide me. Because I have never done that before, I don't know how to do it.
Hello Gaosheng,
The easiest way to do this is the create a large buffer variable and store it in FRAM. Then you can just log your data there, and read it out later.
The simplest way to do this is with #pragma PERSISTENT(). Here is an example variable used for some data logging for a recent project I was working on.
#define PIR_DATALOGGING_LENGTH 1780 #pragma PERSISTENT( PIR_Inst_Detn_th_val ) uint32_t PIR_Inst_Detn_th_val[PIR_DATALOGGING_LENGTH] = {0};
After you build the project, you can find the exact memory location for this buffer in the .map file found in your projects debug folder.
Hope this helps.
JD
Are you trying to read it back out to the PC? Easiest way is to use Uniflash. You will have to specify the start of the buffers in FRAM and the length of data. Then read/export it.
I have read data from memory, but I am not sure which data is FRAM, and which data is RAM/SRAM. Further, I am also not sure of the starting point of the data in the FRAM.
Uniflash is just the program name, but it supports both Flash and FRAM devices.
You need to check the .map file, that you can find in your code composer projects /Debug folder, and find your buffer, and it will tell you the starting address and length. This is how you would find your data.
**Attention** This is a public forum