- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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], ®, 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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