采用的芯片是ESP32-S3-WROOM,16MB FLASH
开发环境是Arduino,烧录到100%后直接报错。
以为是Arduino的问题,用esp-idf开发的程序,
烧录的过程中,也是直接报错如下:
esptool.py v4.7.0
Serial port /dev/cu.usbserial-56440166151
Connecting....
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: c0:4e:30:3e:58:24
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 0x00152fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00208000 to 0x00365fff...
Flash will be erased from 0x00366000 to 0x00734fff...
Compressed 20928 bytes to 13297...
Wrote 20928 bytes (13297 compressed) at 0x00000000 in 0.4 seconds (effective 417.5 kbit/s)...
File md5: 1366b64025539a31228b2822eaa645b0
Flash md5: 33aeb93e517136b94de9c39cb103909b
MD5 of 0xFF is f6e84a245ec15ff98f659e6f703ad42dA fatal error occurred: MD5 of file does not match data in flash!
A fatal error occurred: MD5 of file does not match data in flash!
多吃尝试、修改传输率,修改各种配置,都不行。
网上说执行这个命令:
esptool.py --port /dev/cu.usbserial-56440166151 write_flash_status --non-volatile 0
运行结果如下:
esptool.py v4.7.0
Serial port /dev/cu.usbserial-56440166151
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: c0:4e:30:3e:58:24
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0x0200
Setting flash status: 0x0000
After flash status: 0x0200
Hard resetting via RTS pin...
在Setting flash后,After flash status还是没有改变,修改了个寂寞。
所以还是报一样的A fatal error occurred: MD5 of file does not match data in flash!
在网上找了好久,也没有解决办法,头都大了。
于是开始检查硬件本身。
发现焊接有一点点的连锡,
然后立刻重新焊接解决了连锡问题,再次进行烧录。
发现问题依然还在。程序还是烧录不进去。并且发现用
esptool.py erase_flash
擦除flash也擦除不了,感觉像是有了写保护。
继续搜索发现
网上有说到,有些引脚拉高了会有其它含义,如设置供电电压等。
于是乎,赶紧拿万用表每个引脚测量了一下,发现有些引脚上有些电压。
原来我是用USB转串口烧录器上的3.3V电源供电,导致有电压回流,部分引脚回流了电压,导致了这个情况?
立刻尝试不要用USB烧录器的电源供电,直接用板子本身的电源供电,然后果然,
再次烧录程序后,不再报错,程序烧录成功!问题解决!
看来这种大多是硬件上的问题,要仔细检查方可避免和解决。