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?
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];
CapSense_CSD_analogSwitchDivider[SENSOR_INDEX] = newDividerValue;
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.