3 Replies Latest reply on Jan 9, 2020 1:23 AM by BragadeeshV_41

    Capsense : Scan Frequency

    AmSi_3767336

      Hi !

       

      Is it possible to change dynamically in the code the value of scanning frequency ?

       

      I have Psoc 5lp.

       

      Thank you.

        • 1. Re: Capsense : Scan Frequency
          BragadeeshV_41

          Hi AmSi_3767336,

           

          Can you please let us know what you are trying to achieve by varying the scan clock frequency (Analog Switch Divider ?)

           

          1. EMI reduction by increasing the spread of the frequency within scan - EMI reduction

          2. Modify the sense clock for different scans/ sensors dynamically?

          3. Conducted noise immunity ? - Changing the scan frequency to avoid interference due to conducted noise.

          4. Changing the sensitivity/ gain of the buttons dynamically?

           

          Regards,

          Bragadeesh

          • 2. Re: Capsense : Scan Frequency
            AmSi_3767336

            Thank you sir BragadeeshV_41 for your reply,

             

            Iam trying to get the 2 and 4 points working in my application .

             

            Is there a way to do such control in the code level ?

             

            Thank you in advance.

            • 3. Re: Capsense : Scan Frequency
              BragadeeshV_41

              Hi AmSi_3767336,

               

              It is possible to change the scan frequency by modifying the Analog Switch divider using CapSense_CSD_analogSwitchDivider[] array.

              To modify the scan frequency of the sensor of interest, do the following:

               

              extern uint8 CapSense_CSD_analogSwitchDivider[CapSense_CSD_TOTAL_SCANSLOT_COUNT];

              ...

              ...

              if(condition_to_modify_the_scan_frequency)

              {

                   CapSense_CSD_analogSwitchDivider[SENSOR_INDEX] = newDividerValue;

                   CapSense_CSD_InitializeAllBaselines();

              }

               

              Please note that  CapSense_CSD_InitializeAllBaselines();  needs to be called to initialize the sensor baselines for the new rawcounts obtained by modifying the hardware parameters.

               

              Regards,

              Bragadeesh