Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

pratik0403
New Contributor II

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

0 Likes
5 Replies
SheetalJ
Moderator
Moderator

Hi Pratik,

We have had some similar queries in past. I would like to suggest you to go through following posts and check if it works for you. Note that  CYW20706 chip can only act as i2c master.

Question problem i2c CYW20706 & CYBT-343026-eval  

I need Help I2C create sample code cybt343026  

CYW20706 Can I use i2c and PUART(rx,tx,rts,cts) at them same time? 

0 Likes
pratik0403
New Contributor II

Hi Sheetal,

Yes, we have configured as I2C master only. We have already gone through above mentioned posts but that didn't help.

The main problem here is, once we start sending data over I2C, we can't see clock on SCL line. Instead it shows only pulse and on SDA line we don't see anything

 

Thanks,

Pratik

0 Likes
SheetalJ
Moderator
Moderator

Can you once confirm if you are using the correct pins? Also, if you have a CYBT-343026_eval module, can you try testing with that once?

 

0 Likes
pratik0403
New Contributor II

I am using J6 header and I2C_SCL and I2C_SDA pins in CYBT-352027 EVAL kit. I have highlighted in below Image

test.png

Sorry, we don't have CYBT-353026 EVAL kit to test with.

 

Thanks,

Pratik

0 Likes
pratik0403
New Contributor II

Still waiting on this, Any suggestions?

Thanks,

Pratik

0 Likes