ExtensionI2cExample.h
응답
19. 5. 15 오전 4:25

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?

Thank you,

0 (0 투표)
RE: ExtensionI2cExample.h
응답
19. 5. 15 오전 9:38 as a reply to Visit Silmi.

Hello Visit,

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.

Best regards,

Christian

0 (0 투표)
RE: ExtensionI2cExample.h
응답
19. 5. 16 오전 1:07 as a reply to Christian Köhler.

Hello Christian,
Thankyou for responding,
I'm using this XDk example project:

BSP_ExtensionPort_Connect();
ExtensionI2cExample_Initialize(AppCmdProcessor);
Retcode_T ExtensionI2cExample_ValidateChip(void)
{
    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)
    {
        printf("step 1...\n");
        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..

Bers regard,

Visit

0 (0 투표)
RE: ExtensionI2cExample.h
응답
19. 5. 16 오전 5:28 as a reply to Visit Silmi.

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 .

Thanks

Priyashi

0 (0 투표)
RE: ExtensionI2cExample.h
응답
19. 5. 16 오후 1:02 as a reply to Priyashi Yadav.

Hello Visit,

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.

Best regards,

Christian

0 (0 투표)
RE: ExtensionI2cExample.h
응답
19. 5. 20 오전 8:20 as a reply to Christian Köhler.
Hi Priyashi, Thank you for responding,
yes, i already make sure to connect the vcc & gnd, and sda & clk. may I ask you a question, is your module BMA280 in your last post operating in 2,5vdc? and there's no pull up resistor both at the sda and clk line inside the module?
0 (0 투표)
RE: ExtensionI2cExample.h
응답
19. 5. 20 오전 8:24 as a reply to Visit Silmi.

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

0 (0 투표)