Capsense : Scan Frequency

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AmSi_3767336
Level 1
Level 1

Hi !

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

I have Psoc 5lp.

Thank you.

0 Likes
1 Solution

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

Regards,
Bragadeesh

View solution in original post

0 Likes
3 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

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

Regards,
Bragadeesh
0 Likes

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.

0 Likes

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

Regards,
Bragadeesh
0 Likes