Part Number: MSP432P401R
While trying to figure out how the SysConfig UI settings actually got handled by the SimpleLink "Button" driver logic, I found in "C:\ti\simplelink_msp432p4_sdk_3_40_01_02\source\ti\drivers\apps\Button.c" the following code:
GPIO_getConfig(hw->gpioIndex, &pinConfig); if (pinConfig & GPIO_CFG_IN_NOPULL) { /* * Must infer pull from trigger edge. There is likely an external pull * up/down attached to the button */ […snip, code looks at INT_FALLING/INT_RISING config…] } else { /* Using an internal pull up/down */ […snip, code looks at PU/PD config…] }
This code is probably not working as expected. The problem is that `GPIO_CFG_IN_NOPULL == GPIO_CFG_INPUT` so that any pin used with a button that is an input (which of course they all should be!) will take the first path for "no pull-up, configure based on interrupt edge" instead of the second path for "has pull-up, configure based on that".
The root cause of this is probably the questionable way the SimpleLink SDK uses "bitmask" constants (some are just "0" outright, others like GPIO_CFG_IN_NOPULL here are essentially "SOMETHING_RELATED | 0") which imo is sloppy but admittedly does read nicely in some code. The problem is that it also encourages code like this, which reads nicely but doesn't actually work as intended!
To fix this I think the conditions would need to be switched, i.e. start by checking `(pinConfig & (GPIO_CFG_IN_PU | GPIO_CFG_IN_PD))` and handle that case, else handle the NOPULL case as a fallback. (Or just actually record the SysConfig UI choice for e.g. "Active Low No Pull" in the generated hwAttrs in the first place...?)