cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

shvo_3974456
New Contributor

Hi,

My self shailesh.

I have attached product number and just want to verify weather it's cypress semi conductor product or not.

Because since 1 week I am trying to do the programming but some time I am getting Device Busy , Time out etc issues.

So to resolve that I did download HX3 Blaster Plus software for firm ware reset but unfortunately system could not detect it. I have connected through USB port.

Just for your reference I am using cyUsbSerial.dll for programming so please help me to resolve this issue because it really stuck everything at my side and unable to resolve the issues.

Here are the steps of programming which I have done in vc++

1) CyOpen((unsigned char)0, (unsigned char)0, &mHandle) -> Return CY_SUCCESS

2)

int Read(UCHAR slaveAddress7bit, UCHAR *buf, UINT32 len)

{

CY_I2C_DATA_CONFIG* dataConfig = new CY_I2C_DATA_CONFIG();

CY_DATA_BUFFER* readBuffer = new CY_DATA_BUFFER();

UCHAR *num = new UCHAR[len];

memset(num, 0, len);

dataConfig->slaveAddress = slaveAddress7bit;

dataConfig->isStopBit = (BOOL)TRUE;

dataConfig->isNakBit = (BOOL)TRUE;

readBuffer->buffer = num;

readBuffer->length = (UINT32)len;

CY_RETURN_STATUS cyReturnStatus = LTRead(mHandle, dataConfig, readBuffer, 5000U);

memcpy(buf, num, len);

delete num;

num = NULL;

readBuffer->buffer = NULL;

return (int)cyReturnStatus;

};

LTRead(CY_HANDLE handle, CY_I2C_DATA_CONFIG * dataConfig, CY_DATA_BUFFER * readBuffer, UINT32 timeout)

{

typedef CY_RETURN_STATUS(*pCyReadFn)(CY_HANDLE, CY_I2C_DATA_CONFIG*, CY_DATA_BUFFER*, UINT32);

{

pCyReadFn pCyRead;

pCyRead = (pCyReadFn)GetProcAddress(hinstLibcyusbserial, "CyI2cRead");

if (NULL != pCyRead)

{

return pCyRead(handle, dataConfig, readBuffer, timeout);

}

else

{

MessageBox(NULL, TEXT("CyI2cRead function not found"), TEXT("DLL ERROR"), MB_OK | MB_ICONERROR);

}

}

};

3)

int Write(UCHAR byteSlaveAddres7bit, UCHAR *buf, UINT32 len)

{

CY_I2C_DATA_CONFIG* dataConfig = new CY_I2C_DATA_CONFIG();

CY_DATA_BUFFER* writeBuffer = new CY_DATA_BUFFER();

UCHAR *num = new UCHAR[len];

memset(num, 0, len);

memcpy(num, buf, len);

dataConfig->slaveAddress = byteSlaveAddres7bit; //0x51

dataConfig->isStopBit = (BOOL)TRUE;

writeBuffer->length = (UINT32)len;

writeBuffer->buffer = num;

CY_RETURN_STATUS cyReturnStatus = LTWrite(mHandle, dataConfig, writeBuffer, 5000U);

delete num;

num = NULL;

writeBuffer->buffer = NULL;

return -1 * (int)cyReturnStatus;

};

CY_RETURN_STATUS LTWrite(CY_HANDLE handle, CY_I2C_DATA_CONFIG *dataConfig, CY_DATA_BUFFER *writeBuffer, UINT32 timeOut)

{

typedef CY_RETURN_STATUS(*pCyWriteFn)(CY_HANDLE, CY_I2C_DATA_CONFIG*, CY_DATA_BUFFER*, UINT32);

{

pCyWriteFn pCyWrite;

pCyWrite = (pCyWriteFn)GetProcAddress(hinstLibcyusbserial, "CyI2cWrite");

if (NULL != pCyWrite)

{

return pCyWrite(handle, dataConfig, writeBuffer, timeOut);

}

else

{

MessageBox(NULL, TEXT("CyI2cWrite function not found"), TEXT("DLL ERROR"), MB_OK | MB_ICONERROR);

}

}

};

// In Below Function , int num1 =  Write((BYTE)27, writeBuffer, len1); ===> at this line execution some time getting CY_ERROR_I2C_DEVICE_BUSY and some time CY_ERROR_IO_TIMEOUT

//  int num2 = Read((BYTE)27, readBuffer, len2); ===> at this line execution some time getting CY_ERROR_I2C_NAK_ERROR

I have updated my usb cabel , so many times restarted my hardware and my laptop. but every time only one out put from write -> CY_ERROR_I2C_DEVICE_BUSY 

int GetLedOnOff( bool* outLedEnableRed,bool* outLedEnableGreen,bool* outLedEnableBlue)

{

int len1 = 1;

int len2 = 1;

BYTE *writeBuffer = new BYTE[1];

BYTE *readBuffer = new BYTE[1];

ZeroMemory(writeBuffer, (sizeof(BYTE) * 1));

ZeroMemory(readBuffer, (sizeof(BYTE) * 1));

InitLog(READ, READ_LED_ENABLE, (BYTE)27);

*outLedEnableRed = *outLedEnableGreen = *outLedEnableBlue = false;

writeBuffer[0] = (BYTE)83;

int num1 =  Write((BYTE)27, writeBuffer, len1);

if (num1 < 0)

{

GetLog() += " (Fail)";

return num1;

}

int num2 = Read((BYTE)27, readBuffer, len2);

if (num2 < 0)

{

GetLog() += " (Fail)";

return num2;

}

*outLedEnableRed = ((int)readBuffer[0] & 1) == 1;

*outLedEnableGreen = ((int)readBuffer[0] & 2) == 2;

*outLedEnableBlue = ((int)readBuffer[0] & 4) == 4;

AppendLogRecv(readBuffer);

DeleteBuffer(readBuffer, writeBuffer);

return num2;// valuesBool{ outLedEnableRed,outLedEnableGreen,outLedEnableBlue,num2 };

//return num2;

};

So please help me to identify or resolve the issues.

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator

Hello Shailesh,

CY7C65215 is a Cypress USB-Serial device which can be used as a bridge between USB and UART/I2C/SPI. Please use the Cypress USB-Serial Configuration Utility that comes along with the USB-Serial SDK to configure the device. In order to perform data transfers with the device, you can refer to the example applications that come along with the SDK.

Best regards,

Srinath S

View solution in original post

8 Replies
SrinathS_16
Moderator
Moderator

Hello Shailesh,

Please mention the MPN of the IC being used in your design.

Best regards,

Srinath S

0 Likes
shvo_3974456
New Contributor

IC1.jpgIC2.jpgThanks for the answer.

Here are the attached image of my board but I could not find anything so please check it and If you need any other thing then let me know.

0 Likes
SrinathS_16
Moderator
Moderator

Hello Shailesh,

Please look for the part number mentioned on the IC without which it will not be possible to identify if it is a Cypress product.

Best regards,

Srinath S

0 Likes
shvo_3974456
New Contributor

Please find the attached image for product no.

if this is not right then let me know I will again check and let you know.CypressNo.jpeg

0 Likes
SrinathS_16
Moderator
Moderator

Hello Shailesh,

These numbers do not correspond to any Cypress IC MPNs.

Best regards,

Srinath S

0 Likes
shvo_3974456
New Contributor

Thank for the answer.

We tried to contact our vendor , but they have new year holiday , so once they will be available then will let you know the exact number and board information.

once again , thanks for the support.

0 Likes
shvo_3974456
New Contributor

Hi,

Sorry for the late reply but I just got a model no from my vendor and it's CY7C65215-32LTXI

0 Likes
SrinathS_16
Moderator
Moderator

Hello Shailesh,

CY7C65215 is a Cypress USB-Serial device which can be used as a bridge between USB and UART/I2C/SPI. Please use the Cypress USB-Serial Configuration Utility that comes along with the USB-Serial SDK to configure the device. In order to perform data transfers with the device, you can refer to the example applications that come along with the SDK.

Best regards,

Srinath S

View solution in original post