|
Forum Index : Microcontroller and PC projects : Strange error message
| Author | Message | ||||
| busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
For the last two days I have been trying to track down an error message that suddenly appeared in a program that has been running for months on the Micromite backpack. The program in question is a clock, calendar that also reads the temperature and humidity from a DHT22 sensor. The high and low values from that sensor are saved by the VAR SAVE command along with the date and time the readings occured. In the event of a power failure I don't lose those readings. There are four VAR SAVE commands in the program each saving three variables. If I commented out the last VAR SAVE command everything worked ok but uncomment it and the error message I got was: "CPU exception #7 (bus error on load or store) at address 0x9D02F13F Processor restarted" Followed by "[27] VAR restore Error: Invalid variable name" After much head scratching and hair pulling I was finally able to track it down. The MX170 chip had gone flakey. After replacing and reprogramming with a new one everything works as it should. I know that the flash memory on these chips has a finite number of read and writes but the amount I was writing to flash was tiny. Sometimes weeks could pass with nothing new saved. Just my bad luck I guess. Anyway, that's my horror story. Hopefully it can help others out there that may have a similar error. |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1772 |
How many VAR SAVE operations per week do you estimate? ‚My name is Ozymandias, king of kings Look on my works, ye Mighty, and despair!‘ Nothing beside remains. Round the decay Of that colossal wreck, boundless and bare The lone and ... |
||||
| busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Hard to say but I know the last VAR SAVE operation when I checked a day or so ago was on 23rd December so nothing has been saved this year. I am in the process of changing my code to make a VAR SAVE operation once a day at midnight, that way I can be sure the flash memory won't quickly wear out. |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1772 |
No, I think once a day should be okay! I was afraid you did it once a minute or more. ‚My name is Ozymandias, king of kings Look on my works, ye Mighty, and despair!‘ Nothing beside remains. Round the decay Of that colossal wreck, boundless and bare The lone and ... |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3368 |
Interesting tale. It does sound as if you have a flaky chip - very unusual. Geoff Geoff Graham - http://geoffg.net |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
it does happen. Not often but it does happen... A while back I drove GeoffG mad with a thread of mails that showed errors in the flow of a prog using local variables in a for/next loop - and it was a really silly fail , getting locked in a loop with the counter variable obviously not decrementing (STEP-1)... I could make it fail on cue but Geoff could not. I wasn't even touching the flash or doing anything exotic in that instance. In exasperation, I re-flashed the MM in question and everything went back to working as it should, to this day it is a mystery how it got corrupted. I have learnt that whenever really weird stuff starts happening - especially like in your situation where something has been working and then mysteriously starts playing up, I flash the MM as one of my first efforts. I appreciate this might not always be convenient. It's computers right? They are binary devices and always behave in a predictable manner - heh, yeah right! |
||||
| busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
Yes it sure had me scratching my head for a while. It was only in desperation that I changed to a new MX170 chip and reflashed it after I had changed all my other hardware and checked and rechecked solder joints etc trying to track it down. All's well that ends well though. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |