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