About SetParam when "CapSense_BUTTON0_IDAC_MOD0_PARAM_ID" is set for argument "uint32 paramId"

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

cross mob
YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

I have a question about CapSense_SetParam API for PSoC4000S.

If I set "CapSense_BUTTON0_IDAC_MOD0_PARAM_ID" for argument "uint32 paramId",  the BAD_PARAM is returned.

Maybe "CapSense_BUTTON0_IDAC_MOD0_PARAM_ID" is not writable.

Is this correct?

What spec says that "CapSense_BUTTON0_IDAC_MOD0_PARAM_ID" is not writable?

Best regards,

Yocchi

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Yocchi-san, 

 

The CapSense paramIDs follow a specific byte format - 

Hari_0-1632286875529.png

 

The 3rd bit from the MSB (or the bit in position 29) indicates if the particular param is Read/Write capable.

For example, consider the paramID for CapSense_BUTTON0_IDAC_MOD0_PARAM_ID which is 0x4E000027 in my case. The MSB byte is 4, which indicates the bit in position 29 is 0. This indicates that the parameter is read-only. 

If we consider the finger threshold parameter, CapSense_BUTTON0_FINGER_TH_PARAM_ID, the paramID is 0xAB800020. Here, the MSB byte is 0xA which indicates the bit in position 29 is 1 and hence, this parameter is Read/Write. 

 

Please let me know if you have any further queries. 

 

Best regards, 
Hari

View solution in original post

0 Likes
2 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Yocchi-san, 

 

The CapSense paramIDs follow a specific byte format - 

Hari_0-1632286875529.png

 

The 3rd bit from the MSB (or the bit in position 29) indicates if the particular param is Read/Write capable.

For example, consider the paramID for CapSense_BUTTON0_IDAC_MOD0_PARAM_ID which is 0x4E000027 in my case. The MSB byte is 4, which indicates the bit in position 29 is 0. This indicates that the parameter is read-only. 

If we consider the finger threshold parameter, CapSense_BUTTON0_FINGER_TH_PARAM_ID, the paramID is 0xAB800020. Here, the MSB byte is 0xA which indicates the bit in position 29 is 1 and hence, this parameter is Read/Write. 

 

Please let me know if you have any further queries. 

 

Best regards, 
Hari

0 Likes

Hello Hari-san,

I looked at my "CapSenseRegisterMap.h" and "CapSense_BUTTON0_IDAC_MOD0_PARAM_ID" is below.

#define CapSense_BUTTON0_IDAC_MOD0_PARAM_ID (0x4C00002Fu)

So, 'W' is '0'.

Thank you very much.

Best regards,

Yocchi

 

0 Likes