So I’ve got a rather interesting “red flash” issue.
Here’s the timeline of events:
Core has been running some code for the last day or so with no problem (Programmed using WebIDE)
I walk in this morning and the core is rapidly flashing RED (just red)
I press RST… it resets but returns to flashing red (rapidly)
I do a factory reset and put in the WiFi credentials
The core connects to the spark cloud (breathing cyan)
I upload my earlier code (WebIDE)
Core goes through the normal flashing process and then starts blinking red, with no determinable pattern.
I do another factory reset and try a simple LED fade program.
Core flashes and then begins rapidly blinking red
I start writing this message (about 5 minutes after 9.) and while doing so flash the sample LED Blink program
The core successfully flashes and begins blinking
I am now able to flash the previously not-working LED fade program onto the core
I am able to flash the original program onto the core
After walking away from the core for a few minutes I notice it is flash rapidly red again but appears to “recover” after a minute and return to running the code.
What the heck is going on? How did the core “fix” itself and what am I doing that led the core to flash red and not accept new firmware for about 15 minutes?
I have no problem posting code but I figured I’d ask first to see if it was a simple mistake. My code is fairly basic so I don’t think it’s running out of memory but perhaps it is.
1.) Post your code here and we can see what’s going on or share a link to a Gist.
The syntax to paste code in the forum is:
```cpp
paste code here...
2.) When you perform a factory reset, the core will copy the factory reset firmware programmed in the...*er....* factory to overwrite the flashed user firmware.
This is based on design as it allows the user to reset the core in an event the user firmware is corrupted...
this results in a LED which slowly fades “up” until 255 brightness when the char overflows and then rolls over to 0. Would that cause a memory overflow problem?
If your core sometimes randomly goes from breathing cyan -> briefly flashing red -> back to breathing cyan it could mean you’ve seen us deploying updates to the cloud. Generally this time window is very short (under a second), and happens once a month or so. During the last few weeks we’ve started to add capacity to the cloud, and so these have happened a bit more frequently than we’d like. These should become less frequent again as we add capacity, but you might still catch us in the act.
When we have it, we’ll also post about scheduled maintenance, so you can plan for it and not have it catch you by surprise.