Other Parts Discussed in Thread: MSPM0C1106
Tool/software:
Hello,
I'm trying to configure a digital input with a pull up resistor on the MSPM0C1106 and based on the current software framework I'm working in, this is a two step process, one where we initialize a digital input, and then another to enable the pull up.
I'm seeing in the DL_GPIO_setDigitalInternalResistor function that this function actually forces configuration as a GPIO and it also erases the INENA field because this is a write update to the entire PINCM register:
This means that these settings get overwritten. Now I know that there's the other DL_GPIO_initDigitalInputFeatures() api, but this forces the choice of either input or output by API call.
Now you can fix this at runtime with a check of the whether or not the GPIO DOE bit is set for that particular input, but then that adds runtime and additional code.
Ideally the setDigitalInternalResistor API doesn't make choices for you on the pin function nor the IO direction and just changes the pull up / down bits.
Let me know if this was unclear, but I think this implementation isn't the best.
Munan