Part Number: MSPM0C1104
Tool/software:
Hi, experts:
As the title we need to change a tx pin(PA23) to be an output gpio for a while in certain case, pull down the gpio for 1ms, then switch back to uart tx, below is the code and seems working well, but still I want a confirmation from you in case anything is missing, thanks.
Bill
#define GPIO_UART_0_IOMUX_TX (IOMUX_PINCM24)
#define GPIO_GRP_0_PORT (GPIOA)
#define GPIO_UART_0_TX_PIN DL_GPIO_PIN_23
#define GPIO_UART_0_IOMUX_TX_FUNC IOMUX_PINCM24_PF_UART0_TX
DL_GPIO_initPeripheralOutputFunction(
GPIO_UART_0_IOMUX_TX, IOMUX_PINCM24_PF_GPIOA_DIO23);
DL_GPIO_initDigitalOutput(GPIO_UART_0_IOMUX_TX);
DL_GPIO_clearPins(GPIO_GRP_0_PORT, GPIO_UART_0_TX_PIN);
DL_GPIO_enableOutput(GPIO_GRP_0_PORT, GPIO_UART_0_TX_PIN);
delay_cycles(24000);
DL_GPIO_setPins(GPIO_GRP_0_PORT, GPIO_UART_0_TX_PIN);
DL_GPIO_initPeripheralOutputFunction(
GPIO_UART_0_IOMUX_TX, GPIO_UART_0_IOMUX_TX_FUNC);
The macro in the code is from ti_msp_dl_config.h