cancel
Showing results for 
Search instead for 
Did you mean: 

IC2 detection problem after uploading code / reset

MHell.1
Associate II

Hello,

I have connected a BNO055 Sensor via I2C to a STM32WB Nucleo board. The sensor data is send by a BLE Service without problems after powering the device.

However, if I change the code and upload via STM32CubeIDE or press the reset button on the device, the I2C connection seems broken... I do receive a HAL error from time to time...

Question: is there a way to securely reset all pins apart from pressing RESET or is this more likely to be my software's problem?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

One problem with I2C is that the protocol requires other devices to behave correctly. If one is misbehaving, resetting the MCU won't help.

> is this more likely to be my software's problem?

If you're getting a "HAL error from time to time", I would suggest tracking those down. This is not normal and indicative of an issue somewhere.

> is there a way to securely reset all pins

You can reset pins and peripherals one at a time. There is no single function call to "reset all pins".

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
TDK
Guru

One problem with I2C is that the protocol requires other devices to behave correctly. If one is misbehaving, resetting the MCU won't help.

> is this more likely to be my software's problem?

If you're getting a "HAL error from time to time", I would suggest tracking those down. This is not normal and indicative of an issue somewhere.

> is there a way to securely reset all pins

You can reset pins and peripherals one at a time. There is no single function call to "reset all pins".

If you feel a post has answered your question, please click "Accept as Solution".

You may want to start with implementing the "9 SCL pulse" reset sequence before starting any I2C communication - see the I2C standard and search this forum.

JW

MHell.1
Associate II

The Problem indeed was an error in the sensor's firmware.

You mean inside the sensor? Can you please elaborate on this? How did you solve the problem?

JW

I just prevented the chip from resetting, since the FW-Update has not been available as far as I know.

Here's the issue: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BNO055-power-on-reset-issues/m-p/8457/highlight/true#M948

Huh...

Thanks for this piece of information.

JW