- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are using CYBT-353027 EVAL for communicating with I2C slave device. So, configuring CYBT-353027 EVAL as an I2C master. But, we are not able to communicate with I2C slave device.
While observing waveform over logic analyzer, we found that clock(SCL) is not generated properly. The frequency observed in waveform is not actually clock but just a pulse.
we are setting frequency using "wiced_hal_i2c_set_speed()" API.
Can you please suggest what should be done to resolve this? I have also attached are the screenshots from logic analyzer.
Below is the snippet of code we are using for I2C communication
-----------
#include "wiced_hal_i2c.h"
#define I2C_SLAVE 0x10
UINT8 status = 0xFF;
UINT8 data[2] = {0xAA,0x55};
UINT8 data_read[3];
enum
{
I2CM_SPEED_100KHZ = 240,
I2CM_SPEED_400KHZ = 60,
I2CM_SPEED_800KHZ = 30,
I2CM_SPEED_1000KHZ = 24,
};
// For Initializing I2c as master
wiced_hal_i2c_init(WICED_I2C_SDA_I2S_DOUT_PCM_OUT_SCL_I2S_DIN_PCM_IN);
// Set Speed
wiced_hal_i2c_set_speed(I2CM_SPEED_100KHZ);
// To write data to slave
wiced_hal_i2c_write((UINT8 *)&data,sizeof(data), I2C_SLAVE);
// To read data from slave
wiced_hal_i2c_read((UINT8 *)&data_read,sizeof(data_read), I2C_SLAVE);
Thanks,
Pratik