MSPM0L2227: How do I satisfy both comparator input and GPIO functions on the same pin?

Expert 2540 points
Part Number: MSPM0L2227
Other Parts Discussed in Thread: SYSCONFIG, MSP430F4152

Tool/software:

Hi All,

GPIO High output / Comparator input OFF
↓ Switch
GPIO Hi-z / Comparator input ON

By performing the above operation using the same pins, the comparator can be charged and discharged.

I want to do this on the same pin, but I don't know how to set it in Sysconfig.

When I set COMP Positive Channel 3 Pin to PA15 as shown below, I get an error on GPIO.
I was able to do this with MSP430F4152.

Please tell me how to set it.

Best Regards,

Ito

  • Hi Ito,

    So you want to switch the IO function between the COMP and GPIO right? you can configure the COMP function in the Sysconfig first and then refer to the below instructions in the TRM to change the function to the GPIO by code. (Please pay attention not forgetting execute the first instruction)

    Here is a UART-GPIO exchange example for your reference.

    Best Regards,
    Peter