2019-02-13 05:40 AM
I try to change the user area 1 protection to read only (from RF).
I'm doing that by i2c.
but something wrong, it doesn't matter what I try to update it always changed it to 6b:
00000000 88 00 01 00 6b 0f 6b 0f 00 0f 6b 6b 00 00 07 00 |....k.k...kk....|
00000010 00 00 00 00 7f 00 03 24 63 1f 03 15 00 24 02 e0 |.......$c....$..|
00000020 12 ff ff ff |....|
00000024
the cmds:
echo -n -e \\x0c > /tmp/reg.bin
dd if=/tmp/reg.bin of=/sys/devices/13890000.i2c/i2c-3/3-0057/st25dv_sys bs=1 count=1 seek=4
Solved! Go to Solution.
2019-02-18 01:08 AM
Hello,
Thank you for the explanation on the commands. What you are doing looks correct.
If security session is opened, it should work. This means that something else is preventing the write, and we need to find out what.
There may be different causes:
If the VCC is set off between the moment you checked security session and the write to RFA1SS: any interruption of VCC is closing the security session. It's unlikely, but it worth a check with a scope.
if the RF is busy, the I2C command is not executed: do you have RF access that may be concurrent to the I2C write to RFA1SS ?
Do you have any possibility to capture the SDA and SCL signal with an oscilloscope to check what really happen on the I2C bus during the failing write command ?
Best regards.
2019-02-15 04:30 AM
Hello,
In order to change anything in the system configuration area from I2C, you first need to present the correct I2C password to open the I2c security session.
If i2C security session is not opened, then you will not be able to write the RFA1SS configuration register.
You can check if the I2C security session is opened by reading the I2C_SS0_Dyn status register (address 2004h, E2=0). If value is 0, then it means that the I2C security session is not opened, and you will not be able to write in RFA1SS. If value is 1, then I2C security session is opened and you can write into RFA1SS.
Sorry, I don't understand the command example you posted.
Hope this answers your question.
Best regards.
2019-02-16 10:32 PM
Hi,
Thank for your response.
The security is opened:
hexdump -C /sys/devices/13890000.i2c/i2c-3/3-0053/st25dv_dyn_reg
00000000 88 ff 08 03 01 00 00 00 |........|
00000008
but I still cant change the register.
the cmds below are writing to register 04h
// write 0x0c to tmp file
echo -n -e \\x0c > /tmp/reg.bin
// write the temp file to st25dv_sys (seek=4 means offset 4)
dd if=/tmp/reg.bin of=/sys/devices/13890000.i2c/i2c-3/3-0057/st25dv_sys bs=1 count=1 seek=4
2019-02-18 01:08 AM
Hello,
Thank you for the explanation on the commands. What you are doing looks correct.
If security session is opened, it should work. This means that something else is preventing the write, and we need to find out what.
There may be different causes:
If the VCC is set off between the moment you checked security session and the write to RFA1SS: any interruption of VCC is closing the security session. It's unlikely, but it worth a check with a scope.
if the RF is busy, the I2C command is not executed: do you have RF access that may be concurrent to the I2C write to RFA1SS ?
Do you have any possibility to capture the SDA and SCL signal with an oscilloscope to check what really happen on the I2C bus during the failing write command ?
Best regards.