- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was trying to use the following function to get the capacitance reading:
Raw_padVal[1] = CapSense_1_GetSensorCapacitance(CapSense_1_BUTTON0_WDGT_ID,CapSense_1_BUTTON0_TX0_ID, measurementStatusPtr);
However, I was got stucked in infinite loop
I also try to use this pointer to get the capacitance Raw_padVal[1]= CapSense_1_BUTTON0_PTR2SNS_CP_VALUE[0]; But I get the following error:
I have attached the project to this post, any help will be greatly appreciated
Solved! Go to Solution.
- Labels:
-
PSoC 4 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @sdkadu
The issue is caused since you are passing the pointer without assigning it to a memory location. Can you please declare measurementStatusPtr as a normal variable and pass the address to the function.
Line #15 would change to
CapSense_1_TST_MEASUREMENT_STATUS_ENUM measurementStatusPtr;
and line #73 would change to
Raw_padVal[2] = CapSense_1_GetSensorCapacitance(CapSense_1_BUTTON0_WDGT_ID,CapSense_1_BUTTON0_TX0_ID, &measurementStatusPtr);
Can you please try this out and let us know if it works?
Best regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @sdkadu
The issue is caused since you are passing the pointer without assigning it to a memory location. Can you please declare measurementStatusPtr as a normal variable and pass the address to the function.
Line #15 would change to
CapSense_1_TST_MEASUREMENT_STATUS_ENUM measurementStatusPtr;
and line #73 would change to
Raw_padVal[2] = CapSense_1_GetSensorCapacitance(CapSense_1_BUTTON0_WDGT_ID,CapSense_1_BUTTON0_TX0_ID, &measurementStatusPtr);
Can you please try this out and let us know if it works?
Best regards,
Hari