SPS30 sensor and particle photon - boot loop

I have a particle photon, which I have an SPS30 sensor attached. This has been working well for over a year. Today I tried to make a minor change unrelated to the sps sensor, and everything broke.

The device is in a boot loop/hard panic. I cannot find any reason for it to be doing this. I have been using the included useage.ino file and it still crashes.

By crashes, I mean it goes through the wifi setup, sends the first “i’ve booted” response, then the red led flashes randomly and it reboots.

My suspicion is that the SPS30 library may have been changed. I have isolated that this behavior happens in

_i2cPort->requestFrom((uint8_t)SPS30_ADDRESS, (uint8_t)60);

I have a protocol sniffer attached, and I think it is trying to read more bytes than are available. It is supposed to read 60 bytes, but it shows a NACK after byte 32.

I have an arduino library that works, but I’d rather not go through the trouble of trying to translate it for the photon.

Does anyone have a working example?

@haicen, welcome to the community. You may want to look at this thread for your answer:

The solution makes uses of the acquireWireBuffer() function to expand the I2C buffer.

No, that isn’t the issue. I’ve been running a slightly modified version of the usage.ino (from Particle Web IDE). I’ve been running my modified version for over a year without any issue, and after making a small tweak (removing some particle publish variables for a separate temperature sensor), and now it no longer works. I even tried reverting to the original example sketch, and got the same result.

It smells a bit like burnt electronics, so I’m now suspecting a hardware failure. It also no longer replies to i2c writes/reads. I guess it is just coincidence that the hardware failure happened at the same time as a firmware modification.

1 Like

Which os you run before last flash?
And which one your Photon is running now ?

I doubt it is really random. I’d rather expect it to look something like
... --- ... - - - - - - - - - - ... --- ...

Or you could post a short video of it (~30sec)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.