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(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
Pin_1 will be configured as a GPIO. Refer to PSoC4 Register TRM for details.