Part Number: CC1310
I am using CC1310, and while reading the state of a GPIO pin I am encountering an issue.
When I configure IO0 and IO1, I always read a value of 0 using the API, even though I verified on the hardware side that the pin level is HIGH.
However, when I change the configuration to IO1, I can correctly read 1 when the pin is HIGH. But when I connect the pin to 0V (ground), the API returns a value of 3 instead of 0.
I am using the gpioGetInputValue(1, alertState) API to read the pin state.
Below is my example code:
U16 alertState;
gpioGetInputValue(1, alertState);
output.tempRead = alertState;
if (alertState == 1) {
output.alert = 1;
fwGenAlertInterrupt();
}
if (alertState != 1) {
output.alert = 0;
}
fwGenAlertInterrupt();
fwScheduleTask(1);
My GPIO configuration is shown below.
