I download the latest version of nhs3100 SDK, and download the tlogger project to my demo board with nothing changed .
Memory region Used Size Region Size %age Used
Flash30: 15564 B 30 KB 50.66%
SRAM8: 2980 B 8176 B 36.45%
After download the program ,there are only 15156 bytes left for data storage .with these memory ,there are only 82464 temperature data can store .
If I set the meameasurement interval 1 second , with these left storage ,3100 just can work one day .
so ,I want to know ,is there any methods to simplify the tlogger project ?
I need more memory left after download the program .
who can help me ?
tks
mostly, temperature changes slowly. so you can just record the difference of samples.
eg. 1st sample = 0x1234, 2nd sample =0x1298, 3rd = 0x1350, you can record as
0x1234,
0x1298-0x1234, (1 byte)
0x1350-0x1298, (1 byte)
Hi,
I'm unsure how to reach to that 82464 number. It also sounds already quite high. What's your target?
You can store more measurement data by removing code:
Or by more agressive compiling:
Or by optimizing your compression:
Good luck,
Best regards,
Dries.
Thanks ,
I use the SDK project ,and let the 3100 work until storage is full ,and get 82464 temperature .
My boss order me to simplify the project as possible as I can !
I have read your answer ,it is so useful to me .
One more question ,
1、if I set 8 bits per sample ,how can I store one temperature more than 256?
2、how to turned on Link-time optimization ?can you describe more detail about this agressive compiling?
Hi,
This can be done when taking your use case specifications into account.
For example, your use case envisions temperatures between -17°C up to 50°C, and requires a resolution of 0.5°C for freezing temperatures, and 1°C for positive temperatures.
So your full temperature range is then, say, [-20°C, 55°C].
This gives a total of 96 different values. Every temperature value you measure can thus be mapped to an integer value between 0 and 95. This requires 7 bits for storage. You still have some integers left to indicate extreme temperatures that are not covered by your full use case-specific temperature range.
The code can be adapted to follow this sequence:
Another option is to store the difference between successive temperatures only. Depending on your thermal resistance, you can check what the maximum possible temperature change is between two measurements. Perhaps this is only 10 degrees. Then you need to find a system that can store full temperatures once in a while, and store differences most of the time.
Last, a word of caution. The compression library used in the demo application will not yield the same compression ratio for all data sets: depending on the temperature changes experienced, the compression may be better - or much worse.
Kind regards,
Dries.