Home/Support/Support Forum/fastest means to store only 2 bytes of non-volatile constants
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

fastest means to store only 2 bytes of non-volatile constants

0 votes
I'm using Rabbit 6750 and Dynamic C 10.72. I need to store only 2 bytes of constants in non-volatile memory. I don't want to count on battery backed ram because the battery will eventually go dead. I tried the readUserBlock and writeUserBlock but when I started updating the 2 constants (each 1 byte) the Rabbit locked up. Additionally, writing the byte was extremely slow. There must be a way to place these two bytes quickly and reliably in some non-volatile memory. Any help out there? Thanks.
asked Aug 27, 2015 in Rabbit Software by kaosj New to the Community (3 points)

Please log in or register to answer this question.

2 Answers

+1 vote
I have done some work on this and found that, eventually, the writeUserBlock() was the function to use. At first the timing indicated writeUserBlock() took 3.75 seconds to work and eventually locked up the application. I created a much simplier app using the writeUserBlock() function and found it only took 123 milliseconds to execute and never locked up the program. I went back to my main app and started commenting out functions I suspected may affect the writeUserBlock() execution.

I found using serial port B was the problem. Apparently, you can't use serial port B and writeUserBlock() with any success. I went back to the documentation and found that the serial flash uses Port B lines and if you want to use serial port B and writeUserBlock() YOU have to manage those lines - my guess is you must really want to use that serial port B pretty badly to accomplish that.

I think they ought to put a note about the serial port B conflict with writeUserBlock() in the writeUserBlock() function description.

Thanks for your help.
answered Sep 9, 2015 by kaosj New to the Community (3 points)
0 votes
Are you using the SUBFS.c sample program.
The purpose of SUBFS is to make it easier to manage data in the
userID block, which is a non-volatile area of storage available on
all Rabbit boards.
answered Sep 8, 2015 by Campbell Veteran of the Digi Community (990 points)
...