As you mentioned i am trying to read write protect register...
but no luck with write operation.... Page Erase is working... reading is working.. but unable to do write() operation ...
How do you know that page erasing is working without begin able to write?
Fairly assuming you do no know what the memory has stored, you would need the following sequence to proof that your page erase worked, read, and write work:
erase page
read from page and get all 0xFF back
write onto page 0x41 0x42 0x43 (=ABC=[65,66,67])
read from page and get 0x41 0x42 0x43 ([65,66,67]=ABC)
erase page
read from page and get all 0xFF back
In code this may look like below.
Copy it, paste it into the IDE code pane, upload it to the board, and post the result with copy paste of the output you get in IDE console / terminal pane.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
How do you know that page erasing is working without begin able to write?
Fairly assuming you do no know what the memory has stored, you would need the following sequence to proof that your page erase worked, read, and write work:
In code this may look like below.
Copy it, paste it into the IDE code pane, upload it to the board, and post the result with copy paste of the output you get in IDE console / terminal pane.