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.

MSP430F5419A: Reading the pin

Part Number: MSP430F5419A


Hi Team 

Can you help with the inquiry below?

I would like to know whether configuring a pin (port5, pin4) as a peripheral prevents its current value from being updated in the PXIN register.

working with an ADC chip that is connected to a MSP430 via an SPI bus so the port5, pin4 configured as an SPI MISO signal.  The ADC device sets it’s MISO output pin high when it is ready to transmit and I need to watch the MSP430 MISO input pin to know when to read in a new value from the ADC.  I have set this handshaking up in my software, but my code does not see the pin change state by reading the P5IN register even when I see the signal toggle on an oscilloscope.  So I’m wondering if I should be able to read the state of the pin if it is configured as an SPI peripheral pin, or if I need to configure it as an input to read the pin and then configure it as an SPI peripheral pin to do the SPI read.

Thank you in advance.

Regards,

Marvin

  • The port diagrams show that the module has no ability to sever the connection to P5IN. Are you checking P5IN before or after masking? Perhaps the bit mask is in error. I always find those pin numbers confusing and have to use extra care with them. Or use the predefined symbols like BIT4.

  • Based on the pin schematic [Ref data sheet (SLAS655H) Fig 9-9] I would expect the actual pin state to be reflected in P5IN. I just tried something similar on an F5529, and I saw P4IN.2 (UCB1SOMI) change based on the pin state.

    When the PSEL bit is set, pin interrupts are disabled [Ref User Guide (SLAU208Q) Sec 12.2.6]. Could that be what you're seeing?

  • Hi Marvin,

    It's been a while since we have heard from you, so I'm going to assume you were able to move forward with your project.
    I will mark this posting as RESOLVED, but if this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.  If this thread is locked, please click the "Ask a related question" button, and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum