项目场景:
自制esp32板(esp32-pico-d4芯片)基于platform IO向esp32芯片烧录程序
问题描述
向芯片烧录程序时候,会报错(和程序内容无关,setup和loop函数都为空也会报错)。
- 在Arduino IDE上时,报错提示:
Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
- 在VScode PlatformIO上时,报错提示
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x00039fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 25424 bytes to 15903...
A fatal error occurred: Packet content transfer stopped (received 8 bytes)
原因分析:
PCB上gpio2或gpio12和3v3用上拉电阻画在了一块,为高电平。
我的电路板基本是照着几个开源项目改的,也并没有完全理解里边所有电阻电容线路的意义,可能有某个项目里需要把gpio2拉高,我抄过来了。
之前还一直觉得自己焊接水平的问题,折腾了好久,现在终于发现问题所在了。
解决方案:
把上拉电阻去掉,让gpio2保持低电平即可。