Hi,
In http://focus.tij.co.jp/jp/lit/an/slua449d/slua449d.pdf
First We need to save the contents of the instruction flash, Then Erase it. After Writing DFI - We need to restore it.
What is the purpose of saving the contents of instruction flash, erasing and restoring it. If i only need to update the DFI File.
Is this mandatory?
Also, I want to read back the Instruction Flash Checksum and DataFlash Checksum. I get a value of 0xff00 for both of them.
I am able to read back the Device ID, Firmware Version. For some reason IF Flash and Data Flash Checksum return only 0xff00.
Code Fragment:
1)
ret = i2c_smbus_write_word_data(i2c_client, 0x00, 0x0001);
value = i2c_smbus_read_word_data(i2c_client, 0x00); // returns the value 0x500
For the above commands, A value of 0x500 is printed. Which is correct.
2)
ret = i2c_smbus_write_word_data(i2c_client, 0x00, 0x0002);
value = i2c_smbus_read_word_data(i2c_client, 0x00); // Returns the Value 0x120
The above command the value 0x120 which is correct.
3) However for the DF Checksum and Instruction Flash Checksum.
ret = i2c_smbus_write_word_data(i2c_client, 0x00, 0x0022);
value = i2c_smbus_read_word_data(i2c_client, 0x00); // Returns value 0xFF00
The above prints 0xff00 (or 65280)
Also,
ret = i2c_smbus_write_word_data(i2c_client, 0x00, 0x0004);
value = i2c_smbus_read_word_data(i2c_client, 0x00); //return value 0xFF00
Am i missing something? Am i supposed to read the addresses 0x0004 and 0x0022 differently?
Thank you,
Regards,
sriram