there are some errors when cpe getting data from eeprom

there are some errors when cpe getting data from eeprom

Yo Lee We have heard the eeprom is flaky at hi speeds. Time for some experiments folks? I sent out a bunch of s a couple years ago that had a user enterable eth and ip addr saved in eeprom, and those came back with some clobbered locs.

I think this particular prob got solved with some atomic cli-sei additions, but I recall it caused me some uncomfort at the time. This means everything publicly available today. Also, this does not implicitly mean that any part that resets to 0 will corrupt other cells than 0, only that I don't have the volume to draw a conclusion.

There are two popular ways to wreak destruction other than trying to execute when VCC is out of spec which enabling BOD fixes. One is insufficient crystal oscillator stabilization delay; Either because the fuses are set wrong or the crystal is incorrectly loaded or poor quality. Another is eeprom read after a reset without waiting for the previous write to complete.

Yes Alice, there IS a time before reset, and the eeprom wisely does not care about the reset pin. It completes the write if possible. Which means that blindly mirroring eeprom into sram after reset will result in grief. Quote: We have heard the eeprom is flaky at hi speeds. But I don't remember when that change was made. Of course all the known issues are passed to FAEs, but most of the time, an FAE is the first source of feedback to the design guys at the factory if there is a problem.

Curiously, its often an FAE that identifies the failure pattern amongst a number of customers that eventually leads to the 'issue' being turned into an 'errata'. Sadly I don't have internal contacts within the Atmel factory any longer. NDA's and corporate security etc I still think that AVRs are a fabulous design though, and this is after learning the hard way on the 1st gen of 90s I always percieve an EE cell as nothing more than a FET with a really well insulated, low leakage gate capacitor on.

Flash is fundamentally just an array of those cells. Quote: I always percieve an EE cell as nothing more than a FET with a really well insulated, low leakage gate capacitor on. I always perceive an EE as nothing more than an FAE with a really well insulated, low leakage fur cap on. Anybody that uses NutOs may have seen this I hope not but it was driving us crazy. NutOs stores the MacAddress in a structure in low eeprom somewhere below address h, don't have the code in front of me right now.

There is a function NutNetLoadConfig that reads this structure from eeprom and performs a sanity check just a string compare on a device name string supplied. If the sanity check fails due to a read error on the eeprom then default values are used and the eeprom is re-written with the default values.

The result was that once in a while maybe 1 out of power up cycles our product 'lost' its MacAddress when the eeprom was overwritten. I eventually proved this was a 'soft' read error by removing the code from NutOs that overwrote the eeprom with the default values, we just ran with them out of ram. On the next power up cycle the correct MacAddress was back, since it was never really corrupted in the eeprom in the first place.

The error was a soft read error. My sketch also stores it's own wifi config version and sets this at boot time. So if this is true, we will soon face similar "brick" issues. I think I have to warn about this on our forum. Am I right? I have a few modules which started showing flash-related issues after about flash operations. So the actual mileage will vary. I guess the same applies for these commands which are used in our sketch at boot time: WiFi. Setting mode after calling WiFi.

Anyway, will look at WiFi. I'm also using sector writes to flash, but maybe I need change the routine to check if the 4k block is actually changed for at least one byte before it's written back to flash. Of course it would be nice it this is already protected at the core level or sdk level.

Maybe we need to check this and write wrappers around all flash related stuff to protect the chip. Risk that a sketch runs into a loop writing same data to the same cell in a high frequency is just to high!

Doing this kind of check by default is a pessimization which will become a major performance hit for, e. I'm aware of the performance loss. We started to "avoid" using spiffs because of it's costs in terms of program size and RAM usage. We only needed a single 32k block to store all configuration structs and that's why I decided to use some small dedicated functions.

Currently without 'wear leveling' but that would be impossible if you only want to use 32k in total has to work on k ESP models. It they mistakenly update the same data to eeprom in a loop or due to a bug the cell would soon be worn out and fail. Of course we would still have no protection if a bug results into writing different data to the same cell in a loop This is what I use.

Its a function that first tries to use stored credentials, so if the ESP has connected before it uses those nothing is written to flash , then if that fails it tries to use hard coded credentials, then if that fails it creates an AP.

From following this thread, if u've connected to the SSID before, it should just reconnect without writing anything. What i've not implemented is a comparison function between what is stored and what is hard coded. However changing this behaviour now would probably break a lot of existing changes. Or at least not any of my own sketches. I've just added this line to my sketches here now as the first method invoked for the WiFi object: WiFi.

Question 3: I have up to 1kb of leftover space so quite a bit. Active Oldest Votes. How would this be possible to check if it was in the middle of a write cycle? Well, you need to apply a number of techniques: Provide a method for error detection. If you can afford the idea, I'd recommend including two methods: a checksum that is very simple to implement and provides a first test which, if it succeeds, leads to the second test -- a CRC or ECC.

Provide a means for error correction. This can be achieved using ECC at whatever level of correction you feel you want 1-bit or 2-bit or more. But another way to approach this is redundancy, by providing duplicate segments of your data so that if one fails its testing you can use the other which is then replicated again to provide redundancy again.

Don't rely on fixed locations. You skip the ones that don't check out and move on, using the SIZE field. This allows you to recover from cases where a segment is bad and cannot be trusted.

A problem here is that the SIZE field itself may be flawed. So that might be an approach. There are others, though. Include a wear-leveling scheme. Some of the ideas may be applicable even if you don't bother with wear leveling, because of the shared goals of data integrity.

Thank you for your time. Erik Friesen Erik Friesen 1, 1 1 gold badge 9 9 silver badges 19 19 bronze badges.

Now, thinking about it I am not sure whether I was in debugging mode or not? Then I added a delay 25xms between the writes - i. I wasn't in debugging mode. When I added additional delay it worked fine. I have to leave it for a couple of hours and maybe try again with the first test. WesS qhb [4] Can you show your whole test program? By definition you do not know what parts are or are not relevant. Please show, either inside a single [ code] Well, I know that during eeprom write all interrupts are disabled, so nothing else will have cause the problem.

But why not, I can post my test code. I have changed it, and run test again with the code below. I left some variable definitions from my original code in the main. I start the test when the pic is powered up, and write to eeprom data memory locations.

All first writes with exception to first 2 memory locations failed. I can't see anything wrong with the code, but it maybe, because I have been looking at it for too long. Aussie Susan. For any variable updated inside an ISR, you need to declare it volatile. Remove the processor specific include - the 'xc. I would suggest that you write the required unlock sequence using inline assembler code because the instructions MUST be executed exactly as specified.

You do not want to leave it to the compiler to generate the code for you as it may or may not interpose other instructions as far as the compiler is concerned, it can generate any sequence of instructions it likes as long as the end result is logically equivalent to your C code. Also any optimisation might see the consecutive writes to the EECON2 register and ignore the first one. If you are seeing that you need to add i a delay then something else is going on. I would get rid of all extraneous code e.

I was thinking about the same thing. The strings must be there But I tried changed the code like this: Code: [Select]. To 'Correct' you have to be Correct. The weird behaviour is making me crazy.

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Theree on GitHub? Sign there are some errors when cpe getting data from eeprom to your account. I am using an Whe to read a temperature sensor every minute and post the data to a webserver. The module reads the data gething the sensor, post it and go into batman arkham city robin free roam for 60 seconds. My code works fine for some time for some modules days, for other it takes weeks but then the module starts to reset itself with no apparent reason. The weird part is that the MCU still works fine after that: if I skme a new code with no Wifi function like blink led the module works alright. However, if I use ANY Wifi function, the code there are some errors when cpe getting data from eeprom up to the point where the function is called and then the module reboots, printing the following message:. The same there are some errors when cpe getting data from eeprom happened to five modules now. I am not sure if it getting a hardware problem or a bug in my firmware. I've been facing this problem for almost 2 months now. I first thought that there was some sort of memory leak causing it so I started to print the free heap available every time the module woke up from deepsleep. Even after the module was "bricked", the heap was still ok. there are some errors when cpe getting data from eeprom I first thought that there was some sort of memory leak causing it so I lease file (​or similar) is getting corrupted or running out of space. It appears that SDK routines are not robust enough to handle these errors, which leads to a crash. It they mistakenly update the same data to eeprom in a loop (or due. I am using PIC18 and I wanted to read and write to EEPROM data memory. I have installed them, but after trying to compile I got a number of errors. I added some code to see what is happening, and watching the data In MPLAB 8 in EEPROM view you can change every memory location, and there is. elmarkinninger.biz › watch. I check that right after reading the data. BTW: elmarkinninger.biz(size) is always ending in an error while runtime. Something with Fatal The strings must be there. I'm not so certain that only the pointer is stored in the eeprom. I have a design that has data saved to EEPROM. Even if there is no program code in the chip at all to read or write the EE, that use EEPROM for storing all configurable parameters, and error logs, You get rid of the spikes (which violate absolute chip maximums) and the nutzo behaviour goes away. This is not a wide-area network, although it can span Several kilometers. that the data which preceded it in a message or block, was in error and should be ignored. It usually tells the receiving station to dump the preceding text unit (block or The term is often used to refer just to the local loop but it may include the CPE. CATV Community Antenna Television CER codeword error rate CLI command-​line CM cable modem CMCI cable modem–to–CPE interface CMTS cable modem certificate DES Data Encryption Standard DHCP Dynamic Host Configuration Counter-Measure EEPROM Electrically Erasable Programmable Read-Only. General Electric's (GE) Data Communications Product Department has labels for identification purposes by I Each Flexi—Disc ll is certified lOO% error-free are memory (Eprom), lK bytes of random accem memory for data storage and 32 In addition, there is an installation charge of about $ for field upgrades, the. In the Definitions and Nomenclature Section there are some tips and solutions to frequently asked questions. This document does not describe calibration values in the EEPROM because the EV2 FET control or to blow a fuse if the cells get to hot. HPE, CPE: These bits enable PEC error checking on charger (​CPE) or. Hot Network Questions. Will your hold-up cap keep things afloat long enough to finish the write? So, that's all for now [8 ]. GODO 3. Will try a full git pull. When you hit the AVR with enough noise you can certainly drive it nutz. To make sure that the issue is not a too-rapid power cycle of the printer Great, thanks! I've just added this line to my sketches here now as the first method invoked for the WiFi object: WiFi. Tales from documentation: Write for your clueless users. there are some errors when cpe getting data from eeprom