PSoC 4 CapSense Tuner - There was an error reading data from the device

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.
Anonymous
Not applicable

I am using PSoC creator with CY8C4024LQI-S411 and two capsense buttons. I based my code off of example code and changed it to match my pinout. I am unable to connect to the tuner application and keep getting "There was an error reading data from the device." I have made sure that the EZI2C scl, sda pins are going to the right place, matched the config parameters for the tuner and EZI2C, read countless discussion threads from people with the same problem, all with no luck.

Attached is my workspace, does anyone have any ideas what could be the problem? I am programming with a MiniProg3.

0 Likes
1 Solution

Make sure that the I2C configurations are the same.  In your project double click on the component and see what the data rate data is (100, 400 or 1000 kbps.  In the bridge control panel, go to tools ---> protocol configuration --> I2C and set it to match the component speed.  Then try list again.  If you don't see any devices, then your I2C signals are not selected correctly.  You project worked fine for me, so the component is being initialized properly.

pastedImage_0.png

View solution in original post

0 Likes
9 Replies
MiRo_263836
Level 5
Level 5
100 replies posted 50 likes received 50 replies posted

I got your project working on a CY8CKIT-145 board.  I had to change the device to a CY8C4045AZI-483 to get the I2C connections from the P4000S to the kit prog. (P1.1 and P1.0 - not available on the 4025LQI in your project) since it is the USB-I2C bridge required for the tuner.  It is communicating with the tuner fine.

pastedImage_0.png

You say that you are programming the device with the Miniprog.  You have to move the Miniprog connections to the I2C port to get the tuner to work.  The Miniprog can be a programmer or  a USB to I2C bridge, which is what you need to see the tuner.  The Kitprog on the -145 board is the USB to I2C bridge.  You can't view the tuner through the SWD port (programming port).

You need to connect 4.1 and 4.0 on your 4024 to the I2C SDA and SCL on the Minprog and you will need GND.

Can you attach a picture of your setup?

0 Likes
Anonymous
Not applicable

Thank you for your response! Unfortunately I can’t share a picture of the layout, but the miniprog I am using has an attachment board that switches from SWD port to the I2C port so that shouldn’t be the problem. I have SDA, SCL, and GND connected.

0 Likes

When connected to the I2C signals on the Miniprog3, you should be able to see the target in the Bridge Control panel and find out its address.  You should see a Miniprog3 in the the lower window.  You should connect and power. Then click on List.  It will display the address of all the devices on the I2C bus.  If you don't see any devices, then your I2C signals are not correct. You have to be set up for the correct data rate.  I think your project with 400Khz.  You can double check by double clicking on the EZI2C component in your project.

This is what I do to debug I2C issues.  You should put a scope on SDA and SCL to make sure that they are being pulled up.

pastedImage_0.png

0 Likes
Anonymous
Not applicable

How do I get the Bridge Control Panel?

0 Likes

It gets installed with Creator.  If you go to the Windows Start Menu and scroll to the Cypress tab, you will find it near the top of the list.

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

Alright I get this:

So I2C is not working. I verified that SDA and SCL are being pull-up correctly. I ran the exact same sketch on a CY8C4127AZI-S445 and the tuner worked fine.

0 Likes

Make sure that the I2C configurations are the same.  In your project double click on the component and see what the data rate data is (100, 400 or 1000 kbps.  In the bridge control panel, go to tools ---> protocol configuration --> I2C and set it to match the component speed.  Then try list again.  If you don't see any devices, then your I2C signals are not selected correctly.  You project worked fine for me, so the component is being initialized properly.

pastedImage_0.png

0 Likes
Anonymous
Not applicable

Turns out the board layout was wrong (SCL/SDA was swapped) Thanks for your help!

0 Likes

Great. I thought that it was something like that!  Now you know how to debug an I2C port.  Glad that I could help.

0 Likes