Debugging Capsense and Manually tunning

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

cross mob
Anonymous
Not applicable

Hi,

   


Can someone please walk me through debugging and manual tuning steps?

   

 

   

We are using 8C4014 for trackpad application. The issue which we are facing is that if we click left 10 times and immediately click down button then it is still taken as left. With enough pause between clicking left and down is given then we dont see this issues. As are our reading capsense is reporting that finger is still on left area of track pad and hence we take it as left. I am sure that this problem is due to capsense.

   

So, please answer the following question:

   

1. How to debug this further?

   

2. What debugger is required? I know old PSOC will give all the data is we ground the cap sense pin, can i still use that?

   

3. How to manually tune the device?

   

Regards

   

Pankaj Katiyar

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

Welcome in the forum, Pankaj.

   

Tuning needs an EzI2C interface on your PSoC and allows you for setting the parameters in capsense. You will need a MiniProg3 or (much cheaper) a KitProg which is the snap-off part of a CY8CKIT-043 Prototyping Kit

   

Both allow for debugging and tuning, but not at the same time. Look for example project on Creator start page for tuning.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks Bob,

   

 

   

I assume Kit-Prog will connect via I2C to chip on my board and will allow me to get/set tuning parameter.

   

 

   

Pankaj

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

That's right. Oly downgrade I know when KitProg is used: The supply is 5V which is ok for the PSoC, but might be a problem for peripherals.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I have received two EVM kit. CY8CKIT-040 and Kitprog with USB breakout.

   

I have some difficulty with running I2C project on CY8CKIT-040 that i have posted on different forum. Now to get started with Kit-prog kit what should i do.

   

1. I have taken out 6 connection from my remote control, basically I2C, Reset and power from PSOC installed on my remote control.

   

2. Connected then to Kit prog breakout pcs.

   

First problem, my computer do not recognizes this kit prog. Lastly, Am i doing it right?

   

Regards

   

Pankaj

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

Connect unmodified CY8CKIT-040 to PC, start PSoC programmer and check for a required update of firmware, install if necessary.

   

Reboot and give windows some time to install the needed drivers from internet.

   

"installed on my remote control" What remote control are you talking about?

   

"2. Connected then to Kit prog breakout pcs." More precise what you're doing, please. Photo?

   

 

   

Bob

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

Hi BOB,

   

I have attached pic of remote. This is using CY8C4014 cap sense controller. I want to debug my touch issues on this remote using kit-prog.

   

So basically, I want to connect I2C lines from my remote control (i.e. I2C line sof cap sense controller) to KIT prog and run tunner to debug touch issues.

   

Expectation is, that i will be able to run Tuner GUI which will provide me insight into touch problem which we are facing. So when i touch track pad on my remote controller i should get feedback on Tuner GUI as it comes with EVM.

   

Thanks

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

You do not have got an isolated KitProg. What you have got is integrated into your Pioneer board which would need some modifications.

   

It could be easier to get a CY8CKIT-043 PSoC4-M Prototyping Kit and use the snap-off KitProg programmer. Interface voltage is 5V for I2C. Build an EzI2C component onto your remote board's PSoC as tuner (with 1 "n" !!) helper. Connect yur EzI2C pins to KitProg J9 Header plus GND and VTArg

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Yes Bob, you told me that and I am following your advice as it is.

   

I will update you soon.

   

Thanks for your valuable time and help.

   

Pankaj

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

Hi Bob,

   

Ran into another hurdle. I am not able to assign I2C port. I get error message as "reserved for debugging in DWR settings"

   

As suggested I have changed the device but I am still facing this issue. I have created new project but still same problem. When I build the project I get 5 errors in total

   

1. Pin Error: (Function SCB.sda cannot be reached from this pin).

   

2. Pin Error: (Function SCB.scl cannot be reached from this pin).

   

3. Pin Error: (P3[1] has been reserved for debugging in the DWR System settings.).

   

4. Pin Error: (P3[0] has been reserved for debugging in the DWR System settings.).

   

5. CyDsFit aborted due to errors, please address all errors and rerun CyDsFit.

   

Thanks

   

Pankaj

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

You need to set EzI2C Sub-address size to 16 bits for using the tuner, see datasheet.

   

I2C in your chip is fixed to P1_2 and P1_3

   

Keep in mind that tuner and debugging does not work together afaik, so disable debugging when using tuner.

   

I added calling the tuner helper in main()

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I did that but still not able to start tuner. It gives error message as "failed to read I2C"

   

Now basically the connection is as following:

   

1. I2C line of Cy824014 is connected to SDA and SCL point on CY8CKIT-043 (usb break away part).

   

2. VCC and GND are connected to same header onCY8CKIT-043.

   

I am able to build the program but when i click program a pop-up with select debug target appears and i click okay. Here, I am assuming that my program is written on CY8C4014. Next step is when I am starting Tunner GUI and setting up configuration to be same as EZI2C.

   

One more thing, on Select debugger I do not see my target cap sense, it jus shows the CY8CKIT-043. Ideally there should be sub to these with the chip number as CY8C4014. I have checked power, everything looks to be powered up properly.

   

Thanks

   

Pankaj

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

After programming your chip you probably need to reset it before communication is performed.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I am confused with the overall process. So here is the thing.

   

I have configure EZI2C to use P3.0 and P3.1 pin for I2C communication and I am getting error message as Read Failed. But when i set this to P1.2 and P1.3 Tunner works.

   

Is it that Tunner works only with P1.2 and P1.3 I2C port? If so then on my hardware I am using this pin as cap-sense on track pad and the whole process if of no use. I assume there should be way to make tunner work with P3.0 and P3.1?

   

Please help.

   

Regards

   

Pankaj

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

"P1.3 Tunner works" it is "Tuner" with a single "n", please have mercy. 😉

   

 

   

Bob

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

"I assume there should be way to make tunner work with P3.0 and P3.1?"

   

I told you to disable debugging!!!

   

 

   

Bob

0 Likes
Anonymous
Not applicable
        Okay Bob you have my mercy; Tuner. I have disabled debugging and then assigned P3.0 & P 3.1 as I2C for Tuning. I have followed what you have told but I am still getting I2C read failed error in tuner gui. Any idea?   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Did you include the right program code?

   

 

   

Bob

0 Likes
Anonymous
Not applicable
        I have tried few things like trying with blank project and including capsense component and EZI2C. Another thing which I have tried is using tuner example code of 040 kit and 043 kit. 040 kit is using same chip is ours CY8C4014. Now I have no clue how to proceed further. Any suggestion will be appreciated.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

At top of this page "Design Support -> Create a Support Case" describe your problem, attach latest project that you assume to run and leave a link to this forum thread. You will get help.

   

 

   

Bob

0 Likes