Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Global RAM structure variable gets corrupted and then auto recovers #11458

Unanswered
mightChamp asked this question in Q&A
Discussion options

we’re facing an issue related to RAM corruption, and I’d appreciate your input on how to handle it.
Here’s a summary of the situation:

  1. The entire application runs on a single core of the ESP32.
  2. We initialize EEPROM with 4000 bytes using EEPROM.begin(4000)
  3. At startup, we read a configuration structure (225 bytes) from EEPROM and store it in a global variable in RAM.
  4. This structure is read only once after reboot — we do not access EEPROM again afterward.
  5. The structure is then used in various parameter calculations.
  6. Initially, everything works correctly — calculations are accurate for the first 5–6 hours.
  7. Suddenly, calculations become incorrect, indicating that the structure variable has been corrupted in RAM.
  8. We do not modify or update this structure during runtime.
  9. Interestingly, after around 10 minutes, the calculations return to normal — suggesting that the structure variable somehow "corrects itself."
  10. This hardware has been running fine for 10 days, and this issue has occurred only once.

How can we detect and handle such a case where a global RAM variable gets corrupted and then seemingly recovers, even though we don’t explicitly touch it?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /