cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

1 Solution
BiBi_1928986
Valued Contributor

Hello.

The SWD pins of Miniprog4 are dedicated to SWD functions.  These pins can not be used to support I2C functions.

The I2C pins of Miniprog4 are dedicated to I2C functions.  These pins are provided at the 6x2 connector.  These are the pins that support CapSense programmer.  You'll find this information in the Miniprog Kit Guide (installed with Creator, documentation).

View solution in original post

11 Replies
Hari
Moderator
Moderator

Hi @saurabh 

 

An I2C or UART interface is required for CapSense Tuner to communicate with PSoC device. Please let me know if you are using a custom board or a Cypress development kit. 

In case you are using a custom board, please make sure that an I2C or UART interface exist and an I2C-USB bridge for connecting it to the PC. 

 

You can also take a look at the code examples (CapSense P4 One Button) for the firmware required to enable CapSense Tuner communication. 

 

Best regards, 
Hari

0 Likes
saurabh
New Contributor II

Hello @Hari,

I tried to implement the same ezi2c interface few months ago using the sample code. For the first time the firmware gets successfully updated into the microcontroller but after this procedure the mcu doesn't accept any program (It seems as if the uC programming pins gets locked). Carried out this on 2-3 mcu's but resulted into the same. Can u suggest any alternative?

0 Likes
saurabh
New Contributor II

@Hari any updates on the mentioned issue ?? 

0 Likes
Hari
Moderator
Moderator

Hi @saurabh 

 

Do you have any chip protections enabled in your project?

Are you using the SWD pins as the I2C pins?

 

Please note that in case you are using the SWD pins as I2C SDA and SCL pins, then the I2C transaction from the master must be stopped while the device is being reprogrammed. This must be made sure externally. 

 

Also, can you check the chip protection set for your project in System tab in Design Wide Resources - 

Hari_0-1634818129651.png

 

If this option is set to kill, then the device cannot be reprogrammed. 

 

Best regards, 
Hari

saurabh
New Contributor II

Hi @Hari ,

I am using the SWD pins as I2C SDA and SCL pins, but how can I achieve the condition you mentioned "the I2C transaction from the master must be stopped while the device is being reprogrammed. This must be made sure externally. "?

 

Also, I have another query, I am using a 4 key panel and a 10 key panel. 

In 4 key panel, I've configured the tuning method as SmartSense and just with few finger threshold adjustment, I was able to achieve the expected result but while I replicate the same code on a 10 key panel in auto tuning method, whenever I touch a button (eg. button0), touch effect occurs on other buttons as well. To resolve this I opted for manual tuning method, the issue of effect on other button was resolved but it resulted in reduced sensitivity of buttons which can only sense touch  on bare PCB but as I place a glass/thin material over the button, the capsense doesn't sense any touch. Please let me know what could I be missing?

0 Likes
BiBi_1928986
Valued Contributor

Hello.

I can't answer the second part of your question, but for the first part, yes, SWD pins are locked out when you choose an alternate GPIO function for  SWD pins such as I2C.  After the first programming of FLASH, you can't  download a second time.

To unlock SWD pins, I use the Power Cycle programming method.  You can try that.

saurabh
New Contributor II

I am using CY8C4245AXI-483 and currently I've used the I2C pins as an input button,  and I am using the Cypress miniPROG4 CapSense programmer. The SWDIO SWCLK pins are 3(2) and 3(3). Is it possible if I connect the SWDIO  SWCLK pins of the programmer to I2C pins and run the capsense one button sample code so as to get the tuner running? Please let me know ASAP.

0 Likes
BiBi_1928986
Valued Contributor

Hello.

The SWD pins of Miniprog4 are dedicated to SWD functions.  These pins can not be used to support I2C functions.

The I2C pins of Miniprog4 are dedicated to I2C functions.  These pins are provided at the 6x2 connector.  These are the pins that support CapSense programmer.  You'll find this information in the Miniprog Kit Guide (installed with Creator, documentation).

View solution in original post

saurabh
New Contributor II

Hello,

This procedure actually worked. The 6x2 connector had i2c pins which is used to get the capsense tuner working. From the observations, I found that the finger detection was detected successfully on capsense tuner but as I place a material of 1mm thickness, it is observed that there is no detection. What could be the possible reasons? For further reference, I've attached the screenshots of detection on bare PCB(sensor) and detection over 1mm thickness material.

detection_with_1mm_material.png

detection_without_any_material.png

  

0 Likes
Hari
Moderator
Moderator

Hi @saurabh 

 

Can you reset the device after the 1 mm material is added? Note that SmartSense will run on reset to tune the sensors. It is not recommended to add the overlay once CapSense is running as the tuning parameters will change. Therefore, please add the overlay and then reset the device for proper tuning.

Also please make sure that the sensors are not shorted to ground when the material is added (I see raw counts going to 0 which is an indication of sensor short to ground). 

 

Best regards, 
Hari

0 Likes
Hari
Moderator
Moderator

 Hi @saurabh 

 

You can still use the XRES to program the microcontroller even if SWD pins are used as I2C pins. However, both cannot happen simultaneously so the MiniProg4's I2C connection needs to be changed to SWD pins. 

 

Also, please make sure that the chip protection is set to open as mentioned in my previous response. 

 

Best regards, 
Hari

0 Likes