2020-05-07 06:55 AM
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?
Solved! Go to Solution.
2020-05-07 07:55 AM
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".
2020-05-07 07:55 AM
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".
2020-05-07 09:08 AM
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
2020-05-18 11:39 PM
The Problem indeed was an error in the sensor's firmware.
2020-05-19 01:46 AM
You mean inside the sensor? Can you please elaborate on this? How did you solve the problem?
JW
2020-05-19 02:18 AM
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
2020-05-19 03:25 AM
Huh...
Thanks for this piece of information.
JW