Capsense difference on PSoC4 BLE /PSoC 5

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

cross mob
DaZh_1276586
Level 2
Level 2
5 sign-ins First solution authored 10 replies posted

Hi.

I noticed with the same clock frequency (24MHz). The sample rate of a generic capsense widget on PSoC4 BLE is about 2x faster than PSoC5. Could you explain the reasons? 

Also, if I just use the generic widget/(button) and use the raw sensor data, is the PSoC4 SNR better than PSoC5?

Thanks.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi @DaZh_1276586 ,

From your timings for PSoC 5, it looks like you have set the scan speed to Very Fast which divides the input clock by 2, Therefore the modclock (speed at which the counter is counted) is 12 MHz.  Therefore, scan time = (2 ^13 - 1)/ 12 = 682 uS + Setup time = ~718uS.

However, if modClk in PSoC 4 is 24 MHz, then the expected scan time is (2^13 - 1)/24 = 341 uS  + Setup Time. Can you please let me know how you arrived at 171us?

 
Regards,
Bragadeesh

View solution in original post

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

Hi @DaZh_1276586 ,

How did you measure the sample time (or scan time)? Did you use an oscilloscope to check the scan time?  In PSoC 5, can you please point us towards the exact settings that was set to 24 MHz? From my understanding, this is the Scan Clock and this is NOT same as the modulator clock frequency that you set in PSoC 4 devices. Scan Clock in PSoC 5 is the clock source for the capsense block and the sense clock frequency (= Scan Clock/ Analog Switch Divider).

In PSoC 5, scan time is determined by the parameter Scan Speed. The mod Clock is changed based on your Scan Speed settings. Table 1 (Pg 23) in component datasheet gives you the expected scan time for different scan speeds and resolution.

https://www.cypress.com/file/135121/download

In general, the hardware scan time of the sensor is (2^N - 1) / Modulator Clock Frequency. Where N is the resolution.

PSoC 4 uses latest generation of capsense hardware and it has higher SNR compared to PSoC 5 devices.

Regards,
Bragadeesh
0 Likes
DaZh_1276586
Level 2
Level 2
5 sign-ins First solution authored 10 replies posted

Hi Bragadeesh:

My psoc5 settings are the same as the component datasheet. The scan time I mentioned above is the expected scan time in the component tab. 13 bits scan on psoc5 is expected 718us, while the expected time on psoc4 is 171us.

 

Regards.

Dayi.

  

0 Likes
lock attach
Attachments are accessible only for community members.
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi @DaZh_1276586 ,

From your timings for PSoC 5, it looks like you have set the scan speed to Very Fast which divides the input clock by 2, Therefore the modclock (speed at which the counter is counted) is 12 MHz.  Therefore, scan time = (2 ^13 - 1)/ 12 = 682 uS + Setup time = ~718uS.

However, if modClk in PSoC 4 is 24 MHz, then the expected scan time is (2^13 - 1)/24 = 341 uS  + Setup Time. Can you please let me know how you arrived at 171us?

 
Regards,
Bragadeesh
0 Likes
DaZh_1276586
Level 2
Level 2
5 sign-ins First solution authored 10 replies posted

DaZh_1276586_0-1610013030466.png

Its from the component. 1.748 ms is for 10 elements. Single sensor scan time is 0.171ms

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

Hi @DaZh_1276586 ,  can you share the image again? It looks it is hidden. Also can you share the XML file of your capsense component settings? To share the XML file, open the capsense component and click on Save Configuration on the top. This will save the capsense component as a XML file.

Regards,
Bragadeesh
0 Likes
lock attach
Attachments are accessible only for community members.
DaZh_1276586
Level 2
Level 2
5 sign-ins First solution authored 10 replies posted

Hi. The system told me xml file is not allowed to upload. I reupload the screenshot.

0 Likes
lock attach
Attachments are accessible only for community members.
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi @DaZh_1276586 , You are using the older capsense component CSD v2.60 for PSoC 4. We highly recommend you to use the latest capsense component v7.0 for your design.

In the older component of capsense CSD v2.6, the mod clock frequency is set using the mod Clock divider value. Where Mod Clock = HFCLK/ Mod Clck Divider value. If the HFCLK is 24 MHz, then mod clk is 24/ 1= 24 MHz, and hence scan time is 341 uS. See attached images. 

From the image shared by you, mod Clk divider is 1. Therefore, I'm suspecting that your HFCLK is set to 48 MHz, and that is why you see 171 uS . (ie) Mod Clk = 48/ 1 = 48 Mhz and scan time  = (2^13 - 1)/48 = 171 uS.

Hope this clarifies.

Regards,
Bragadeesh
0 Likes