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

Level 7
Level 7
500 replies posted 50 solutions authored 25 likes received

Dear Sirs and Madams,


We are currently looking into using the Bridge Control Panel for proximity sensor tuning.

I'm attaching the project "", which I developed CY8CKIT-145-40XX with ModusToolbox.

That project has the following:


Therefore, I connected the demo kit CY8CKIT-145-40XX to my computer and checked it, but the array of data read from the Bridge Control Panel was different from the expected value.


Each number is "+" and "p" and ACK is returned normally, but it seems that it is not data corresponding to raw count or baseline.


What steps do I need to take to see raw counts, baselines, etc. in the Bridge Control Panel?


We would like to read raw counts and baselines, diffs and status in the Bridge Control Panel.

If you prepare the original EZI2C register and try to set the following data in the cycfg_capsense.h” file, an error will occur.


#define CY_CAPSENSE_PROXIMITY0_SNS0_RAW0_VALUE (cy_capsense_tuner.sensorContext[0].raw)

#define CY_CAPSENSE_PROXIMITY0_SNS0_BSLN0_VALUE (cy_capsense_tuner.sensorContext[0].bsln)

#define CY_CAPSENSE_PROXIMITY0_SNS0_DIFF0_VALUE (cy_capsense_tuner.sensorContext[0].diff)






2 Replies
50 solutions authored 100 replies posted 100 sign-ins

Hi @MaMi_1205306 ,

There is a KBA for CapSense Sensor Data monitoring using Bridge Control Panel using UART Protocol.

Try to refer to this article, which is for PSoC Creator, replicate the same in ModusToolBox.

Is there any constraint of using Ez-I2C Protocol for this purpose?

Warm regards


Level 7
Level 7
500 replies posted 50 solutions authored 25 likes received



Thank you for your response.


Does it mean that ModusToolbox can only use UART?


In the past, with PSoC5LP, projects created with reference to AN2397 could be output via I2C and read with the Bridge Control Panel.

Similarly, when I used ModusToolbox, I could not avoid the error.


/* AN2397 URL */


Also, since the "RegistorMap.h" file is automatically generated in PSoC4, it was possible to substitute the original I2C register and output it, but in the case of ModusToolbox, an error occurred when trying to substitute the corresponding register of "cycfg_capsense.h" file.


/* PSoC4 example */

// defined in the main function
uint8 I2CReg[8] = {0,0,0,0,0,0,0,0}; /* ここを16bitで指定するとHI8とLO8は使用せずダイレクトに扱える*/
uint16 Baseline, Rawcount, Signal, Status;
EZI2C_Start(); /* Initialize EZI2C block */
EZI2C_EzI2CSetBuffer1(sizeof(I2CReg), sizeof(I2CReg), (uint8*)&I2CReg);

// After the if(CapSense_NOT_BUSY == CapSense_IsBusy()){}; function
Rawcount = CapSense_BUTTON0_SNS0_RAW0_VALUE;
Baseline = CapSense_BUTTON0_SNS0_BSLN0_VALUE;
Signal = CapSense_BUTTON0_SNS0_DIFF_VALUE;
Status = CapSense_SNS_STATUS0_VALUE;
I2CReg[0] = LO8(Rawcount);/* I2CRegのが8bitだとHI8とLO8でそれぞれ入れる必要がある*/
I2CReg[1] = HI8(Rawcount);
I2CReg[2] = LO8(Baseline);
I2CReg[3] = HI8(Baseline);
I2CReg[4] = LO8(Signal);
I2CReg[5] = HI8(Signal);
I2CReg[6] = LO8(Status);


In the first attached project, ACK is returned normally from the Bridge Control Panel, so if you tell us the structure of the I2C register, I think that the raw count and baseline will be output as it is, but is it wrong?