cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

almc_4008691
New Contributor II

Hello,

I'm using Capsense and SmartSense to get all the parameters inside my prototype (using the board CY8Ckit-040 with a proximity sensor (pcb)).

I used SmartSense and check the parameters and got for the IDAC modulation and compensation ( 26 and 23) but if I try to use it on a manual mode my raw count is a line  and no reaction like a maximum value.

But if I'm using the manual mode and the auto calibration then I got a value at 108 and 92 ( IDAC), all others parameters are the same. And using that value it's working in a manual mode.

Can you explain me why I get a different IDAC with the SmartSense and the manual with auto calibration?

Thank you in advance,

Alex

0 Likes
1 Solution
ShanmathiN_06
Employee

Hi Alex,

You can check the sense clock source by using GetParam() API and SNS_CLK_SOURCE_PARAM_ID in RegisterMap.h.

You can refer toAccess and Modify CapSense Register Map in Firmware – KBA2226674

Else, as Priya had mentioned you can probe the CapSense sensor to check if the clock source is direct or PRS.

Pls confirm if your Cp is 124 pF. SmartSense supported Cp range is 5-61 pF. Sp, if Cp is not within supported limits, you can't rely on SmartSense calibration.

Thanks,
Shanmathi

View solution in original post

5 Replies
ShanmathiN_06
Employee

Hi Alex,

Is the Cp (parasitic capacitance) within limits supported by SmartSense?

Also, pls send your CapSense configuration parameters for manual and SmartSense tuning mode.

Thanks,
Shanmathi

0 Likes
almc_4008691
New Contributor II

Hello,

The cp I got 124 in manual mode for the cp with 'CapSense_GetSensorCapacitance(0u,0u)'

So I did one test full smartsense and auto calibration and always 16bits,

0,16pf, sense clock 3000,modulator clock 12000,idac sourcing and scan time

5ms and when I check the idac its constant around 26 idac mod and 23 for

idac comp. I got my rawcount around 55000.

I try then with manual mode without auto calibration and setting the idac

with the value before (26/23). And thoses parameters for the theshold even

if Im not interested in the to touch and the threshold. Just the raw

count.  But here it is and its the same set by smartsense also.

Idac mod:26

Idac comp:23

Proximity threshold 144

Touch threshold 144

Noise threshold 24

negative noise threshold 24

low baseline reset 30

Hysteresis 6

On denounce 3

But then my raw count is not moving and is like a line around 63000. And I

dont understand why because all the parameters are the same, or I miss

smth.

Last test is the same manual one but with auto calibration and I got all

same paremeters but an idac around 108 and 92!

If I test that value of idac in a manual mode its ok

So why I got a idac different with smartsense and with manual mode +auto

calibration idac ?

And why my raw count are like saturated with an Idac around 26/23??

Thak you so much

Alex

0 Likes
PriyadeepK_01
Employee

Is the clock source and the sense clock divider same when you are comparing smartsense and manual modes?

In SmartSense mode, the clock source is always PRS Auto, so it will chose either direct or PRS and you can find out by entering debug mode or probing the sensor.

Try using the same clock source in manual, you should get similar response as smartsense. Also, note that idac codes don't depend on resolution, but they do depend on sense clock source and frequency.

0 Likes
almc_4008691
New Contributor II

Hi PriyadeepK_01

I found the right sense clock frequency that smartsense was using and I got the sames values.

I would like to set the Sense clock source but How can I find which one smartsense is using with the debug mode ? I do not find the place or the data structure command to get it.

Thank you very much

Alex

0 Likes
ShanmathiN_06
Employee

Hi Alex,

You can check the sense clock source by using GetParam() API and SNS_CLK_SOURCE_PARAM_ID in RegisterMap.h.

You can refer toAccess and Modify CapSense Register Map in Firmware – KBA2226674

Else, as Priya had mentioned you can probe the CapSense sensor to check if the clock source is direct or PRS.

Pls confirm if your Cp is 124 pF. SmartSense supported Cp range is 5-61 pF. Sp, if Cp is not within supported limits, you can't rely on SmartSense calibration.

Thanks,
Shanmathi

View solution in original post