Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6852207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:20:36+00:00 2026-05-27T01:20:36+00:00

Well I hope this question fits to Stackoverflow ( if otherwise, I want to

  • 0

Well I hope this question fits to Stackoverflow ( if otherwise, I want to apologize already )

I have can C8051F340 Microcontroller from Silabs. I wrote a little Interface which stores Information in the non-volatile flash memory from the uC. Now as in the data sheet described I save all the data in between the addresses 0x0200 – 0x0300. To copy my data there I just use memcpy.

char xdata *ptr_selection       = 0x0210;
// Some other code here
memcpy (ptr_selection, writeBuffer, sizeof (writeBuffer));

Well the copying itself works well ( I looked up at the flash memory and it saved my data right ) – If I now disconnect my uC and connect it again in like 5 secs, the data is still there. But if I leave it disconnected any longer my data gets more or less “resetted” – that means it gets everytime almost the same “reset values”. so what am I doing wrong? I mean isnt the flash data non volatile or did I get something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:20:36+00:00Added an answer on May 27, 2026 at 1:20 am

    Based on the code you displayed in your question, you are trying to write to external data (xdata), which is RAM, not non-volatile flash memory. The reason the data disappears after a few seconds, is the power supply capacitor still powers the chip long enough to keep the internal RAM alive.

    To write to flash memory, you need to follow a specific protocol to unlock the flash programming circuitry, then erase the area you will be writing to, and then write the bytes using MOVX instructions as described in Section 12 of the datasheet.

    This Silicon Labs application note “Writing to Flash from Firmware” describes the process in detail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my first question here so I hope I can articulate it well
I hope I can explain this well enough so that you can understand the
Well, I have a simple question, at least I hope its simple. I was
I hope I am able to put this question together well. In a partial
I can't find a duplicate for this question, but I honestly hope I'm not
I hope this question is appropriate for stackoverflow... What is the difference between storing
I sure hope this won't be an already answered question or a stupid one.
I hope the title is chosen well enough to ask this question. Feel free
First question. Hope this isn't a repeat. I have an unordered list of thumbnails
Guys, I opened this question (I hope could help some others) but reading stackoverflow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.