mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 10:30:58 +02:00
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
This commit is contained in:
@@ -14,11 +14,21 @@ The following wake up sources are demonstrated in this example (refer to the [Wa
|
|||||||
- **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.)
|
- **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.)
|
||||||
- **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.)
|
- **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.)
|
||||||
|
|
||||||
Note: Some wake up sources can be disabled via configuration (see section on [project configuration](#Configure-the-project))
|
> [!NOTE]
|
||||||
|
> Some wake up sources can be disabled via configuration (see section on [project configuration](#Configure-the-project))
|
||||||
|
>
|
||||||
|
> 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:
|
||||||
|
> - Serial output interruption
|
||||||
|
> - Host-side errors like ClearCommError failed
|
||||||
|
> - Windows may show "Unknown USB device"
|
||||||
|
> - Even after wakeup, USB connection may not automatically recover
|
||||||
|
>
|
||||||
|
> 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)
|
||||||
|
|
||||||
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.
|
> [!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.
|
||||||
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.
|
>
|
||||||
|
> 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.
|
||||||
|
|
||||||
## How to use example
|
## How to use example
|
||||||
|
|
||||||
|
@@ -9,6 +9,15 @@ The [Deep-sleep wake stub](https://docs.espressif.com/projects/esp-idf/en/latest
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> 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:
|
||||||
|
> - Serial output interruption
|
||||||
|
> - Host-side errors like ClearCommError failed
|
||||||
|
> - Windows may show "Unknown USB device"
|
||||||
|
> - Even after wakeup, USB connection may not automatically recover
|
||||||
|
>
|
||||||
|
> 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)
|
||||||
|
|
||||||
## How to use example
|
## How to use example
|
||||||
|
|
||||||
### Hardware Required
|
### Hardware Required
|
||||||
|
@@ -15,10 +15,19 @@ The example enables the following wakeup sources:
|
|||||||
|
|
||||||
The example also prints time spent in light sleep mode to illustrate that timekeeping continues while the chip is in light sleep.
|
The example also prints time spent in light sleep mode to illustrate that timekeeping continues while the chip is in light sleep.
|
||||||
|
|
||||||
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:
|
> [!NOTE]
|
||||||
|
>
|
||||||
- configure the CPU to be powered down via menuconfig (not all esp series support this feature)
|
> 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:
|
||||||
- configure the SPI Flash to be powered down via menuconfig
|
> - configure the CPU to be powered down via menuconfig (not all esp series support this feature)
|
||||||
|
> - configure the SPI Flash to be powered down via menuconfig
|
||||||
|
>
|
||||||
|
> 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:
|
||||||
|
> - Serial output interruption
|
||||||
|
> - Host-side errors like ClearCommError failed
|
||||||
|
> - Windows may show "Unknown USB device"
|
||||||
|
> - Even after wakeup, USB connection may not automatically recover
|
||||||
|
>
|
||||||
|
> 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)
|
||||||
|
|
||||||
## How to Use Example
|
## How to Use Example
|
||||||
|
|
||||||
|
@@ -15,6 +15,15 @@ Power save mode only works in station mode. If the modem sleep mode is enabled,
|
|||||||
|
|
||||||
* others: not supported yet.
|
* others: not supported yet.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> 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:
|
||||||
|
> - Serial output interruption
|
||||||
|
> - Host-side errors like ClearCommError failed
|
||||||
|
> - Windows may show "Unknown USB device"
|
||||||
|
> - Even after wakeup, USB connection may not automatically recover
|
||||||
|
>
|
||||||
|
> 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)
|
||||||
|
|
||||||
### Typical current consumption with management enabled
|
### Typical current consumption with management enabled
|
||||||
|
|
||||||

|

|
||||||
|
Reference in New Issue
Block a user