This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0C1104: GPIO Read Operation failing when using the driver generated by Sysconfig

Part Number: MSPM0C1104

Tool/software:

So This might sound like a silly doubt, but I have trying to debug whats the issue for not being to read a pin. I tried multiple ways. I have configured the p16A as input with pull up resistor. The GPIO_LEDS_InputPin is the pin mapped. My code goes like just to check if my pin read is 1 or 0 and then to toggle. On the launchPad I am giving approx 2.9V to the PA16 pin. I am putting the breakpoint on the line 77 and its not being and i cannot read the values . I get a uint32 bit value of 0 all the time. 
Please Help!

  • Are you fairly certain that you're reaching line 73? I see you're enabling the pin interrupt, but I don't see an ISR for it.

    You can use the Registers View to look at the DIN31_0 register directly.

  •    

    So YES I am able to reaching the line 73. I have used the ISR but i get no interrupt. In the register window my pin 16 bit is set to 1 all the time even when i supply no voltage to the pin.

  • If you're reaching line 73 but not line 77 there are only a few steps in between. DL_GPIO_readPins is only 1 line long ("return (gpio->DIN31_0 & pins);"), so all I can think of is that there's something with the InputPin_PIN definition. (Right-click on the name and "Go To Definition".)

    What do you see if you "step" from line 73? Based on these fragments (images), I can't really try this myself.