完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
环境: esp-idf-v5.0.3
问题描述 : 调用esp_light_sleep_start后,有机率自动重开,请问这会是什么问题 使用情境 : 项目产品有以下需求,进入休眠,定时唤醒执行业务逻,执行完成后,再进进入轻度睡眠。 initCode: Select all // *EXT0 printf("Enabling EXT0 wakeup on pin GPIO%dn", EXT_WAKEUP_PIN); ESP_ERROR_CHECK(esp_sleep_enable_ext0_wakeup(EXT_WAKEUP_PIN, INPUT_LEVEL_LOW)); ESP_ERROR_CHECK(rtc_gpio_pullup_dis(EXT_WAKEUP_PIN)); ESP_ERROR_CHECK(rtc_gpio_pulldown_en(EXT_WAKEUP_PIN)); // *timer printf("Enabling timer wakeup on 600Sn"); ESP_ERROR_CHECK(esp_sleep_enable_timer_wakeup(10*1000*1000)); // *UART printf("Enabling UART wakeup on pin GPIO %dn", SLEEP_MODE_PIN); gpio_sleep_set_direction(SLEEP_MODE_PIN, GPIO_MODE_INPUT); gpio_sleep_set_pull_mode(SLEEP_MODE_PIN, GPIO_PULLUP_ONLY); ESP_ERROR_CHECK(uart_set_wakeup_threshold(SLEEP_MODE_PORT, 3)); ESP_ERROR_CHECK(esp_sleep_enable_uart_wakeup(SLEEP_MODE_PORT)); esp_light_sleep_startCode: Select all void sleep_mode_task(void* arg){... while(1){ . . . ESP_ERROR_CHECK( esp_light_sleep_start()); switch (esp_sleep_get_wakeup_cause()) { case ESP_SLEEP_WAKEUP_EXT0: { result = 2; ESP_LOGW("check_wake_up_task","Wake up from ext0"); break; } case ESP_SLEEP_WAKEUP_UART:{ result = 8 ; ESP_LOGW("check_wake_up_task","Wake up from uart"); break; } case ESP_SLEEP_WAKEUP_TIMER: { result = 4 ; ESP_LOGW("check_wake_up_task","Wake up from timer"); break; } default: ESP_LOGE("check_wake_up_task","Wake up no value"); break; }[Codebox=c file=Untitled.c][/Codebox] . . . }} 调用esp_light_sleep_start后,有机率自动重开 Code: Select all D ESP-ROM:esp32s3-20210327Build:Mar 27 2021rst:0x8 (TG1WDT_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)Saved PC:0x40382a1d0x40382a1d: _xt_context_save at C:/Espressif/frameworks/esp-idf-v5.0.3/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_context.S:157SPIWP:0xeemode:DIO, clock div:1load:0x3fce3810,len:0x468load:0x403c9700,len:0xad4load:0x403cc700,len:0x2808entry 0x403c9880 完整log Code: Select all D ESP-ROM:esp32s3-20210327Build:Mar 27 2021rst:0x8 (TG1WDT_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)Saved PC:0x403829e60x403829e6: _xt_context_save at C:/Espressif/frameworks/esp-idf-v5.0.3/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_context.S:112SPIWP:0xeemode:DIO, clock div:1load:0x3fce3810,len:0x468load:0x403c9700,len:0xad4load:0x403cc700,len:0x2808entry 0x403c9880I (290) cpu_start: Multicore appI (290) octal_psram: vendor id : 0x0d (AP)I (290) octal_psram: dev id : 0x02 (generation 3)I (293) octal_psram: density : 0x03 (64 Mbit)I (299) octal_psram: good-die : 0x01 (Pass)I (304) octal_psram: Latency : 0x01 (Fixed)I (309) octal_psram: VCC : 0x01 (3V)I (314) octal_psram: SRF : 0x01 (Fast Refresh)I (320) octal_psram: BurstType : 0x01 (Hybrid Wrap)I (326) octal_psram: BurstLen : 0x01 (32 Byte)I (332) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)I (338) octal_psram: DriveStrength: 0x00 (1/1)D (343) MSPI Timing: tuning success, best point is index 5I (348) MSPI Timing: PSRAM timing tuning index: 5I (354) esp_psram: Found 8MB PSRAM deviceI (358) esp_psram: Speed: 80MHzV mmu_psram: Instructions from flash page19 copy to SPIRAM page0, Offset: 19V (407) mmu_psram: after copy instruction, page_id is 7I (408) mmu_psram: Instructions copied and mapped to SPIRAMV (408) esp_psram: after copy .text, used page is 7, start_page is 7, psram_available_size is 7929856 BV mmu_psram: Rodata from flash page1 copy to SPIRAM page7, Offset: -6V (511) mmu_psram: after copy rodata, page_id is 25I (511) mmu_psram: Read only data copied and mapped to SPIRAMV (511) esp_psram: after copy .rodata, used page is 18, start_page is 25, psram_available_size is 6750208 BV (521) mmu: after coalescing, 1 regions are leftV (526) mmu: found laddr is 0x190000V (529) esp_psram: 8bit-aligned-region: actual_mapped_len is 0x670000 bytesV (536) esp_psram: 8bit-aligned-range: 0x670000 B, starting from: 0x3c190000I (544) cpu_start: Pro cpu up.I (547) cpu_start: Starting app cpu, entry point is 0x403797e00x403797e0: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_system/port/cpu_start.c:143 I (0) cpu_start: App cpu up.V CACHE_ERR: illegal error intr clr & ena mask is: 0x3fV CACHE_ERR: core 1 access error intr clr & ena mask is: 0x1fI (918) esp_psram: SPI SRAM memory test OKD (918) efuse: In EFUSE_BLK1__DATA4_REG is used 7 bits starting with 20 bitD (918) efuse: In EFUSE_BLK1__DATA5_REG is used 8 bits starting with 3 bitD (925) efuse: In EFUSE_BLK1__DATA5_REG is used 5 bits starting with 11 bitD (932) efuse: In EFUSE_BLK1__DATA4_REG is used 7 bits starting with 13 bitD (939) efuse: In EFUSE_BLK1__DATA4_REG is used 7 bits starting with 20 bitD (946) efuse: In EFUSE_BLK1__DATA4_REG is used 5 bits starting with 27 bitD (953) efuse: In EFUSE_BLK1__DATA5_REG is used 3 bits starting with 0 bitD (960) efuse: In EFUSE_BLK1__DATA5_REG is used 8 bits starting with 3 bitD (967) efuse: In EFUSE_BLK1__DATA4_REG is used 7 bits starting with 13 bitD (974) efuse: In EFUSE_BLK1__DATA4_REG is used 7 bits starting with 20 bitD (981) efuse: In EFUSE_BLK1__DATA4_REG is used 5 bits starting with 27 bitD (988) efuse: In EFUSE_BLK1__DATA5_REG is used 3 bits starting with 0 bitD (995) efuse: In EFUSE_BLK1__DATA5_REG is used 8 bits starting with 3 bitD (1010) clk: RTC_SLOW_CLK calibration value: 3873434V CACHE_ERR: illegal error intr clr & ena mask is: 0x3fV CACHE_ERR: core 0 access error intr clr & ena mask is: 0x1fI (1019) cpu_start: Pro cpu start user codeI (1023) cpu_start: cpu freq: 240000000 HzI (1027) cpu_start: Application information:I (1032) cpu_start: Project name: hello_worldI (1038) cpu_start: App version: 1I (1042) cpu_start: Compile time: Nov 10 2023 10:08:02I (1048) cpu_start: ELF file SHA256: a93a6b13b2eab2d7...I (1054) cpu_start: ESP-IDF: v5.0.3-dirtyI (1060) cpu_start: Min chip rev: v0.0I (1065) cpu_start: Max chip rev: v0.99 I (1070) cpu_start: Chip rev: v0.2V (1074) memory_layout: reserved range is 0x3c180d74 - 0x3c180d94D (1081) memory_layout: Checking 5 reserved memory ranges:D (1086) memory_layout: Reserved memory range 0x3c000000 - 0x3e000000D (1093) memory_layout: Reserved memory range 0x3fc88000 - 0x3fc9b700D (1099) memory_layout: Reserved memory range 0x3fc9b700 - 0x3fcaa738D (1106) memory_layout: Reserved memory range 0x3fceee34 - 0x3fcf0000D (1112) memory_layout: Reserved memory range 0x600fe000 - 0x600fe034D (1119) memory_layout: Building list of available memory regions:V (1125) memory_layout: Examining memory region 0x3c000000 - 0x3e000000V (1132) memory_layout: Region 0x3c000000 - 0x3e000000 inside of reserved 0x3c000000 - 0x3e000000V (1141) memory_layout: Examining memory region 0x3fc88000 - 0x3fc90000V (1147) memory_layout: Region 0x3fc88000 - 0x3fc90000 inside of reserved 0x3fc88000 - 0x3fc9b700V (1156) memory_layout: Examining memory region 0x3fc90000 - 0x3fca0000V (1163) memory_layout: Start of region 0x3fc90000 - 0x3fca0000 overlaps reserved 0x3fc88000 - 0x3fc9b700V (1173) memory_layout: Region 0x3fc9b700 - 0x3fca0000 inside of reserved 0x3fc9b700 - 0x3fcaa738V (1181) memory_layout: Examining memory region 0x3fca0000 - 0x3fcb0000V (1188) memory_layout: Start of region 0x3fca0000 - 0x3fcb0000 overlaps reserved 0x3fc9b700 - 0x3fcaa738D (1198) memory_layout: Available memory region 0x3fcaa738 - 0x3fcb0000V (1204) memory_layout: Examining memory region 0x3fcb0000 - 0x3fcc0000D (1211) memory_layout: Available memory region 0x3fcb0000 - 0x3fcc0000V (1218) memory_layout: Examining memory region 0x3fcc0000 - 0x3fcd0000D (1225) memory_layout: Available memory region 0x3fcc0000 - 0x3fcd0000V (1231) memory_layout: Examining memory region 0x3fcd0000 - 0x3fce0000D (1238) memory_layout: Available memory region 0x3fcd0000 - 0x3fce0000V (1245) memory_layout: Examining memory region 0x3fce0000 - 0x3fce9710D (1251) memory_layout: Available memory region 0x3fce0000 - 0x3fce9710V (1258) memory_layout: Examining memory region 0x3fce9710 - 0x3fcf0000V (1265) memory_layout: End of region 0x3fce9710 - 0x3fcf0000 overlaps reserved 0x3fceee34 - 0x3fcf0000D (1274) memory_layout: Available memory region 0x3fce9710 - 0x3fceee34V (1281) memory_layout: Examining memory region 0x600fe000 - 0x60100000V (1287) memory_layout: Start of region 0x600fe000 - 0x60100000 overlaps reserved 0x600fe000 - 0x600fe034D (1297) memory_layout: Available memory region 0x600fe034 - 0x60100000I (1304) heap_init: Initializing. RAM available for dynamic allocation:D (1311) heap_init: New heap initialised at 0x3fcaa738I (1316) heap_init: At 3FCAA738 len 0003EFD8 (251 KiB): DRAMI (1323) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAMD (1329) heap_init: New heap initialised at 0x600fe034I (1335) heap_init: At 600FE034 len 00001FCC (7 KiB): RTCRAMI (1341) esp_psram: Adding pool of 6592K of PSRAM memory to heap allocatorV (1348) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking argsV (1355) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40ED (1363) intr_alloc: Connected src 39 to int 2 (cpu 0)V (1369) memspi: raw_chip_id: 18405EV (1372) memspi: chip_id: 5E4018V (1376) memspi: raw_chip_id: 18405EV (1379) memspi: chip_id: 5E4018D (1383) spi_flash: trying chip: issiD (1387) spi_flash: trying chip: gdD (1390) spi_flash: trying chip: mxicD (1394) spi_flash: trying chip: winbondD (1398) spi_flash: trying chip: boyaD (1402) spi_flash: trying chip: thD (1405) spi_flash: trying chip: mxic (opi)D (1410) spi_flash: trying chip: genericI (1414) spi_flash: detected chip: genericI (1418) spi_flash: flash io: qioD (1422) chip_generic: set_io_mode: status before 0x200V (1428) chip_generic: set_io_mode: status update 0x200D (1433) cpu_start: calling init function: 0x420473ec0x420473ec: _GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv at eh_alloc.cc:?D (1438) cpu_start: calling init function: 0x420473b00x420473b0: _GLOBAL__sub_I___cxa_get_globals_fast at eh_globals.cc:?D (1443) cpu_start: calling init function: 0x420431e40x420431e4: esp_ipc_init at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_system/esp_ipc.c:115D (1448) cpu_start: calling init function: 0x42002c6c0x42002c6c: esp_reset_reason_init at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_system/port/soc/esp32s3/reset_reason.c:67D (1453) cpu_start: calling init function: 0x42001d480x42001d48: esp_init_app_elf_sha256 at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_app_format/esp_app_desc.c:69D (1459) cpu_start: calling init function: 0x42006cc8 on core: 00x42006cc8: __esp_system_init_fn_esp_timer_startup_init at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_timer/src/esp_timer.c:551V (1465) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking argsV (1471) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xC02D (1479) intr_alloc: Connected src 59 to int 3 (cpu 0)D (1484) cpu_start: calling init function: 0x420451bc on core: 00x420451bc: __esp_system_init_fn_esp_sleep_startup_init at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_hw_support/sleep_modes.c:1516I (1491) sleep: Configure to isolate all GPIO pins in sleep stateI (1497) sleep: Enable automatic switching of GPIO sleep configurationD (1504) cpu_start: calling init function: 0x4200296c on core: 00x4200296c: __esp_system_init_fn_init_components0 at C:/Espressif/frameworks/esp-idf-v5.0.3/components/esp_system/startup.c:484V (1522) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking argsV (1522) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40ED (1525) intr_alloc: Connected src 79 to int 9 (cpu 0)I (1531) cpu_start: Starting scheduler on PRO CPU.V (1536) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking argsV (1536) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x402D (1536) intr_alloc: Connected src 57 to int 12 (cpu 0)V (1536) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking argsV (1546) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40ED (1546) intr_alloc: Connected src 80 to int 2 (cpu 1)I (1556) cpu_start: Starting scheduler on APP CPU.V (1566) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking argsV (1566) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x402D (1576) intr_alloc: Connected src 58 to int 3 (cpu 1)D (1586) heap_init: New heap initialised at 0x3fce9710I (1586) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocationsD (1596) esp_psram: Allocating block of size 32768 bytesV (1596) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking argsV (1606) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xED (1616) intr_alloc: Connected src 52 to int 13 (cpu 0)Hello world! |
|
相关推荐
1个回答
|
|
触发TG1WDT_SYS_RST自动重开的原因可能有以下几点:
1. 电源问题:在进入轻度睡眠模式时,如果电源不稳定或者电源电压波动较大,可能导致系统自动重启。 2. 看门狗定时器设置不当:如果看门狗定时器设置的时间过短,或者在睡眠期间没有正确地喂狗,可能导致看门狗定时器触发系统重启。 3. 外部干扰:在某些情况下,外部电磁干扰可能导致GPIO引脚误触发,从而触发系统重启。 4. 软件问题:在进入睡眠模式之前,确保所有硬件和软件资源都已正确配置和释放。如果有任何资源没有正确处理,可能会导致系统不稳定并触发重启。 5. 硬件问题:如果硬件存在缺陷或损坏,可能会导致系统在进入睡眠模式时出现问题并触发重启。 针对您提供的代码片段,我建议您检查以下几点: 1. 确保EXT_WAKEUP_PIN的输入电平设置正确,以及GPIO引脚的上拉/下拉电阻配置正确。 2. 在进入睡眠模式之前,确保所有硬件和软件资源都已正确配置和释放。 3. 检查看门狗定时器的设置,确保在睡眠期间能够正确地喂狗。 4. 如果可能,尝试在不同的电源条件下测试您的设备,以排除电源问题。 5. 如果问题仍然存在,您可以尝试更新ESP-IDF版本,或者在ESP-IDF的issue跟踪器中寻求帮助。 |
|
|
|
只有小组成员才能发言,加入小组>>
1093 浏览 1 评论
572浏览 6评论
477浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
460浏览 5评论
461浏览 4评论
434浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-15 21:24 , Processed in 0.873639 second(s), Total 46, Slave 40 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号