Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
Anonymous
Not applicable

Hey All,

   

 

   

     I am using PSoC Creator 4.0 for the CYBLE-014008-00  and I have an I2C bus set up on pins 1.4 and 1.5 which is SCB0.  I am pretty new to PSoC but when I set up an O-Scope on all pins and run the example project SCB_I2cCommMaster01 code, I don't even see a clock signal, and it gets hung up here:

   

 

   

 /* Waits until master completes write transfer */
    while (0u == (I2CM_I2CMasterStatus() & I2CM_I2C_MSTAT_WR_CMPLT))
    {
    }

   

 

   

I think i am missing something, but for the life of me, I can't figure out what it is.

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

What values have your I2C pull up resistors?

   

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Sure thing.  The project files are attached.  I am using 4.7k pull ups.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

    (void) I2CM_I2CMasterWriteBuf(I2C_SLAVE_ADDR, buffer, PACKET_SIZE, \

   

This function returns an error-code which you should check for non-zero at least during test. This will help you in identifying the cause of a not-working interface.

   

 

   

Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Try to overcome a forum error, so more than one part in the message:

   

 (I2CM_I2CMasterGetWriteBufSize() == BUFFER_SIZE)

   

 I suspect that this might go wrong at second run, because the WriteBufSize is never reset.

   

 You probably wont  see your green LED when successful, because you clear it without a delay.

   

Bob

0 Likes
Anonymous
Not applicable

Sigh,  Turns out it was a really silly Layout mistake.  footprint of a component was wrong.  I was getting the Master bus Busy Error and decided to confirm the footprint of the I2C Slave device.  Yup....It was wrong.  Thanks for the help, and congrats on your 10000th post 😉

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Thank you !

   

 

   

Bob

0 Likes