Skip to content

Commit d85ad74

Browse files
author
Jiang Jiang Jian
committed
Merge branch 'feat/add_usj_notes_to_sleep_examples' into 'master'
change(example): adds USB-Serial-JTAG console usage notes to sleep examples Closes IDFGH-15488 See merge request espressif/esp-idf!40990
2 parents 6b57250 + 9f53ff7 commit d85ad74

File tree

4 files changed

+46
-9
lines changed

4 files changed

+46
-9
lines changed

examples/system/deep_sleep/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,21 @@ The following wake up sources are demonstrated in this example (refer to the [Wa
1414
- **EXT1:** External wake up 1 which is tied to multiple RTC GPIOs. This example uses GPIO2 and GPIO4 to trigger a wake up with any one of the two pins are HIGH. (This wake up source is available on ESP32, ESP32-S2, ESP32-S3, ESP32-C6 and ESP32-H2.)
1515
- **GPIO:** Pads powered by VDD3P3_RTC can be used to trigger a wake up from deep sleep. You may choose the pin and trigger level in menuconfig. (This wake up source is unavailable on ESP32, ESP32-S2, ESP32-S3 and ESP32-H2.)
1616

17-
Note: Some wake up sources can be disabled via configuration (see section on [project configuration](#Configure-the-project))
18-
19-
Warning: On ESP32, touch wake up source cannot be used together with EXT0 wake up source. If they co-exist, IDF will give a runtime error and the program will crash. By default in this example, touch wake up is enabled, and the other two are disabled. You can switch to enable the other wake up sources via menuconfig.
20-
21-
In this example, the `CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP` Kconfig option is used, which allows you to reduce the boot time of the bootloader during waking up from deep sleep. The bootloader stores in RTC memory the address of a running partition and uses it when it wakes up (ESP32-C2 does not have RTC memory, so a running partition cannot be saved there, instead the partition table is read to select an application). This example allows you to skip all image checks and speed up the boot.
17+
> [!NOTE]
18+
> Some wake up sources can be disabled via configuration (see section on [project configuration](#Configure-the-project))
19+
>
20+
> It is recommended to use a development board with an external USB-UART chip to debug this example. If you're using the USB-Serial-JTAG port to view logs from this example, note that the internal USB peripheral will be disabled during deep_sleep for power saving. This will result in:
21+
> - Serial output interruption
22+
> - Host-side errors like ClearCommError failed
23+
> - Windows may show "Unknown USB device"
24+
> - Even after wakeup, USB connection may not automatically recover
25+
>
26+
> See: [USB Serial/JTAG console sleep mode considerations](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/usb-serial-jtag-console.html#sleep-mode-considerations)
27+
28+
> [!WARNING]
29+
> On ESP32, touch wake up source cannot be used together with EXT0 wake up source. If they co-exist, IDF will give a runtime error and the program will crash. By default in this example, touch wake up is enabled, and the other two are disabled. You can switch to enable the other wake up >sources via menuconfig.
30+
>
31+
> In this example, the `CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP` Kconfig option is used, which allows you to reduce the boot time of the bootloader during waking up from deep sleep. The bootloader stores in RTC memory the address of a running partition and uses it when it wakes up (ESP32-C2 does not have RTC memory, so a running partition cannot be saved there, instead the partition table is read to select an application). This example allows you to skip all image checks and speed up the boot.
2232
2333
## How to use example
2434

examples/system/deep_sleep_wake_stub/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ The [Deep-sleep wake stub](https://docs.espressif.com/projects/esp-idf/en/latest
99

1010
In this example, the `CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP` Kconfig option is used, which allows you to reduce the boot time of the bootloader during waking up from deep sleep. The bootloader stores in rtc memory the address of a running partition and uses it when it wakes up. This example allows you to skip all image checks and speed up the boot.
1111

12+
> [!NOTE]
13+
> It is recommended to use a development board with an external USB-UART chip to debug this example. If you're using the USB-Serial-JTAG port to view logs from this example, note that the internal USB peripheral will be disabled during deep_sleep for power saving. This will result in:
14+
> - Serial output interruption
15+
> - Host-side errors like ClearCommError failed
16+
> - Windows may show "Unknown USB device"
17+
> - Even after wakeup, USB connection may not automatically recover
18+
>
19+
> See: [USB Serial/JTAG console sleep mode considerations](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/usb-serial-jtag-console.html#sleep-mode-considerations)
20+
1221
## How to use example
1322

1423
### Hardware Required

examples/system/light_sleep/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,19 @@ The example enables the following wakeup sources:
1515

1616
The example also prints time spent in light sleep mode to illustrate that timekeeping continues while the chip is in light sleep.
1717

18-
Note: If you find that the bottom current measured by running this example is larger than what is declared on the datasheet, you can try the following methods:
19-
20-
- configure the CPU to be powered down via menuconfig (not all esp series support this feature)
21-
- configure the SPI Flash to be powered down via menuconfig
18+
> [!NOTE]
19+
>
20+
> If you find that the bottom current measured by running this example is larger than what is declared on the datasheet, you can try the following methods:
21+
> - configure the CPU to be powered down via menuconfig (not all esp series support this feature)
22+
> - configure the SPI Flash to be powered down via menuconfig
23+
>
24+
> It is recommended to use a development board with an external USB-UART chip to debug this example. If you're using the USB-Serial-JTAG port to view logs from this example, note that the internal USB peripheral will be disabled during light_sleep for power saving. This will result in:
25+
> - Serial output interruption
26+
> - Host-side errors like ClearCommError failed
27+
> - Windows may show "Unknown USB device"
28+
> - Even after wakeup, USB connection may not automatically recover
29+
>
30+
> See: [USB Serial/JTAG console sleep mode considerations](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/usb-serial-jtag-console.html#sleep-mode-considerations)
2231
2332
## How to Use Example
2433

examples/wifi/power_save/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ Power save mode only works in station mode. If the modem sleep mode is enabled,
1515

1616
* others: not supported yet.
1717

18+
> [!NOTE]
19+
> It is recommended to use a development board with an external USB-UART chip to debug this example. If you're using the USB-Serial-JTAG port to view logs from this example, note that the internal USB peripheral will be disabled during light_sleep for power saving. This will result in:
20+
> - Serial output interruption
21+
> - Host-side errors like ClearCommError failed
22+
> - Windows may show "Unknown USB device"
23+
> - Even after wakeup, USB connection may not automatically recover
24+
>
25+
> See: [USB Serial/JTAG console sleep mode considerations](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/usb-serial-jtag-console.html#sleep-mode-considerations)
26+
1827
### Typical current consumption with management enabled
1928

2029
![current consumption with CONFIG_PM_ENABLE enabled](image/power_save_graph.png)

0 commit comments

Comments
 (0)