How do I use the UART Rx pin to wake up the PSoC® 6 device in Deep Sleep Mode?
The SCB_UART_PDL component is not capable of waking up the device from the Deep Sleep mode. However, GPIO functionality can be used for this purpose. The GPIO interrupt can wake up the PSoC 6 device in Deep Sleep Mode when the device enters the Deep Sleep Mode. The UART Rx pin acts as the GPIO pin. Configure the UART Rx pin to wake up the PSoC 6 device in Deep Sleep Mode.
Figure 1 shows the Creator 4.2 project schematic and Figure 2 shows ModusToolbox configurator settings.
Figure 1. Creator 4.2 Project Schematic
Figure 2. ModusToolbox Device Configurator
Perform these steps using the UART Rx pin to wake up the PSoC 6 device in Deep Sleep Mode:
Before the PSoC 6 device enters the Deep Sleep Mode, initialize and enable the GPIO interrupt assigned to CM4+ or CM0+.
Use the API “Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT)” for the PSoC 6 device to enter the Deep Sleep Mode. The device wakes up once the UART Rx pin receives the data. Use the Command “0x00 0x00 0xcc 0x14 0xff 0xff 0xff 0xff 0xff 0x25” to test the results. Figure 3 shows the data “0xcc 0x14 0xff 0xff 0xff 0xff 0xff 0x25” can be received correctly.