Im having this issue at the moment, it starts flashing normally then i get solid magenta for about 25 seconds, then flashing cyan and then the core restarts.
it only happens when i try and flash a particular firmware, ie one firmware updates no issue everytime, the other fails at the same point everytime.
Ive had it before with a different app i was writing… i changed the code and it started working again… i didnt take much notice at the time. it doesnt come up with any compile errors or anything, but never finishes flashing.
just adding one line of Serial.println(“something”); makes the difference… delete it and its fine add it in and hangs every time. Ive checked the useage and both ram and flash sitting at 75%ish.
if i leave the print line in and remove the if statement after it flashes ok too… its really strange
I couldn’t get it to flash with that code it would compile no probs but it would flash magenta for about 30 sec then solid magenta… I’ll try again tomorrow morning and see if I still get the same. The code has evolved a bit since then anyway and seems to flash ok again now
I’m a bit bummed I just got an email saying the rfid reader I wanted is out of stock… oh well ill just have to wait to try the code properly
@kennethlimcp, I’m sorry buddy but I still have no idea what your talking about but I just compiled the code with CLI and I will be trying to flash it over in a few minutes.
UPDATE: I flashed the code and it stops exactly as @kennethlimcp shows. Debugging time
I just realized that the code is running as desgined. It opens/creates a DB then creates 10 records and stops. This is exactly what I see on the serial monitor. I don’t get anything but breathing cyan.
I then changed RECORDS_TO_CREATE to 100 and TABLE_SIZE to 1024. Besides a pause while creating the records, everything worked fine with the last ID = 99 and Temp = 396. Things went way faster when I ran the code a second time since the DB already existed. All with the breathing cyan.
I compiled the code with Spark CLI and loaded the code via USB
One note however. In the .ino file in setup() there is this code:
Serial.begin(115200);
while (!Serial.available());
If you wait to long to connect to the serial port, the firmware background task will “starve” possibly causing the red led condition. The code should be:
Serial.begin(115200);
while (!Serial.available())
SPARK_WLAN_Loop();