cancel
Showing results for 
Search instead for 
Did you mean: 

IIS328 how to get out of an I2C hang

RLee.4
Associate III

I'm using a IIS328DQ on an I2C bus @400KHz

Every now and again, the part hangs up and won't talk to me.  The only way out that I've found is a power reset.

Attempting to follow https://community.st.com/t5/mems-sensors/if-hang-up-i2c-interface-of-the-lis2dh/m-p/157456 I have run out an SCL with like 20 pulses (as shown below)

RLee4_0-1687460642025.png

I've tried this with and without SDA framing to no avail.  Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Ciao @RLee.4 ,

We don't have enough information to understand what could be the problem, however if giving 20 pulses nothing changes, the only way is a power reset.

If my reply answered your question, please click on Accept as Solution at the bottom of this post. This will help other users with the same issue to find the answer faster

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Federica Bossi
ST Employee

Hi @RLee.4 ,

It could be a problem related to electrical lines. Could you please share some acquisitions with the oscilloscope instead of the digital analyzer?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I can get you some scope shots Monday when I'm back in front of hardware but...

These are point to point lines (micro to the part) with 2.2K pullups on them thusly:

RLee4_0-1687525466907.png

The problem at hand tho is that once here, how do I get out of it without a power reset?

Hi @RLee.4 ,

Thanks for the schematic, you could try to put a bigger value of R54 and R55.

Let me know if this helps.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Looking at the I2C lines, I've got everything from really nice to OMG what a mess so I can, on this board, see where I'm hanging the part.

The question I've got here is this: What am I supposed to do to get the part out of this state without a power reset?

Federica Bossi
ST Employee

Ciao @RLee.4 ,

We don't have enough information to understand what could be the problem, however if giving 20 pulses nothing changes, the only way is a power reset.

If my reply answered your question, please click on Accept as Solution at the bottom of this post. This will help other users with the same issue to find the answer faster

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.