当前位置: 首页 > article >正文

记录一下乐鑫官方仓库ESP32-CAMERA,在使用esp32s3 wroom n16r8 CAM开发板时遇到的问题。

背景

硬件为ESP32-S3 WROOM N16R8 CAM开发板
摄像头为OV2640
开发使用的项目地址为https://github.com/espressif/esp32-camera
开发环境为esp-idf,Linux编译下载加vscode编辑代码
使用的例程为esp32-camera/examples/camera_example
使用的esp-idf版本为v4.4.3

问题&解决

问题1:menuconfig配置

PSRAM需要配置为下图所示
在这里插入图片描述
flash需要配置为16m
在这里插入图片描述

问题2:引脚配置问题

官方默认配置的CAM_PIN使用会出现不断重启问题,排查后可以发现是引脚配置错误,相应的log如下所示

I (757) spi_flash: detected chip: generic
I (761) spi_flash: flash io: qio
I (765) sleep: Configure to isolate all GPIO pins in sleep state
I (772) sleep: Enable automatic switching of GPIO sleep configuration
I (779) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (794) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4200f502  PS      : 0x00060830  A0      : 0x82006fc6  A1      : 0x3fcf3a40  
0x4200f502: ll_cam_set_pin at /home/li/LocalWare/esp32-camera/target/esp32s3/ll_cam.c:370

A2      : 0x3fc99638  A3      : 0x3fc9551c  A4      : 0x3c03a3b0  A5      : 0x3c03a408  
A6      : 0x0000001f  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00000060  A12     : 0x00000008  A13     : 0x00000060  
A14     : 0x60020000  A15     : 0xb81fc000  SAR     : 0x00000011  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  

将引脚配置更改为下列内容即可正常使用

#define CAM_PIN_PWDN -1  //power down is not used
#define CAM_PIN_RESET -1 //software reset will be performed
#define CAM_PIN_XCLK 15
#define CAM_PIN_SIOD 4
#define CAM_PIN_SIOC 5

#define CAM_PIN_D7      11
#define CAM_PIN_D6      9
#define CAM_PIN_D5      8
#define CAM_PIN_D4      10
#define CAM_PIN_D3      12
#define CAM_PIN_D2      18
#define CAM_PIN_D1      17
#define CAM_PIN_D0      16

#define CAM_PIN_VSYNC   6
#define CAM_PIN_HREF    7
#define CAM_PIN_PCLK    13

后续有遇到其他问题还会补充到这个文档中。

参考内容

问题1解决参考:https://blog.csdn.net/Ender_LJY/article/details/139236037
问题2解决参考:https://blog.csdn.net/whhskkaka/article/details/142553523
非常感谢上述文章作者所提供的帮助。


http://www.kler.cn/news/361316.html

相关文章:

  • 刷题小记9:回溯
  • to_sql报错not all arguments converted during string formatting
  • 5.redis安装【Docker】
  • vscode 预览markdown 文件
  • 【C++干货篇】——类和对象的魅力(四)
  • 【C++贪心】1536. 排布二进制网格的最少交换次数|1880
  • 【动手学深度学习】8.2. 文本预处理(个人向笔记)
  • 【Flutter】基础组件:图标
  • 特殊类设计与设计模式
  • C# lambda表达式语法简介
  • 安装gpu版本的tensorflow-2.11
  • 简介阿里云大模型的基本概况和产品矩阵
  • HTTP 请求中的Content-Type
  • Wooden UI(木头UI纹理按钮边框 背景图标 带PNG素材)
  • C++sort排序
  • 每日回顾:用C写简单的数组OJ题
  • 实践笔记 - 微服务架构下RESTful风格api之我为何抛弃了路由参数
  • 【Flutter】Dart:运算符
  • SQL 干货 | SQL 半连接
  • JVM进阶调优系列(5)CMS回收器通俗演义一文讲透FullGC