How do I control the GPIO output after stopping the PWM?
Once the GPIO is connected to the PWM, it cannot be directly controlled by the firmware because when the Pin connects to the PWM “line”, the HSIOM4A register is changed automatically. Thus, you cannot use the firmware Pin_1_Write(0); or Pin_1_Write(1); to control the GPIO output level.
If it is necessary to control the GPIO output, change the inner connection by changing the HSIOM4A register manually. The project schematic of an example project attached with this article is shown in Figure 1.
Figure 1. Project Schematic
This project uses Port 0_Pin 2 as Pin_1. The following code is used to modify the HSIOM_PORT_SEL0 register.