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

NVS_get_i32 returns wrong value (IDFGH-2860) #4917

Closed
kaedros opened this issue Mar 11, 2020 · 4 comments
Closed

NVS_get_i32 returns wrong value (IDFGH-2860) #4917

kaedros opened this issue Mar 11, 2020 · 4 comments

Comments

@kaedros
Copy link

kaedros commented Mar 11, 2020

Hello,

I'm having some trouble with NVS. Basically, I try read some variables to it
that does not yet exist and, in this case, this variable would be created with a certain value.

To make things easier, I have created a repository with a demo of the problem and all description.

What I have tried so far:

  • Checked partition sizes and alignments
  • Checked the NVS read and write process and it seems to be correct
  • Removed from the project all code that is not related to the NVS
@github-actions github-actions bot changed the title NVS_get_i32 returns wrong value NVS_get_i32 returns wrong value (IDFGH-2860) Mar 11, 2020
@igrr
Copy link
Member

igrr commented Mar 11, 2020

Since the program starts running on the board immediately after flashing, I think by the time you open monitor, the value is already set. Do you think this explains the observed behavior?
Perhaps you can modify the program to wait until a key press, before testing NVS behavior. Then it will not have a chance to set the value between the time it is flashed and the time the monitor runs.

@kaedros
Copy link
Author

kaedros commented Mar 11, 2020

Hello @igrr !

You are completely right.
"make monitor" perform a reset on ESP32 causing to run a second time.

There is a command "simple_monitor" that does not perform the reset, it only opens the serial port, but if used in sequence to the "make flash", there is usually no way to interrupt the monitor.

Thank You!

@Alvin1Zhang
Copy link
Collaborator

@kaedros Thanks for reporting. Has your issue been resolved? Could this issue be closed? Thanks.

@kaedros
Copy link
Author

kaedros commented Mar 12, 2020

Yes, thank you!

@kaedros kaedros closed this as completed Mar 12, 2020
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

3 participants