- 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
- Labels:
-
PSoC 4 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using J6 header and I2C_SCL and I2C_SDA pins in CYBT-352027 EVAL kit. I have highlighted in below Image
Sorry, we don't have CYBT-353026 EVAL kit to test with.
Thanks,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Still waiting on this, Any suggestions?
Thanks,
Pratik