Get temp values from NHS3100

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get temp values from NHS3100

735 Views
shailavsurve
Contributor II

Hello,

I am using NHS3100 and loading the code app_demo_dp_tlogger. I am using lpc xpresso ide for that. Now the maximum capacity is 4000 samples which are stored in flash of NHS3100. So I dont get the data once the flash gets full. How can I delete the old samples so that I can get some memory for new samples?

I am attaching my code with this.

Thanks,

Shailav

Original Attachment has been moved to: app_demo_dp_tlogger.rar

0 Kudos
2 Replies

465 Views
driesmoors
NXP Employee
NXP Employee

Hello Shailav,

Aside: this looks like code from SDK v9.1. On nxp.com you can now download SDK v10.

You can increase the number of the storage samples by switching to a release build - if you are able to store about 4000 samples it looks like your firmware image is very big, which indicates you are using a debug build.

As IvanRuiz already pointed out: using the storage module will make use of both EEPROM and FLASH. A call to Storage_Write will write too EEPROM, but when that is full (and only then), all data is dumped to FLASH, making room for more samples. A smaller firmware image will thus allow you to write more samples in non-volatile memory.

Note that you can control which amount of EEPROM the storage module is allowed to use for storing data by adjusting or defining STORAGE_EEPROM_FIRST_ROW and/or STORAGE_EEPROM_LAST_ROW. See storage_dft.h or the documentation at docs/FirmwareDevelopmentDocumentation/index.html.

If you want to delete old samples - while still using the storage module - you can do so by defining STORAGE_COMPRESS_CB and implementing a lossy compression algorithm. This callback is called each time EEPROM is full, just before moving data to FLASH. The current tlogger demo is using a lossless compression algorithm to demonstrate the technique, but you can differentiate by making your own 'compression' - deletion can be viewed as a heavy kind of lossy compression :-)

Of course, you cam also just stop using the storage module and implement your own logic on top of the EEPROM driver that does precisely what you want.

Kind regards,
Dries.

0 Kudos

465 Views
IvanRuiz
NXP Employee
NXP Employee

Dear Shailav Surve,

You can clear EEPROM by moving the data into FLASH by making use of int Storage_Write(STORAGE_TYPE * samples, int n) function in storage.c file. When that is done, the EEPROM is fully empty again.

Best regards,

Ivan.

0 Kudos