All,
I have a set of boards containing an MSP430F5659 microcontroller, one if its job is to poll and test if the GPIO input P1.1 is high.
- on the same hardware, I got the following issue: sometimes (50%), the GPIO input pin bit in P1IN register does'nt correspond to the real state of the pin (The pin is always high and I'm measuring 3V3 on the O-scope, while the MSP430 is reading a 0).
as follows what I'm getting (I'll post my code therafter).
CASE 1, When it works:
CASE 2: The issue comes up:
-------------> Software:
My FW is based on the gpioDriverLib. below the pseudo code:
// define pinout #define MyPin GPIO_PIN1 // P1.1 // set gpio GPIO_setAsInputPin(GPIO_PORT_P1, MyPin); // set MyPin as input // main program if (GPIO_getInputPinValue(GPIO_PORT_P1, MyPin) == GPIO_INPUT_PIN_HIGH) {.... }
My question:
1- I'm a little bit confused how the issue comes-up on the same hardware. while the same FW Have been working on this HW.
2- had some one had similar issue with/without the gpioDriverLib?
3- do have idea how to troubleshoot this kind of issue?
4- Have I missed something?
Thank you :)