TS-4900 NVRAM: Difference between revisions
From embeddedTS Manuals
No edit summary |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The RTC includes | The RTC includes 120 bytes of NVRAM which can be used for custom applications. The utility 'nvramctl' can be used to read/write the NVRAM. The source for this utility is available from our [https://github.com/embeddedTS/ts4900-utils/ ts4900-utils github]. | ||
[https://github.com/ | |||
The utility reads/writes a byte at a time, and returns the value in hex. | The utility reads/writes a byte at a time, and returns the value in hex. | ||
Line 15: | Line 13: | ||
The NVRAM code can be included in your application by using these two files: | The NVRAM code can be included in your application by using these two files: | ||
* [https://github.com/ | * [https://github.com/embeddedTS/ts4900-utils/blob/master/src/nvram.c nvram.c] | ||
* [https://github.com/ | * [https://github.com/embeddedTS/ts4900-utils/blob/master/src/nvram.h nvram.h] |
Latest revision as of 12:14, 27 October 2022
The RTC includes 120 bytes of NVRAM which can be used for custom applications. The utility 'nvramctl' can be used to read/write the NVRAM. The source for this utility is available from our ts4900-utils github.
The utility reads/writes a byte at a time, and returns the value in hex.
nvramctl --addr 10 --set 0x40
nvramctl --addr 10 --get
# Returns "nvram10=0x40".
# This can also be used with eval
eval $(nvramctl --addr 10 --get)
echo $nvram10
# Returns "0x40"
The NVRAM code can be included in your application by using these two files: