3 Replies Latest reply on Apr 23, 2015 5:52 PM by saheem.sharief

    enabling the capsense shield runtime

    marek.mondok

       Hi all,

         

      is it possible to enable/disable shield of capsense configuration from application in CY8C4100 project? How?

         

          Thanks..

        • 1. Re: enabling the capsense shield runtime
          saheem.sharief

          Yes, it is possible to enable or disable Shield pin in firmware. You will have to disconnect the pin from the Shield signal using HSIOM registers. Following is the method:

             

           

             

          Enable/Connect Shield:

             

          CY_SET_REG32(CapSense_Shield__0__HSIOM, (CY_GET_REG32(CapSense_Shield__0__HSIOM) | (0x05 << CapSense_Shield__0__HSIOM_SHIFT)));

             

           

             

          Disable/Disconnect Shield:

             

          CY_SET_REG32(CapSense_Shield__0__HSIOM, (CY_GET_REG32(CapSense_Shield__0__HSIOM) & ~(0x05 << CapSense_Shield__0__HSIOM_SHIFT)));

             

           

             

          In the above lines, the CapSense_Shield__0__HSIOM and CapSense_Shield__0__HSIOM_SHIFT are defined in cyfitter.h and can be used in main.c file.

             

           

             

          Regards,

             

          Saheem

          • 2. Re: enabling the capsense shield runtime
            marek.mondok

            Thank you for the response.

               

            I use CSD 2.0 with PSoC Creator 3.0SP2 and I will not update to newer version.

               

            Is it safe to go with this solution into series project?

               

            Are there some risks and which?

            • 3. Re: enabling the capsense shield runtime
              saheem.sharief

              It is recommended you always update the project to the latest versions. I see no issue with CSD in upgrading to PSoC Creator 3.1 or 3.2. There will be new features and bug fixes in the latest versions.

                 

               

                 

              Q. Is it safe to go with this solution into series project? Are there some risks and which?

                 

              -> Why do you want to enable or disable shield during runtime? What is your application about? Note that enabling or disbaling the shield during runtime will vary the parasitic capacitance of the sensor. This inturn will result in variation in raw count when shield is enabled/disabled.

                 

               

                 

              Saheem