You are here

Problems with PSOC 4 SCB I2C | Cypress Semiconductor

Problems with PSOC 4 SCB I2C

Summary: 8 Replies, Latest post by Stefano Amato on 21 Sep 2016 05:11 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
NilsMinor_1487056's picture
User
7 posts

Hi Folks,

i have some trouble in getting the PSOC4 working as expected. My target is to read out the data of a Current and voltage sensor (max78630) and for that i am using I2C (SCB I2C Master). The software was working but i do not know what happend, but now my I2C communication seems to not work correct anymore. The crazy thing is that my software do't show any behaviour when i disconnect the I2C sensor, no error. Also what crazy is, the sensor address is 3, but when I scan, the sensor answers at address 15, that doesen't make sense to me, I really appriciate every hint :)

 

best regards,

Nils

user_242978793's picture
User
1201 posts

You are missing <stdio.h> in your main.c and also the debug.c this caused a lot of warnings also go to Project tab and select build settings and set the sprint settings.  I don't have the device you are using.  The board compiled with no errors after the stdio fixes.

NilsMinor_1487056's picture
User
7 posts

Hi,

thanks for your answer, I changed the things you have mentioned but nothing changed. So I measured the signal an an Arduino (where it was working) and on the PSOC doing the same routine, reading out data from the sensor. An Arduino you can see first writing the slave address (3) and then the register (also 3) an the device ancwers. But on the PSOC the behavior is bit crazy, the sensor does not ack the address of it.

 

From Arduinio:

 

From PSOC: 

user_242978793's picture
User
1201 posts

I guess you have pull up resistors on the I2C signals.

user_242978793's picture
User
1201 posts

Increase the heap size from 0x080 to 0x800 and see if that helps. It is  in the system part of the .cydwr file.

NilsMinor_1487056's picture
User
7 posts

Yes like it is recommended in the datasheet i have Pull-Ups on SDA and SCL, isn't that normal for I2C?

Changed the Heap-size but the software has the same output. 

RichardNV's picture
User
12 posts

The waveforms show something wrong for SCL,  it is <1.5V, SDA is > 3.3V, you need fig out what's wrong for hardware.  

RichardNV's picture
User
12 posts

Oh, I count wrong, the SCL is worse < 0.4V!

Stefano Amato's picture
Cypress Employee
3 posts

Could it be the probe x10 ?

Log in to post new comments.