I2C_Example giving CY_U3P_ERROR_TIMEOUT

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

cross mob
BoeufHomard
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hello,

I'm currently discovering the EZ-USB development kit along with the CPLD board, following the SuperSpeed Device Design By Example book, and I wanted to play a bit with the I2C_Example that is provided, by adding LED command to control the LEDs of the CPLD through TeraTerm. I haven't managed to make it works for reasons, but the thing that is annoying me is that when I got back to the I2C_Example provided (so untouched), I now get this on the console: 

ConsoleOutEnabled Successful
CyU3PUartRxSetBlockXfer Successful
CreateDebugRxDmaChannel Successful
ConsoleInEnabled Successful
Debug Console Initialized Successful
CyU3PI2cInit Successful
CyU3PI2cSetConfig Successful
I2C_Init Successful
LEDs = 170,
I2C_Write failed, 69 = CY_U3P_ERROR_TIMEOUT

I2C_WaitForAck failed, 69 = CY_U3P_ERROR_TIMEOUT
0, 170:
I2C_Read failed, 69 = CY_U3P_ERROR_TIMEOUT

It was working fine before and now I get that Timeout error everytime on the example that was working, so i really don't understand what is going on here. Does anybody had  any ideas to unblock the situation ? 

Thanks,

BH

0 Likes
7 Replies
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello BH,

can you please provide an example code path which are you using from SDK?

Best Regards,
Biren

0 Likes

Hi Biren,

The example doesn't come from the SDK but from examples from the SuperSpeed Device Design By Example book, the path is SuperSpeed Design Examples V1.2.1\FX3 Firmware Projects\I2C_Example

Regards,

BH

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello BH,

I suspect maybe your CPLD board is not currently program so you get an I2C timeout can you first check if the CPLD board is currently programmed or not?
the second thing is you can get an I2C trace using any datalogger, you can send this datalogger trace here, we can verify it.

Best Regards,
Biren

0 Likes

Hi,

Is there a way to be sure that the CPLD is programmed ? I followed the instructions in the Chapter5, using SendFile utility to program the CPLD and the SendFile utility doesn't find the CPLD. I then foolowed the instructions at the end of the book, and it looks like it is program but whe i load the I2C_example I still have the same issue.

I'll see to get the i2c trace

Thanks,

BH

 

0 Likes

I believe that by using the ProgramCPLD I have been able to program the CPLD,  however, i still have the timeout errors.

Regarding the datalogger do you have a step by step guide for the datalogger ? I am a bit of a newbie, and i don't really know how to retrieve the i2c trace...

Thanks.

BH

 

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

HI BH,

For a data logger, you can use any logic analyzer and connect the channel to the SDL SCL line and capture it from the start of MCU to until timeout error.

And to program CPLD please follow page 100 in John Hyde Book Version 1.15. and please check the note on page 94 in case you miss this.

Best Regards,
Biren

0 Likes

Hi Biren,

Just an update, I haven't been able to use a datalogger yet, but i found something that could be interesting, i have the timeout error only when using a terminal. I tried lauching the I2C_example without using teraterm (or clearterminal) and the example works, i can turn on and off LEDs from the switches from the CPLD. Using a terminal directly leads to the timeout error.

I don't know if it can help in the resolution on this issue but here is the update :).

 

BH

0 Likes