cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

harelTur
New Contributor II

Hi 

I try to init I2c and I dont see any signal of clock of I2c 

My code : 

static const wiced_i2c_device_t BARO_I2C =
{
.port = BARO_I2C_PORT,
.address = BARO_I2C_ADDRESS,
.address_width = I2C_ADDRESS_WIDTH_7BIT,
.flags = 0,
.speed_mode = I2C_STANDARD_SPEED_MODE,
};

 

 

static void BARO_InitHw(void)
{
wiced_result_t res;
/* Initialize I2C */
if ( wiced_i2c_init( &BARO_I2C ) != WICED_SUCCESS )
{
BARO_LOG_ERROR_MSG("BARO I2C init failed\n");
}
else
{
BARO_LOG_DEBUG_MSG("BARO HW : I2C init success \n");

/* Probe I2C bus for temperature sensor */
if( wiced_i2c_probe_device( &BARO_I2C, 3 ) != WICED_TRUE )
{
WPRINT_APP_INFO( ( "Failed to connect to baro device; addr 0x%x\n", BARO_I2C.address ) );

return;
}
else
{
WPRINT_APP_INFO( ( "success to connect to temperature device;\n" ) );

}
}

}

My loger print :

14:49:47.701 [RX] - 0125 00:01:26.962 [#ERROR#|BARO | 299] Couldn't read Barometer. res=2, id=0x1C

 

 

When my HW connection:

*I use  EVB: Sterling EWB development KIT of Cypress 

 

#define BARO_INT_GPIO /*WICED_GPIO_PC4 */ WICED_GPIO_PB12
#define BARO_I2C_SCL WICED_GPIO_PB6
#define BARO_I2C_SDA WICED_GPIO_PB7
#define BARO_I2C_PORT WICED_I2C_1
#define BARO_I2C_ADDRESS BAROMETER_ID

SCL - PB6

SDA - PB7

 

I don't see any sugnal of clock

 

 

 

0 Likes
2 Replies
harelTur
New Contributor II

This is my log : 

Failed to connect to baro device; addr 0xb1

0 Likes
DheerajPK_41
Moderator
Moderator

Hi,

Sorry we have missed your query.

May I know which chip are you using? Is it CYW20706?

Thanks,

-Dheeraj

0 Likes