esp32c3 light sleep无法唤醒

JackLan
Posts: 1
Joined: Fri Jun 06, 2025 7:38 am

esp32c3 light sleep无法唤醒

Postby JackLan » Fri Jun 06, 2025 8:02 am

使用esp-idf v5.4.1的light_sleep示例工程,硬件使用的是Seeed Studio XIAO ESP32C3的模块
编写下载固件后,发现设备进入light sleep后无法定时唤醒,想用IO唤醒也是不可以(已经修改为GPIO9)
设备处于休眠下去之后,一直起不来的状态。
以下是日志信息:

PS I:\light_sleep> idf.py -p COM16 flash monitor
Executing action: flash
Running ninja in directory I:\light_sleep\build
Executing "ninja flash"...
[1/5] C:\WINDOWS\system32\cmd.exe /C "cd /D I:\light_sleep\build\esp-idf\esptool_py && G:\esp\Espressif\python_env\idf5.4_py3.13_env\Scripts\pyth...es.py --offset 0x8000 partition --type app I:/light_sleep/build/partition_table/partition-table.bin I:/light_sleep/build/light_sleep_example.bin"
light_sleep_example.bin binary size 0x344e0 bytes. Smallest app partition is 0x100000 bytes. 0xcbb20 bytes (80%) free.
[1/1] C:\WINDOWS\system32\cmd.exe /C "cd /D I:\light_sleep\build\bootloader\esp-idf\esptool_py && G:\esp\Espressif\python_env\idf5.4_py3.13_env\S...xe G:/esp/v5.4.1/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 I:/light_sleep/build/bootloader/bootloader.bin"
Bootloader binary size 0x5160 bytes. 0x2ea0 bytes (36%) free.
[4/5] C:\WINDOWS\system32\cmd.exe /C "cd /D G:\esp\v5.4.1\esp-idf\components\esptool_py && G:\esp\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D I...ard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=I:/light_sleep/build -P G:/esp/v5.4.1/esp-idf/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32c3 -p COM16 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 light_sleep_example.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.8.1
Serial port COM16
Connecting...
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE, Embedded Flash 4MB (XMC)
Crystal is 40MHz
MAC: ec:da:3b:aa:aa:68
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x00044fff...
Flash will be erased from 0x00008000 to 0x00008fff...
SHA digest in image updated
Compressed 20832 bytes to 13055...
Writing at 0x00000000... (100 %)
Wrote 20832 bytes (13055 compressed) at 0x00000000 in 0.3 seconds (effective 477.5 kbit/s)...
Hash of data verified.
Compressed 214240 bytes to 111111...
Writing at 0x00010000... (14 %)
Writing at 0x0001b605... (28 %)
Writing at 0x00021c9f... (42 %)
Writing at 0x000289cb... (57 %)
Writing at 0x00030ada... (71 %)
Writing at 0x00037542... (85 %)
Writing at 0x0003e74c... (100 %)
Wrote 214240 bytes (111111 compressed) at 0x00010000 in 1.7 seconds (effective 1017.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 332.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory I:\light_sleep
Executing "G:\esp\Espressif\python_env\idf5.4_py3.13_env\Scripts\python.exe G:\esp\v5.4.1\esp-idf\tools/idf_monitor.py -p COM16 -b 115200 --toolchain-prefix riscv32-esp-elf- --target esp32c3 --revision 3 --decode-panic backtrace I:\light_sleep\build\light_sleep_example.elf --force-color -m 'G::\esp\v5.4.1\esp-idf\tools\idf.py' '-p' 'COM16'"...
--- Warning: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM16 instead...
--- esp-idf-monitor 1.6.2 on \\.\COM16 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x0 (USB_BOOT)
Saved PC:0x400462e2
--- 0x400462e2: ets_delay_us in ROM

wait usb download
--- Error: ClearCommError failed (PermissionError(13, '设备不识别此命令。', None, 22))
--- Waiting for the device to reconnect.
--- Error: ClearCommError failed (PermissionError(13, '设备不识别此命令。', None, 22))
--- Waiting for the device to reconnect.
I (3273) TAG: light sleep test
I (3273) gpio: GPIO[9]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
Waiting for GPIO9 to go high...
I (3273) gpio_wakeup: gpio wakeup source is ready
I (3273) timer_wakeup: timer wakeup source is ready
I (3283) uart: queue free spaces: 20
I (3293) uart_wakeup: uart wakeup source is ready
Entering light sleep
--- Warning: Writing to serial is timing out. Please make sure that your application supports an interactive console and that you have picked the correct console for serial communication.
--- Warning: Writing to serial is timing out. Please make sure that your application supports an interactive console and that you have picked the correct console for serial communication.
0000.png
source code
0000.png (415.13 KiB) Viewed 283 times

Who is online

Users browsing this forum: No registered users and 3 guests