2025-08-18 10:42 AM
I am working on my custom PCB and trying to get serial output from a BNO055 (via I2C) and a SEN0257 (analog sensor).
I can successfully upload and run SPI code for the SD card, and it works.
My servo motors also work fine with uploaded code.
However, when I try to use the BNO055, I shared the schematic and my code, I get no data on the serial monitor.
I checked my PCB: there is no short circuit on the MCU or sensor circuits.
On the I2C bus, I can measure 3.3V from the SCL and SDA pull-up resistors.
For reference, here is the code I’m using for the BNO055:
https://github.com/yzeybek/BNO055_TEST/blob/main/Core/Src/main.c
On the SEN0257, I can measure an analog voltage when the sensor is plugged in, but still no data appears on the serial monitor.
Here is the code for SEN0257:
https://github.com/yzeybek/SEN0257_TEST
Solved! Go to Solution.
2025-08-24 1:09 AM
I found the cause of the problem. The COM3 pin of the BNO wasn’t soldered properly and was left floating. Because of that, the I²C address was set to 0x40 which is the HID I²C address. After resoldering the pin, the issue was resolved. Thanks to everyone who helped.
2025-08-19 11:53 AM
Hello,
can you share the schematics of the stm32 please ? I noticed that there is not shared.
If your project is not based on the github project that you shared, it could be a configuration issue with your I2C module.
Check first the your configuration.
When you are sure that the i2c module is correctly initiated, try to send a simple data on the bus. Do you have a digital analyzer to check of you can send data on the SDA ?
if you have no data, on the bus, deep into the BNO055. Perhaps a clock frequency is not set correctly (i didn’t checked the datasheet)
2025-08-19 2:28 PM
>>..but still no data appears on the serial monitor.
Debug the problem..
Output something earlier and more directly.
Inspect RCC, UART and GPIO registers for consistency. In code you have that works, and code that doesn't.
Instrument Hard Fault and Error Handler, so you can see if it gets stuck in while(1) loop in those.
2025-08-24 1:09 AM
I found the cause of the problem. The COM3 pin of the BNO wasn’t soldered properly and was left floating. Because of that, the I²C address was set to 0x40 which is the HID I²C address. After resoldering the pin, the issue was resolved. Thanks to everyone who helped.