Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB low-full-high speed peripherals Forum Discussions

Ivan_Lee
Level 5
Level 5
5 likes given 100 sign-ins First like received

Hi, Sir,

1. Does CY7C65211A support "I2C - Repeart Start" ?

 

2. and how to generate the “repeated START” with the CY7C65211A?

could you please provide sample code?

https://www.i2c-bus.org/repeated-start-condition/ 

0 Likes
1 Solution
Meghavi
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 10 likes received

Hi Ivan,

CY7C65211A supports repeated start condition. 

Kindly let us know which OS you are using.

Regards

View solution in original post

0 Likes
5 Replies
Meghavi
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 10 likes received

Hi Ivan,

CY7C65211A supports repeated start condition. 

Kindly let us know which OS you are using.

Regards

0 Likes
Ivan_Lee
Level 5
Level 5
5 likes given 100 sign-ins First like received

Hi, Meghavi,

 

    The OS is Linux (kernel 4.12, 4.19 and 5.4).

BR

Ivan

0 Likes
Ivan_Lee
Level 5
Level 5
5 likes given 100 sign-ins First like received

Hi, Meghavi,

1. How to how to generate the “repeated START” with the CY7C65211A?

2. how to configure CY7C65211A to “Mode = I2C and Protocol = Vendor / CDC” and “PID = 0x0004”.

   i can't select"Protocol to CDC" when "Mode is I2C" by USB-Serial configuration utility.

65211A.png

0 Likes
Ivan_Lee
Level 5
Level 5
5 likes given 100 sign-ins First like received

Hi, Meghavi,

I am try to generate the “repeated START”.

i don't know why it has big time gap (74ms) between write packet and read pack.

Is it correct  "repeated START” ?

 

//Initialize the CY_I2C_DATA_CONFIG variable

    cyI2CDataConfig.isStopBit = false;

    cyDatabuffer.length = 2;   

 

    rStatus = CyI2cWrite (cyHandle, &cyI2CDataConfig, &cyDatabuffer, 5000);

    if (rStatus != CY_SUCCESS){

        printf ("CyI2cWrite Failed ...retrying %d \n", rStatus);

        return rStatus;

        }

 

//Initialize the CY_I2C_DATA_CONFIG variable

    cyI2CDataConfig.isStopBit = true;

    cyI2CDataConfig.isNakBit = true;

 

    intError = 0;

    memset (bufferRead, 0, 64);

 

    rStatus = CyI2cRead (cyHandle, &cyI2CDataConfig, &cyDatabuffer, 5000);

ReStart.png

0 Likes
MallikaK_22
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 250 replies posted

Hi,

Apologies for the delay in my response.

Yes, this seems correct. After the write operation, the read operation began without the STOP condition. 

Also, can you share screenshots from USB configuration utility when you are trying to configure in CDC.

Regards,

Mallika

0 Likes