ESP32-C2 烧录

写复杂了

烧录程序需要 io8 上拉 io9下载 (加10k电阻下拉)

烧录口为uart0 (烧at固件,输出为uart1)

chip_en 加10k 1uf(o.1uf) 电容电阻,加个开关 

烧录好后 io9县空,从flash启动 

idf.py -p com24不知为什么烧录总错误,使用flash downloader(at固件烧录工具却可以)

arduino 上没有c2的板;只有8266 c3 s2 s3 ; (所以只能用idf烧录或是flash downloader烧录)

晶振,没有晶振晶片运行不了;

电源,每个电源都需要接上,你可以不接电容,电感,但都需要接上电源3.3 

1C2内置flash不需要外加flash模块;但在arduino上没有相应的开发板可选择 (使用at固件的下载工具 flashdownloader 或是idf开发包的下载工具)

GitHub - espressif/arduino-esp32: Arduino core for the ESP32

http://t.csdnimg.cn/3B6ZH AT指令使用

d41e90a8f91445f98e2dc9f9f1b98385.png

GitHub - espressif/arduino-esp32: Arduino core for the ESP32

2有两个串口uart0 用于下载固件,uart1 用于输入输出 信息 utx io8用于输出测试信息(查看at固件烧写教程)

硬件,原理图分散在多个文件中,查看模组文件或开发板文件

硬件指南

没有内部振荡器,需外加晶振,26M或40M,1.0含1.0的版本,只能使用26M晶振)

供电需要全部供上,否则无法正常工作 

原理图设计 - ESP32-C2 - — ESP 硬件设计指南 latest 文档

f3de3185d63c4666bf0fced1c04e8cb8.png

4 UART0 用于烧写固件 

3 io9 10k 下拉 io8 10k上拉 用于下载模式; 

5 uart1 rx tx 用于at 外部输出输出交互 

2需要一1个10k 1uf(0.1uf)电容,使用en上电时间 迟于vcc

1.晶振,必须,否则无法运行 

BOOT引脚  

dtr dcr 启动 

正常烧录的话应该显示下列信息

12:35:39: Error: Unable to set default locale: 'unsupported locale setting'
C:\Users\Administrator\Desktop\ESP32-C2-2MB-AT-V3.3.0.0\ESP32-C2-2MB-AT-V3.3.0.0\factory
D:\ESPC2TEST\hello_world\build\bootloader\bootloader.bin
D:\ESPC2TEST\hello_world\build\bootloader
D:\ESPC2TEST\hello_world\build\partition_table\partition-table.bin
D:\ESPC2TEST\hello_world\build\partition_table
D:\ESPC2TEST\hello_world\build\hello_world.bin
null
null
2 kill
test offset :  0 0x0
case ok
2 kill
test offset :  32768 0x8000
case ok
3 kill
test offset :  65536 0x10000
case ok
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case ok
dl_list:[['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 0], ['D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 32768], ['D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin', 65536]]
[0, 32768, 65536]
['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 'D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 'D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin']
i:  0
size_speed : 16
i:  1
i:  2
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case ok
dl_list:[['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 0], ['D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 32768], ['D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin', 65536]]
[0, 32768, 65536]
['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 'D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 'D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin']
i:  0
size_speed : 16
i:  1
i:  2
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case ok
.......................................................................................
Uploading stub...
Running stub...
Packet content transfer stopped (received 0 bytes)
[2024-07-31 12:37:13,128][ESP8266Loader_spi[1]][espDownloader.py][line:775][ERROR]: ESP32C2 Chip stub error esp_stub_and_set_baud.
no log file output ...
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case okStub is already running. No upload is necessary.
Changing baud rate to 115200
Changed.
NO XMC flash  detected!
SPI_BOOT_CRYPT_CNT 0
SECURE_BOOT_EN False
Compressed 18512 bytes to 11283...
Compressed 3072 bytes to 103...
Compressed 105568 bytes to 56589...is stub and send flash finish12:35:39: Error: Unable to set default locale: 'unsupported locale setting'
C:\Users\Administrator\Desktop\ESP32-C2-2MB-AT-V3.3.0.0\ESP32-C2-2MB-AT-V3.3.0.0\factory
D:\ESPC2TEST\hello_world\build\bootloader\bootloader.bin
D:\ESPC2TEST\hello_world\build\bootloader
D:\ESPC2TEST\hello_world\build\partition_table\partition-table.bin
D:\ESPC2TEST\hello_world\build\partition_table
D:\ESPC2TEST\hello_world\build\hello_world.bin
null
null
2 kill
test offset :  0 0x0
case ok
2 kill
test offset :  32768 0x8000
case ok
3 kill
test offset :  65536 0x10000
case ok
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case ok
dl_list:[['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 0], ['D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 32768], ['D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin', 65536]]
[0, 32768, 65536]
['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 'D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 'D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin']
i:  0
size_speed : 16
i:  1
i:  2
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case ok
dl_list:[['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 0], ['D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 32768], ['D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin', 65536]]
[0, 32768, 65536]
['D:\\ESPC2TEST\\hello_world\\build\\bootloader\\bootloader.bin', 'D:\\ESPC2TEST\\hello_world\\build\\partition_table\\partition-table.bin', 'D:\\ESPC2TEST\\hello_world\\build\\hello_world.bin']
i:  0
size_speed : 16
i:  1
i:  2
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case ok
.......................................................................................
Uploading stub...
Running stub...
Packet content transfer stopped (received 0 bytes)
[2024-07-31 12:37:13,128][ESP8266Loader_spi[1]][espDownloader.py][line:775][ERROR]: ESP32C2 Chip stub error esp_stub_and_set_baud.
no log file output ...
test offset :  0 0x0
case ok
test offset :  32768 0x8000
case ok
test offset :  65536 0x10000
case okStub is already running. No upload is necessary.
Changing baud rate to 115200
Changed.
NO XMC flash  detected!
SPI_BOOT_CRYPT_CNT 0
SECURE_BOOT_EN False
Compressed 18512 bytes to 11283...
Compressed 3072 bytes to 103...
Compressed 105568 bytes to 56589...is stub and send flash finish

串口肋手程序内应显示如下内容 Helloword

[0;32mI (264) cpu_start: Pro cpu up.[0m
[0;32mI (276) cpu_start: Pro cpu start user code[0m
[0;32mI (276) cpu_start: cpu freq: 120000000 Hz[0m
[0;32mI (276) cpu_start: Application information:[0m
[0;32mI (281) cpu_start: Project name:     hello_world[0m
[0;32mI (289) cpu_start: App version:      1[0m
[0;32mI (296) cpu_start: Compile time:     Jul 30 2024 16:30:27[0m
[0;32mI (305) cpu_start: ELF file SHA256:  097d4462693816bf...[0m
[0;32mI (315) cpu_start: ESP-IDF:          v5.0.4-dirty[0m
[0;32mI (323) cpu_start: Min chip rev:     v1.0[0m
[0;32mI (330) cpu_start: Max chip rev:     v1.99 [0m
[0;32mI (338) cpu_start: Chip rev:         v1.2[0m
[0;32mI (345) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (356) heap_init: At 3FCAACA0 len 00031ED0 (199 KiB): D/IRAM[0m
[0;32mI (366) heap_init: At 3FCDCB70 len 0000294C (10 KiB): STACK/DRAM[0m
[0;32mI (378) spi_flash: detected chip: generic[0m
[0;32mI (383) spi_flash: flash io: dio[0m
[0;32mI (390) app_start: Starting scheduler on CPU0[0m
[0;32mI (397) main_task: Started on CPU0[0m
[0;32mI (397) main_task: Calling app_main()[0m
Hello world!
This is esp32c2 chip with 1 CPU core(s), WiFi/BLE, silicon revision v1.2, 2MB embedded flash
Minimum free heap size: 200400 bytes
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
Restarting in 5 seconds...
Restarting in 4 seconds...
Restarting in 3 seconds...
Restarting in 2 seconds...

arduino 上没有对应的开发板类型(官网上有介绍,可以加,但要修改github GitHub - espressif/arduino-esp32: Arduino core for the ESP32

使用Idf开发软件支持部下载,或是使用flash downloader 下载(at固件下载的工具

ESP-IDF 入门指南 | 乐鑫科技

快速入门 - ESP32-C2 - — ESP-IDF 编程指南 v5.3 文档

下载 

idf下载,flash downloader 下载 

at固件下载,有两种方式,分散的与单一一个下载

硬件连接 - ESP32-C2 - — ESP-AT 用户指南 latest 文档

(c2 有两个uart口一个用于下载,一个用于外部命令响应)使用uart0只能下载,不会有输出 

ba445a23f3bc45fd810d90a16ed3e6c8.png

AT固件下载方式有两种,单文件下载;多文件下载

下载指导 - ESP32-C2 - — ESP-AT 用户指南 latest 文档

332caf55e9294507bf48033de13063ec.png998365f3fd394fa29b25dd9c4bde0659.png

c2版本的有一个2m和4m的内部flash (其它版本的有的不含内部flash需要加外flash 8266 c3 ...

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/3281069.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

本田Honda EDI项目案例:非EDI标准的数据格式转换与传输

近期知行帮助东风本田Honda的供应商E公司成功实施EDI项目,与以往采用X12、EDIFACT等EDI标准的项目不同,Honda向其供应商提供API接口,以JSON的格式传输库存信息以及生产计划。 EDI需求概览 Honda提供公开的WSRM系统供应商API接口&#xff0c…

如何通过前端表格控件实现自动化报表?

背景 最近伙伴客户的项目经理遇见一个问题,他们在给甲方做自动化报表工具,项目已经基本做好了,但拿给最终甲方,业务人员不太买账,项目经理为此也是天天抓狂,没有想到合适的应对方案。 现阶段主要面临的问…

深入理解 go context

打个广告:欢迎关注我的微信公众号,在这里您将获取更全面、更新颖的文章! 原文链接:深入理解 go context 欢迎点赞关注 context 介绍 context 是 Go 语言中用于处理并发操作的一个重要概念。context也被称作上下文,主要…

Mirror学习笔记(二) 传输协议

文章目录 一、KCP传输协议二、Telepathy 传输协议三、WebSockets传输协议四、多路复用传输:五、延迟模拟传输:六、Ignorance协议七、LiteNetLib协议八、FizzSteamworks协议九、FizzyFacepunch协议十、加密协议十一、Edgegap协议 一、KCP传输协议 KCP是M…

热力图大揭秘!Matplotlib教你如何画出让数据‘火辣辣‘的激情图!

1. 引言 嘿,小伙伴们!今天咱们来点不一样的,走进Matplotlib的神奇世界,一起绘制那让人热血沸腾的热力图!别误会,这可不是什么天气预报图,而是让数据“火辣辣”展现自我的秘密武器。想象一下&am…

Adobe XD安装破解

文章目录 下载链接安装教程打开软件 下载链接 通过百度网盘分享的文件:Adobe XD 57.rar 链接:https://pan.baidu.com/s/14v_8EeKSyAtZoXT2nofCtQ 提取码:6qxx 安装教程 以管理员身份运行 安装完成后点击关闭 稍微等待一会,不…

linux编写shell脚本字段部署redis6.x版本,docker使用shell脚本一键自动部署redis

1.先创建部署脚本 touch redis.sh2.粘贴部署脚本内容到redis.sh echo "在线安装redis开始...." docker pull redis:6.2.1 sudo mkdir -p /home/admin/redis/{data,conf} sudo touch /home/admin/redis/conf/redis.conf echo " #注释掉这部分,这是限…

Yolov5-v7.0使用CBAM注意力机制记录

Yolov5-v7.0使用CBAM注意力机制记录 一、CBAM实现代码 在model/common.py文件中加入如下代码: #############CBAM注意力机制############## class ChannelAttention(nn.Module):def __init__(self, in_planes, ratio16):super(ChannelAttention, self).__init__(…

力扣高频SQL 50题(基础版)第三十三题

文章目录 力扣高频SQL 50题(基础版)第三十三题610.判断三角形题目说明实现过程准备数据实现方式结果截图 力扣高频SQL 50题(基础版)第三十三题 610.判断三角形 题目说明 表: Triangle ----------------- | Column Name | Typ…

pytorch学习笔记2 创建tensor

1 从numpy导入 anp.array([2,3.3]) torch.from_numpy(a)bnp.ones([2,3]) torch.from_numpy(b)2从list导入 torch.tensor([2.,3.2]) torch.FloatTensor([2.,3.2]) torch.tensor([[2.,3.2],[1.,22.3]]) 3 未初始化的随机数据 Torch.empty()Torch.FloatTensor(d1,d…

【MySQL】索引 【下】{聚簇索引VS非聚簇索引/创建主键索引/全文索引的创建/索引创建原则}

文章目录 1.聚簇索引 VS 非聚簇索引经典问题 2.索引操作创建主键索引唯一索引的创建普通索引的创建全文索引的创建查询索引删除索引索引创建原则 1.聚簇索引 VS 非聚簇索引 之前介绍的将所有的数据都放在叶子节点的这种存储引擎对应的就是 InnoDB 默认存储表数据的存储结构。 …

MySQL从jsonarray获取某个字段的所有数据

表结构。表里的order_goods_info_vo_list是jsonarray字段 CREATE TABLE pdd_charge_back_bantuo (id int(11) NOT NULL AUTO_INCREMENT,shopname varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 店铺名,charge_back_sn varchar(64) COLLATE utf8mb4_bin DEFAULT NULL …

2000-2023年上市公司财务困境数据Oscore模型(含原始数据+计算结果)

2000-2023年上市公司财务困境数据Oscore模型(含原始数据计算结果) 1、2000-2023年 2、指标:证券代码、证券简称、统计截止日期、是否发生ST或*ST或PT、是否发生暂停上市、行业代码、行业名称、上市日期、总资产(元)、…

Docker Desktop安装(通俗易懂)

1、官网 https://www.docker.com/products/docker-desktop/ 2、阿里云镜像 docker-toolbox-windows-docker-for-windows安装包下载_开源镜像站-阿里云 1. 双击安装文件勾选选项 意思就是: Use WSL 2 instead of Hyper-V (recommended) : 启用虚拟化,…

IDEA对线上项目远程debug

1、在启动脚本上添加以下配置内容 -agentlib:jdwptransportdt_socket,servery,suspendn,address*:5005 nohup java -agentlib:jdwptransportdt_socket,servery,suspendn,address5005 -jar test.jar > misc.out & 2、在IDEA中进行配置 (1)选择远程…

红外激光模组如何升级为现代科技的璀璨明珠

在日新月异的科技领域中,红外激光模组以其独特的应用价值和卓越的性能,成为了众多行业的宠儿。从通信、测距、监控到医疗,红外激光模组以其广泛的应用场景,不断推动着现代科技的进步与发展。接下来我们就跟着鑫优威一起来了解一下…

详解Qt 之QByteArray

文章目录 详解Qt之QByteArray前言QByteArray概念作用为什么需要 QByteArrayQByteArray 的主要函数和成员函数列表 示例代码示例 1:字节数组的基本操作示例 2:数据编码和解码示例 3:字节数组的字符串操作 更多用法... 总结 详解Qt之QByteArray…

vue3+fetch请求+接收到流式的markdown数据+一边gpt打字机式输出内容,一边解析markdown语法+highlight.js实现代码高亮

这个问题终于解决了!好开心。 先看最终效果: video_20240724_141543_edit 项目背景:vue3 场景:像gpt一样可以对话,当用户发送问题之后,ai回复,ai是一部分一部分回复,像打印机式输出…

微服务-服务拆分-服务远程调用

查询订单demo 通过Bean的方式将RestTemplate注册为Spring的一个对象,即注入Spring容器(要写在配置类中,启动类本身就是配置类)。然后在任何地方都可以注入该对象使用。 Eureka注册中心 Eureka服务搭建 Eureka客户端注册 配置服务…

Java与模式及其应用场景知识点分享(电子版)

前言 Java 编程语言自1995年问世以来,其成功好像任何编程语言都无法媲美。生逢其时(互联网的兴起)固然是一方面的原因,而Java吸收总结了前人的经验教训,反映了最新技术(the state ofthe art),对其受到欢迎和采用,恐怕…