Use UART Rx Pin to Wake up PSoC® 6 Device in Deep Sleep Mode – KBA224347
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Version: *A
Translation - Japanese: UART Rxピンを使用してPSoC®6デバイスをディープスリープモードからウェイクアップさせる方法 - KBA224347 - Community Translated (JA)
Question:
How do I use the UART Rx pin to wake up the PSoC® 6 device in Deep Sleep Mode?
Answer:
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+.
PSoC Creator code snippet:
ModusToolbox code snippet: - When the PSoC 6 device wakes up, disable the interrupt.
PSoC Creator code snippet:
ModusToolbox code snippet: - The test result is shown in Figure 3.
- 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.
Figure 3. UART Send and Receive Data