2023-07-06 05:46 AM - last edited on 2024-01-08 04:53 AM by Peter BENSCH
I am using M24256-BW M24256-BR M24256-BF
M24256-DR M24256-DF 256 K-Bit I2C EEPROM for booting purpose.
While writing the data into EEPROM, I am not able to write the last byte(64th) of the page.
If I will write it separately, then it will work fine but with the page write it is not.
Is there any workaround for this issue.
I am following the correct sequence of steps given in the datsheet.
Thank you.
2023-07-06 06:45 AM
Perhaps the indices are 0-based and you're using 1-based. Show you code.
2023-07-07 04:38 AM
I am using 0 based indices only.
If I am writing 65 bytes, then also what is happening is the last byte is rolling over to 0th index but the last byte remains same as FF. (the 64th byte is not getting written anywhere).
My write function is as below:
}
2023-07-07 04:50 AM
And what platform is this?
Perhaps inspect signals with a scope or logic analyzer, looking specifically how it manages the stop. How the stop and start functions wrap the drv_i2c function. Perhaps there are other more compound functions.
2023-07-08 05:38 PM
> If I am writing 65 bytes,
You can only write one page (64 bytes) at a time, per the datasheet. If your first written index is 0, then the last written index will be 63, not 64.