I2C on BCM9WCD5EVAL1_3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Trying to hook up an accelerometer over I2C on the BCM9WCD5EVAL1_2 board.

1. I could not find any header pins where the I2C signals come out.

2. It seems like the IO on this board is at 3V, is there any way to set it up to be 1.8V ?

3. Is this the right sequence to setup I2c

   wiced_i2c_device_t accel =

        {

            .port          = WICED_I2C_1,

            .address       = 0x1d,

            .address_width = I2C_ADDRESS_WIDTH_7BIT,

            .flags         = 0,

            .speed_mode    = I2C_HIGH_SPEED_MODE,

        };

    wiced_i2c_init(&accel);

    if (wiced_i2c_probe_device(&accel, RETRIES) != WICED_TRUE)

       WPRINT_LIB_INFO( ("I2C device not found\n") );

4. Looking through the examples I could not find a way to do a write_read over i2c

    - I saw a wiced_i2c_read and wiced_i2c_write api, but no write_read

5. Is this how would do a write_read ?

    static wiced_i2c_message_t msg[2];

    /* Some I2C masters might not support combined messages. */

    /* Reset device's register counter by issuing a TX. */

    WICED_VERIFY( wiced_i2c_init_tx_message( &msg[0], &reg, sizeof(reg), I2C_XFER_RETRY_COUNT, I2C_DISABLE_DMA ) );

    /* Initialize RX message. */

    WICED_VERIFY( wiced_i2c_init_rx_message( &msg[1], value, sizeof(*value), I2C_XFER_RETRY_COUNT, I2C_DISABLE_DMA ) );

    /* Transfer. */

    return wiced_i2c_transfer( device, msg, ARRAYSIZE( msg ) );

Sajid

0 Likes
2 Replies
Anonymous
Not applicable

seyhan​  abirjepatil​  vik86

guys any update on this : specifically getting the IO rail on 1.8V.

0 Likes
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

1. I could not find any header pins where the I2C signals come out.

J3 has I2C signals brought out

2. It seems like the IO on this board is at 3V, is there any way to set it up to be 1.8V ?

Presently you would have to use the level shiftter to set it up 1.8V

3. Is this the right sequence to setup I2c

I2C Interface Example with WICED SDK-3.x

Does this blog help you ?

thnx

vik86

0 Likes