Unflashable after I2C

Whenever I flash any electron with code that uses I2C it will not accept any new code after that. It will blink blue like normal but all I get are timeouts CLI side.

Hi @ddres0605

Please see the other thread about the CCS881 where you are not calling Begin on the sensor library for the i2c sensor.

If you are having trouble there are two things to try:

  1. Safe mode: if you can get into safe mode you can often fix problems.
  2. DFU mode and use the CLI or dfu-util to flash new firmware

One thing that trips people up is that the web IDE will not flash firmware compiled against a wrong version of system firmware for you device. This can make it look like nothing is happening but it is trying to protect you. Check your devices firmware version in the web IDE and make sure you are compiling against that version.

3 Likes

Another thing you need to consider is that I2C is capable of preventing the system from servicing the cloud tasks often enough - even with SYSTEM_THREAD(ENABLED).

Without seeing your code it’s hard to tell, but I have seen projects that keep requesting I2C communication in loop() without suitable delay which resulted in exactly the same problem.

2 Likes