Community news, upcoming events and general discussions
Threads: 34 Posts: 86
Get technical support from the community
Threads: 1302 Posts: 7139
Threads: 16 Posts: 58
Tell us how to make XDK better!
Threads: 35 Posts: 117
Share and discuss community member projects
Threads: 74 Posts: 325
I'm using workbench 3.5.0 the example project XdkExtensionPort, i'm trying to use the I2C feature to communicate with BNO055, after connecting the SDA and CLK line result in voltage drop at SDA & CLK line from the BNO055, therefore xdk failed to communicate with BNO055. Please help, what should I check on?
in order to help you with your problem I might require some additional informatio. So could you please go more in detail about your programm structure on the XDK for the mentioned use case?
Also a code snippet of the relevent function for I2C communication would be helpfull.
Hello Christian, Thankyou for responding, I'm using this XDk example project:
Retcode_T retcode = RETCODE_OK;
uint8_t getChipIdData = 0U;
uint8_t getI2cData = 0U;
uint8_t setI2cData = EXT_PORT_I2C_REG1_VAL;
retcode = ExtensionI2cExample_Read(EXT_PORT_I2C_SLAVE_ADDR, EXT_PORT_I2C_REG2_ADDR, &getChipIdData, UINT8_C(1));
if (RETCODE_OK == retcode)
if (EXT_PORT_I2C_REG2_VAL != getChipIdData)
retcode = RETCODE(RETCODE_SEVERITY_ERROR, RETCODE_UNEXPECTED_BEHAVIOR);
else printf("%x::failed read i2c...\n", getChipIdData);
and all the code as written in XDKExtensionPort project sample from XDk workbench 3.5.0, the wiring I use is by giving adafruit BNO055 3,3dcv, then the SDA/SCL line from BNO055 go through level shifter 3,3dcv to 2,5dcv. The code console print result is "0::failed read i2c...", then I check on the line voltage, both the voltage at pin of SDA/CLK of XDK extensio port and BNO055 is only around 1,7vdc.
Since I'm new at this i2c line i got confuse with the configuration step, wehter the sda/clk of xdk already setup to open drain mode or not. Please help / example to make it work the i2c line...thank you..
Hi Visit Silmi
Is Vcc and ground connected?
Try connecting the Vcc to 3.3V in extension board and check.
Check the below connections in the image
In this BMA280 is used instead of BNO055 .
I would assume the level shifter is causing the problem with voltage dropping. An I2C bus is always connection with pull-up resistors on both lines. The corresponding pins of the XDK have these pull-up resistors already internally connected. If you put a level shifter between sensor and XDK you have to add pull-up resistors on the sensor side manually.
I also had a short look on the datasheet of the bno055 sensor. It seems the sensor operates on a supply voltage of 2.4 to 3.6 Volt. So i think the level shifter is in your use case unnecessary. You could try to connect the 2.5 Volt power supply pin from the XDK with your sensor directly.
Hi Cristian, thank you for responding,
I'm using the module of adafruit BNO055, which is there is already pull up resistor for both sda and clk line inside the module, and the adafruit module working range is 3,3v to 5vdc. considering that xdk already has built in pull up resistor at sda and clk line, should i assume that this is not possible for me to use this adafruit BNO055 module with xdk, because will be resulting in voltage devider? Thank you, best regard, visit