Test I2C on CY8CKIT-059 5LP

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

cross mob
lock attach
Attachments are accessible only for community members.
joli_601446
Level 5
Level 5
10 likes given 10 sign-ins 5 sign-ins

Hello, I am working on my first I2C program and am running into a brick wall. Here is a snippet of my code:

int main()

{

   

     I2CM_Start();

     CyGlobalIntEnable;

     WriteCommandPacket(1);

     return 0;

}

uint32 WriteCommandPacket(uint8 cmd)

{

     uint8 buffer[3];

     buffer[0] = 1;

     buffer[1] = 1;

     buffer[2] =  0x17u;

     I2CM_MasterReadBuf(I2C_SLAVE_ADDR, buffer, PACKET_SIZE, I2CM_MODE_COMPLETE_XFER);

     while(0u == (I2CM_MasterStatus() & I2CM_MSTATE_WR_CMPLT)

     (

          // code to toggle the led on the PSOC5 Kit

      )

    

     Here is a picture of my setup:

IMG_4152.JPG

So I thought I would run the Bridge Control Panel and try reading 3 bytes but it doesn't work:

BridgeControl.jpg

I should be getting back +'s on the response.

I will upload my project which will be easier to look over.

Thank you very much,

Joe

0 Likes
1 Solution

You have to select Kitprog.

View solution in original post

0 Likes
10 Replies
LiDo_2439176
Level 5
Level 5
First question asked 50 replies posted 50 sign-ins

Hi,

It is a hardware problem.

When you broken prototyping kit into two parts you lose i2c and uart connections.

The five pins on the left are only for programming.

Below you can see the UART connection that no longer exists after the separation.

pastedImage_1.png

You have to use the pins in the picture below.

pastedImage_2.png

Best regards,

Liviu

0 Likes

Hello, thank you for the quick response and that crucial bit of information. I have tried using an complete PSOC5 KIT and when I connect within the Bridge control the Protocol only has UART selected.

BridgeControl_pic2.jpg

Above is a screen shot. I looks like that I am able to connect but the RX8(UART) is selected. Any ideas what I may be doing wrong?

Thank you very much,

Joe

0 Likes

You have to select Kitprog.

0 Likes

Hello, it appears that my PSOC5 Kit needs a firmware update. Here is the error I get when I click on KitProg:

Failed Connect to KitProg/131C0618001E6400. KitProg version Expecting 2.18, but found 2.11.

To update your firmware please close Bridge Control Panel and open PSoC Programmer.

Navigate to the Utilities tab and click upgrade firmware.

I'll have to try that at home and get back with you tomorrow.

Thanks,

Joe

0 Likes

I took the PSOC5 kit home and I was running BridgeControlPanel 1.18 on my home computer and was able to connect to the kit. I thought the error message that I posted meant that I needed to update the firmware on the kit which I did, if I'm correct.

When I try to connect the kit at work (this morning) that is running 1.16 I still get the same error message. Is the real problem with the version (1.16) that I'm running at work that is unable to connect to the kit?

0 Likes

Bridge Control Panel 1.16.0 require the firmware version 2.18.

Bridge Control Panel 1.18.0 require the firmware version 2.20.

So, the problem is not Bridge Control Panel 1.16.0, is the firmware version.

Try to update firmware with PSoC Programmer on the same computer with Bridge Control Panel 1.16.0.

0 Likes

My work computer is not connected to the internet. Could I try again at my home computer using PSoC Programmer?

0 Likes

I just tried using my work computer's PSoC Programmer. Here is a screenshot:

PSocProgrammerView.jpg

I believe it is saying that the firmware on the PSoC Kit is 2.11. What do you recommend?

Thanks,

Joe

0 Likes

I upgraded my firmware and upgraded to PSoC Creator 4.2 and all is working. Thank you very much for all your help.

You're welcome.

0 Likes