esp32-wroom掉电后程序消失

xsrlfc
Posts: 3
Joined: Wed Oct 13, 2021 9:10 am

esp32-wroom掉电后程序消失

Postby xsrlfc » Wed Oct 13, 2021 9:18 am

给esp32-wroom-32e模块自制了一个开发板,UART转USB使用的CH340C芯片,烧录部分的电路参考了官方esp32_devkitc_v4的原理图(EN和IO0接到RTS和DTR)。

现在的问题是:esptool.py通过usb可以正常烧录程序,程序也可正常运行,但是板子断电后烧录的程序就没了;如果不断电的情况下,通过拉低EN进行重启,烧录的软件则可以正常运行。

请问是CH340芯片的问题吗?

ESP_LJH
Posts: 90
Joined: Tue May 18, 2021 9:21 am

Re: esp32-wroom掉电后程序消失

Postby ESP_LJH » Wed Oct 13, 2021 11:07 am

怎么发现程序没有了?重新上电后是什么 log ?

xsrlfc
Posts: 3
Joined: Wed Oct 13, 2021 9:10 am

Re: esp32-wroom掉电后程序消失

Postby xsrlfc » Thu Oct 14, 2021 2:39 am

ESP_LJH wrote:
Wed Oct 13, 2021 11:07 am
怎么发现程序没有了?重新上电后是什么 log ?
你好,感谢回复

烧录的程序是串口打印程序,烧录后能正常工作,掉电之后就没有了。

掉电重启后,模块看起来没有程序运行,按EN重启,打印的LOG是:
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

烧录完程序,在不掉电的情况下,按en重启,程序可以正常运行,打印的LOG如下:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7092
load:0x40078000,len:13212
load:0x40080400,len:4584
entry 0x400806f4
[0;32mI (27) boot: ESP-IDF v4.2.2-193-g764f0db002-dirty 2nd stage bootloader[0m
[0;32mI (27) boot: compile time 09:39:57[0m
[0;32mI (28) boot: chip revision: 1[0m
[0;32mI (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0[0m
[0;32mI (39) boot.esp32: SPI Speed : 40MHz[0m
[0;32mI (43) boot.esp32: SPI Mode : DIO[0m
[0;32mI (48) boot.esp32: SPI Flash Size : 4MB[0m
[0;32mI (52) boot: Enabling RNG early entropy source...[0m
[0;32mI (58) boot: Partition Table:[0m
[0;32mI (61) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (69) boot: 0 nvs WiFi data 01 02 00009000 00006000[0m
[0;32mI (76) boot: 1 phy_init RF data 01 01 0000f000 00001000[0m
[0;32mI (84) boot: 2 factory factory app 00 00 00010000 00100000[0m
[0;32mI (91) boot: End of partition table[0m
[0;32mI (95) boot_comm: chip revision: 1, min. application chip revision: 0[0m
[0;32mI (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x062a8 ( 25256) map[0m
[0;32mI (121) esp_image: segment 1: paddr=0x000162d0 vaddr=0x3ffb0000 size=0x01850 ( 6224) load[0m
[0;32mI (124) esp_image: segment 2: paddr=0x00017b28 vaddr=0x40080000 size=0x084f0 ( 34032) load[0m
[17:05:05.884] [0;32mI (144) esp_image: segment 3: paddr=0x00020020 vaddr=0x400d0020 size=0x16234 ( 90676) map[0m
[17:05:05.913] [0;32mI (179) esp_image: segment 4: paddr=0x0003625c vaddr=0x400884f0 size=0x01c10 ( 7184) load[0m
[0;32mI (188) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (188) boot: Disabling RNG early entropy source...[0m
[0;32mI (188) cpu_start: Pro cpu up.[0m
[0;32mI (192) cpu_start: Application information:[0m
[0;32mI (197) cpu_start: Project name: uart_events[0m
[0;32mI (202) cpu_start: App version: 1[0m
[0;32mI (207) cpu_start: Compile time: Oct 13 2021 16:58:29[0m
[0;32mI (213) cpu_start: ELF file SHA256: 993e5e4a094a951d...[0m
[0;32mI (219) cpu_start: ESP-IDF: v4.2.2-193-g764f0db002-dirty[0m
[0;32mI (225) cpu_start: Single core mode[0m
[0;32mI (230) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (237) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM[0m
[0;32mI (243) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
[0;32mI (249) heap_init: At 3FFB1F90 len 0002E070 (184 KiB): DRAM[0m
[0;32mI (255) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM[0m
[0;32mI (262) heap_init: At 40078000 len 00008000 (32 KiB): IRAM[0m
[0;32mI (268) heap_init: At 4008A100 len 00015F00 (87 KiB): IRAM[0m
[0;32mI (274) cpu_start: Pro cpu start user code[0m
[0;32mI (292) spi_flash: detected chip: generic[0m
[0;32mI (292) spi_flash: flash i[0;32mI (296) uart: queue free spaces: 20[0m

xsrlfc
Posts: 3
Joined: Wed Oct 13, 2021 9:10 am

Re: esp32-wroom掉电后程序消失

Postby xsrlfc » Thu Oct 14, 2021 2:49 am

ESP_LJH wrote:
Wed Oct 13, 2021 11:07 am
怎么发现程序没有了?重新上电后是什么 log ?
问题应该是在重启过程中IO0被拉低了导致设备进入了下载启动模式,如果手动把IO0拉高的话就可以正常启动程序,所以程序确实是烧录进去了,谢谢

Who is online

Users browsing this forum: No registered users and 2 guests