Home/Support/Support Forum/Why protected char* don't remember the data
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Why protected char* don't remember the data

0 votes
I try to declare variables as protected.

protected char *ipA;
sysIsSoftReset(); // restore any protected variables

but after power up ipA don't remember the data.
asked Jun 15 in Rabbit Software by thuabc New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Can you share your entire program? If you run Samples/reset_demo.c, does that work? Does ipA point to a constant string somewhere in flash? If not, ipA might be protected but the buffer it points to is not.

What if you declare `protected char ipA[40];` and then write data into that buffer?
answered Jun 16 by TomCollins Veteran of the Digi Community (1,872 points)