5 Replies Latest reply on Feb 10, 2019 6:09 PM by RuzheZ_36

    Can capsense pins be reassigned?


      If you have created a capsense sensor, can the corresponding pins be reassigning at any time, or are they now dedicated capsense pins?


      Can you set a capsense pin to be digital high or digital low?

        • 1. Re: Can capsense pins be reassigned?

          Hi Braeden,


          Yes. the corresponding pin can be reassigned in run-time, but I think it is not "at any time". If required, the CapSense pin should be re-assigned after a full cycle of CapSense scan&process.

          About how to re-assign it..Refer HSIOM parts in PSoC4 registers TRM.

          For example, if you are using PSoC4000S, here is its regester TRM:





          • 2. Re: Can capsense pins be reassigned?

            Thank you for the response.


            So I am using the CY8CKIT-042 PSoc 4 Pioneer Kit, and I am using two pins for capsense, one as a sensor and one as a driven shield. At a certain point I would like to switch these pins, one to be a 5v signal and one to read an analog sensor.


            I looked at https://www.cypress.com/file/122336/download

            at the HSIOC section and I think I would need to switch capsense to be GPIO as follows.



            Is this right? And now how do I setup these pins as a high signal and an analog sensor now that they are GPIO?

            • 3. Re: Can capsense pins be reassigned?



              To change the pin mode to Analog you have to set the HSIOM_SEL0[3:0] directly to AMUXBUSA or AMUXBUSB. You don't need to use GPIO mode in between. Please refer corresponding port's HSIOM_SEL0 bit definitions in the register TRM of PSoC 4200. For example please refer page number 185 of the architecture TRM.




              After changing the pin to analog mode you have to disable the input buffer of the pin. For this please refer to the register PRT_PCx register.


              It is not possible to connect the pins to 5V unless the VDDIO is 5V.  If VDDIO is 5 volts you can connect the pin to 5V. These are the following steps:

              1. Change the HSIOM_SEL0 of the pin to GPIO.

              2. Change the drive mode of the pin to Resistive pull-up.

              3. Write 1 to the pin.




              • 4. Re: Can capsense pins be reassigned?

                Ok so I did this and I was able to set the one pin high, and the other to be in analog mode with buffers disabled. I was wondering how I could send the signal from the analog pin to an ADC now that I have the pin in the correct mode. I have one in my top design, and I was wondering how I could send this signal to it during run time? or else what is the best way to approach this to get usable measurements from the pin during run time?


                thanks Braeden

                • 5. Re: Can capsense pins be reassigned?

                  Reconfigure HSIOM register different values, pins will be re-assigned and routed to different component. Same for ADC input channel pins.

                  It is better to take care of other pins connection/configuration you don't want to change because there is no bit-operation of PSoC4 registers.