SLAAEF8 January 2024 MSPM0L1105 , MSPM0L1105
As mentioned before, standard UART TXD has a push-pull I/O structure. However, in this application, the UART TXD I/O structure needs to be open-drain. MSPM0’s IOMUX function gives the user an easy way to control the digital I/O outputs. It not only manages the selection of which peripheral function is to be used on a digital I/O, but also provides the controls for the output driver, input path, and the wakeup logic for wakeup from SHUTDOWN mode. Figure 5-2 shows a detailed I/O structure of MSPM0.
Note that not all pins have analog functions, wake-up logic, drive strength control, and pullup or pulldown resistors available. For specific designs, see the device-specific TRM and data sheet. In this TWS reference design, after the UART TXD function is selected for the I/O function, a logic high to Hi-z conversion is made to achieve an open-drain UART TXD. The code for setting up the IOMUX can be seen below, ‘DL_GPIO_HIZ_ENABLE’ will set the I/O structure to open-drain
DL_GPIO_initPeripheralOutputFunctionFeatures(
GPIO_UART_L_IOMUX_TX, GPIO_UART_L_IOMUX_TX_FUNC,
DL_GPIO_INVERSION_DISABLE, DL_GPIO_RESISTOR_NONE,
DL_GPIO_DRIVE_STRENGTH_LOW, DL_GPIO_HIZ_ENABLE
);