Photon freeze or force shutdown

Hey guys,

Since the update to 0.4.7 i have a strange issue. Not sure if its related to this version, actualy i never had the chance to test it on another version.

On my Prototype and on my test Photon, I’m currently trying to include the MCP23017.
Using this Libary: https://github.com/pkourany/Adafruit_MCP23017_IDE
But if I uncomment all needed parts

#include "Adafruit_MCP23017.h"
Adafruit_MCP23017 mcp;
mcp.begin();

compile and flash,the Boards goes off after a short blue blinking (no LED), or the breathing stops (blue LED persists), and the device freezes (no cloud connection, no serial) and are only flashable using DFU.

I have no problems with other code, so anyone has clue why this is happening, maybe the i2c related changes?

Best regards
X-Press

@Lord_X_Press, I’d need to see you entire code but I am surprised that your code still compiles if you remove those items unless you also removed all references to the mcp object everywhere. Please post your code :smile:

I had some test code for the mcp23017 , so I upgraded to 0.4.7 and instant lockup !!! , so went back to 0.4.5 and didnt lock up , but my mcp23017 didnt work !!! , check all the wiring and could understand why it didn`t work now when it worked on my other photon … LIGHT BULB CLICKED !!!
no pullup resistors !!!
So upgraded again to 0.4.7 and it was working again !!!
So 0.4.7 locks without the pull up resistor !!!

@peter_a, you were lucky that it worked on 0.4.5 at all! By default, I2C needs pull-up resistors. :wink:

1 Like

No it didn`t work on 0.4.5 !!! , but it did NOT lock up the entire system.
0.4.7 locks up the entire system dead !!!
So with 0.4.7 you are exchanging resets for lock ups.

Ok thanks for the information about the Pullup Resistors.
But should this even happen if the device is not connected to anything?

But should this even happen if the device is not connected to anything?

it`s locking because of the i2c bus , not because anything is connected to any of the outputs.

Isn’t i2c a dedicated output on the photon on D0 and D1 and isn’t this the place where I should hang on a pullup resistor?
So per definition the Photon now locks up if you have something with i2c in your code and no pullup resistors installed (doesnt matter if connectect to a i2c device or not)?

I am having similar issues with 0.4.7 on the MCP23017.

Basically for me the Photon just stops breathing cyan. Like its completey frozen. Hitting the reset solves it for a few hours.

I reverted back to 0.4.6 and it works so far 12+ hours.

@mdma

@Carsten4207, I flagged the Particle Team to comment on this behavior. :smile:

1 Like

I think you need to have a device on the bus for it to lock up ? , because what I think is happening is that it is waiting for something that never happens.
The mcp23017 looks a little problematic to me , I have many i2c devices and with the mcp23017 you need to do a wire.reset() for it to work.
I have a routine which writes a byte to each address and looks if I get a error , so I know which devices are on the i2c bus and that doesn’t lock the bus.

There really should be no reason why all loops do not timeout under this no pull resistor condition, but it is. When I was making modifications to the I2C routine for 0.4.7 I was using a Sparkfun Weather Shield and pulling the photon out of the socket while it was running, then putting it back in and it was fulling recovering with no future errors. So the fact that this is locking up without pull up resistors is new to me :smile:

Captured it here:

2 Likes