I am using a RCM3200 or 3700 to monitor a device via Ethernet. Recently I added the capability to change the static IP from a web form. The IP Address is stored in a global variable so it will retain its value after a reset. Everything works great up to this point. The problem is retaining the value after a complete power loss.
I have tried creating a file and using fwrite() and fread(). There are no errors reported, but it does not seem to work. After going through the documentation I can not determine if fwrite() is writing to flash or SRAM.
Is there any way to write a variable to a permanent area in flash, so that it can be read after a complete power loss?
If not then I assume I will be stuck modifying my boards to support external battery backup?
Any help is appreciate. Thanks!
Jon Barrett
[QUOTE=Leodox;474]
Is there any way to write a variable to a permanent area in flash, so that it can be read after a complete power loss?[/quote]
I have answered my own question. Further reading on these forums lead me to the UserBlock. The UserBlock sample programs were exactly what I needed.
writeUserBlock() and readUserBlock() worked perfectly.
I recommend to anyone that is working with the flash or UserBlock to run the UserBlock sample programs. They provide a great deal of information concerning what your Rabbit hardware supports.
Jon
Hi,
Please help me regarding writing data to Flash at Runtime.We are also facing same problem what you have faced regarding writing IP address in to Flash.
Please let me know the detail procedure and functions to write Flash at Run time.
Thanks for your valuable support.Plz help me as it is very urgent!
Thanks & Regards
s.sathyamurthy
Hi,
Please help me regarding writing data to Flash at Runtime.We are also facing same problem what you have faced regarding writing IP address in to Flash.
Please let me know the detail procedure and functions to write Flash at Run time.We have used rabbit4000 processor and 512K flash.
Thanks for your valuable support.Plz help me as it is very urgent!
Thanks & Regards
s.sathyamurthy