Dear NXP,
I am working on T4240RDB-64B machine and using QORIQ-SDK-2.0 source. I needs to test NVRAM RTC in kernel.
Needs to read and write the value.
Will you please tell me how to test NVRAM RTC (CY14B116M ) ?
Do I needs to do any configuration ?
Thanks & Regards,
VinothS,
Solved! Go to Solution.
1. Enable I2C-RTC driver in kernel, Eg.<DS3232>.
If your RTC chip supports NVRAM, it will be exposed as a sysfs file named nvram. To find the file, run
find /sys -name nvram
and you will get output like
/sys/devices/platform/i2c_davinci.1/i2c-1/1-0068/nvram
If your busybox configuration includes
CONFIG_OD=y
then you can dump the contents of NVRAM using
od -x /sys/devices/platform/i2c_davinci.1/i2c-1/1-0068/nvram
and you will get output similar to
0000000 d67a 8472 5de8 b5d6 7e1d 10da 4aef 8016 0000020 26df 1027 56a5 b814 61ca 5214 1259 5aca 0000040 ba49 5930 e452 a730 f653 ec0a f0bb 2ad0 0000060 88dc 657e 3468 9be8
You can test that you can write to NVRAM using
echo "123456789a123456789b123456789c123456789d123456789e1234" > /sys/devices/platform/i2c_davinci.1/i2c-1/1-0068/nvram
1. Enable I2C-RTC driver in kernel, Eg.<DS3232>.
If your RTC chip supports NVRAM, it will be exposed as a sysfs file named nvram. To find the file, run
find /sys -name nvram
and you will get output like
/sys/devices/platform/i2c_davinci.1/i2c-1/1-0068/nvram
If your busybox configuration includes
CONFIG_OD=y
then you can dump the contents of NVRAM using
od -x /sys/devices/platform/i2c_davinci.1/i2c-1/1-0068/nvram
and you will get output similar to
0000000 d67a 8472 5de8 b5d6 7e1d 10da 4aef 8016 0000020 26df 1027 56a5 b814 61ca 5214 1259 5aca 0000040 ba49 5930 e452 a730 f653 ec0a f0bb 2ad0 0000060 88dc 657e 3468 9be8
You can test that you can write to NVRAM using
echo "123456789a123456789b123456789c123456789d123456789e1234" > /sys/devices/platform/i2c_davinci.1/i2c-1/1-0068/nvram
Thank you Yiping Wang for your reply.
Thanks & Regards,
VinothS,