Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

GrCa_1363456
Level 5
Level 5
First comment on KBA First comment on blog 250 sign-ins

I understand the main steps to enable the Capsense Tuner as found in the "Using the Tuner GUI" section of the CapSense_CSD data sheet.

However, I'm having difficulty getting the EZI2C component to fit in the CY8CKIT-042.  If I attempt to connect the added EZI2C component signals scl and sda to the KitProg I2C by using Port P3[0] and P3[1], the project won't compile without errors. It will compile if I use P4[0] and P4[1] then jumper those signals on the kit. What other options are available to add tuner functionality to a CY8CKIT-042 without external jumpers?

Following are the modifications I made to the CE202479 code example, along with the modified code attached.

Main steps:
1) Enable Tune Helper

2) Add EZI2C component

3) Add code to Main.c

 

{

CyGlobalIntEnable; /* Enable global interrupts. */

CapSense_CSD_TunerStart();

/* All widgets are enabled by default except proximity widgets.

* Proximity widgets must be manually enabled by calling

* CapSense_1_EnableWidget() API, as their long scan time is

* incompatible with the fast response required of other widget

* types.

*/

while(1)

{

CapSense_CSD_TunerComm();

}

}

 

4) Build and Program

5) Start CapSense Tuner

 

Note: The EZI2C component will connect by default to P4[0] for scl and P4[1] for sda

The I2C on the KitProg (PSoC 5 on the kit) is connected to port P3[0] for scl and P3[1] for sda.

Attempting to route the EZI2C to Port 3 (P3[0] and P3[1]) causes fit problems.

As an alternative, the two ports can be connected externally using jumper wiresl

 

6) Add jumper wire for scl between P3[0] and P4[0] via J3-4 to J3-10

7) Add jumper wire for sda between P3[1] and P4[1] via J3-5 to J3-9

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @GrCa_1363456 

 

The error is due to the same SCB block being used for I2C and UART. If you see, assigning P3.0 and 3.1 for SCL and SDA results in using SCB1 block for I2C. But this is already occupied by the UART block. 

In case you want to use the Kitprog I2C, you can reassign the UART blocks to P4.0 and 4.1 and wire out the lines to the Kitprog UART pins externally. 

 

Best regards, 
Hari

View solution in original post

1 Reply
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @GrCa_1363456 

 

The error is due to the same SCB block being used for I2C and UART. If you see, assigning P3.0 and 3.1 for SCL and SDA results in using SCB1 block for I2C. But this is already occupied by the UART block. 

In case you want to use the Kitprog I2C, you can reassign the UART blocks to P4.0 and 4.1 and wire out the lines to the Kitprog UART pins externally. 

 

Best regards, 
Hari