Yellow flash of death

Hi spark,

First of all, I have two cores. One works just fine.

The other one, however, had me experienced the Yellow flash whenever I flash the core with Cloud IDE or in iOS App. It though reaches my WiFi and connects to it after re-flashing the firmware (Breathing Cyan).

What I’ve tried:
– Hard reset + re-flash firmware

Anyone?

Best,
Apon

Hi @Apon

When you say “hard reset”, do you mean Factory Reset? If not, check out section 3 here and see if those steps will help you get your :spark: Core flashing successfully again.

Hi @BDub

Yes, I mean Factory Reset. But it always come back to the yellow flashing so I have to flash the new firmware every time … and go back into the loop.

Need help…

Hi @Apon,

That does sound very strange. Can you post a video of the Core going through the flashing process from the Cloud and proceeding into yellow flashing? That would be very helpful.

Hi Apon,

Can you try writing something to the factory reset region and reading it back and comparing the two?

###grab this firmware:
https://github.com/spark/core-firmware/blob/spark_2/build/core-firmware.bin?raw=true

###write it to your factory reset region:
dfu-util -d 1d50:607f -a 1 -s 0x00020000 -v -D core-firmware.bin

###read it back to disk:
dfu-util -d 1d50:607f -a 1 -s 0x00020000:68216 -v -U firmware_copy.bin

###compare the two
cmp core-firmware.bin firmware_copy.bin

Thanks!
David

Hi @Dave ,

it gave me this when I process the code you instructed:

core-firmware.bin firmware_copy.bin differ: char 2, line 1

OK, let's be elaborate:

  1. Now my core is flashing yellow endlessly and I cannot go back to normal mode via factory reset; it will flash white for many times and return to this yellow flash again.
  2. I make sure my core is in DFU mode: dfu-util -l, it gives me:

Found Runtime: [05ac:8218] devnum=0, cfg=1, intf=3, alt=0, name="UNDEFINED"
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/20001Ka,108001Kg"
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg"

  1. I flash my core using

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D core-firmware.bin

  1. It did the thing and now my core is flashing blue.

  2. I input my wifi credential manually cuz the app is sometimes very buggy

  3. Using a mac,
    I go to CoolTerm,
    I connect to my device,
    hit w,
    input the credential

  4. It saved the credential > connected > breathing cyan

  5. I now go to Cloud IDE, add a core > work fine

  6. Flash an example blinking LED

  7. Magenta flashing coming up for 8 seconds

  8. And ..... yellow flashing

  9. WHAT DO I DO?

Hi @Apon,

Those steps I posted attempt to see if there is a bad region on the external flash on your core. Since you posted that the files differ, it sounds like the flash memory on your core is not working properly.

Can you email us at hello@spark.io, with your address / phone# and we can start the process of sending you a replacement?

Thanks,
David

So when you DFU the core-firmware to 0x0020000 it doesn’t verify it as it’s writing to flash? If the Core can’t/doesn’t do it, the dfu-util must have a way to verify right? Just thinking out loud, because that verify step is a very important one that I’d like to add to my process whenever flashing the factory core-firmware to 0x0020000. Thanks!

Hmm, it was my impression that dfu did memory verification, so I’m not sure yet why these are sneaking through. I don’t see an extra argument in the dfu-util manual, so maybe this is something that should be in the bootloader?

I don’t know enough about it to say, and I wondered how the DFU util could access the external flash … must be remapped from the bootloader firmware? If so, then yeah it should be doing verification :smile: Not sure if it is… it’s possible it does and later some sector of flash memory is being corrupted… maybe through ESD?

I’m writing an email to you now.
Thanks,

1 Like

Good suggestion – I’m adding a task for us to review this and see if this is something we can improve