Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data write not persisting #6

Open
jLynx opened this issue Mar 31, 2021 · 0 comments
Open

Data write not persisting #6

jLynx opened this issue Mar 31, 2021 · 0 comments

Comments

@jLynx
Copy link

jLynx commented Mar 31, 2021

Hi I am having trouble getting data I write to stay as each time I try to read it back after restarting its not there anymore.

  char* testword_in;
  char* testword = "TestWord";

  //  NVRAM.write_block((uint8_t *)&testword, 0, sizeof(testword));
  NVRAM.read_block((uint8_t *)&testword_in, 0, sizeof(testword));
  print_compare((uint32_t)testword, (uint32_t)testword_in);

This is what I am using to test. I will uncomment the write line and run the code. It will return "OK" but then I comment out the write line and test it again and it fails and returns "ERROR".

II am testing this on a NRF51822. Is there something I am doing wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant