- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We are trying it with CY8CKIT-145-40XX.
We know that there is the "Measure Cmod and Cp of PSoC 4 CapSense - KBA225808".
However, this KBA only works up to CSD V6.0 and is obsolete in V7.0.
The arguments of the API functions below are different.
[up to CSD V6.0]
uint32 CapSense_GetSensorCapacitance (uint32 widgetId, uint32 sensorId)
[CSD V7.0]
uint32 CapSense_GetSensorCapacitance (uint32 widgetId, uint32 sensorElement,
CapSense_TST_MEASUREMENT_STATUS_ENUM * measurementStatusPtr)
Therefore, We added and changed the following codes.
[Addition]
CapSense_TST_MEASUREMENT_STATUS_ENUM measurementStatusPtr;
[Change]
// MyI2CRegs.u8_cpValue = (uint8)CapSense_GetSensorCapacitance (i, 0);
MyI2CRegs.u8_cpValue = (uint8)CapSense_GetSensorCapacitance (i, 0, &measurementStatusPtr);
The result of measuring Cp is as follows.
[up to CSD V6.0]
u8_cpValues are correct.
[CSD V7.0]
u8_cpValues are incorrect.
We have confirmed that the value of measurementStatusPtr is CapSense_TST_MEASUREMENT_SUCCESS.
Why?
Best regards,
Yocchi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoIs_1298666,
The CapSense component v7.0 returns Capacitance in fF therefore the return of this API can not fit into uint8_t , please use uint32_t since the function returns uint32.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoIs_1298666,
The CapSense component v7.0 returns Capacitance in fF therefore the return of this API can not fit into uint8_t , please use uint32_t since the function returns uint32.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Bragadeesh-san,
Thank you very much for your help.
I changed the code and ran it.
The result is below.
[up to CSD V6.0]
u8_cpValue[0] = 0x0c (12pF)
u8_cpValue[1] = 0x0e (14pF)
[CSD V7.0]
u32_cpValue[0] = 0x3166 (12.646pF)
u32_cpValue[1] = 0x39d8 (14.808pF)
Is this correct?
Best regards,
Yocchi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YoIs_1298666-san,
Thanks for the quick response., Yes, it is correct now.
Regards,
Bragadeesh
Bragadeesh