TS-4710 NVRAM: Difference between revisions

From embeddedTS Manuals
No edit summary
(changed ts4700ctl to tshwctl call)
Line 20: Line 20:
From the above value, this would return 0x48ca4278.  To set values, you can use environment variables:
From the above value, this would return 0x48ca4278.  To set values, you can use environment variables:
<source lang=bash>
<source lang=bash>
nvram0=0x42 ts4700ctl --nvram
nvram0=0x42 tshwctl --nvram
</source>
</source>


If you read back nvram0, this should now confirm the value is 0x42.
If you read back nvram0, this should now confirm the value is 0x42.

Revision as of 16:41, 8 August 2013

The RTC has an included 128 byte NVRAM which can be accessed using tshwctl.

tshwctl --nvram

This will return a format such as:

 nvram0=0xf7f8a73e
 nvram1=0x2fef5ae0
 nvram2=0x48ca4278
 ...
 nvram31=0x70544510

This breaks up the NVRAM into 32x 32-bit registers which can be accessed in bash. As this uses the name=value output, you can use "eval" for simple parsing:

eval `tshwctl --nvram`
echo $nvram2

From the above value, this would return 0x48ca4278. To set values, you can use environment variables:

nvram0=0x42 tshwctl --nvram

If you read back nvram0, this should now confirm the value is 0x42.