From 7064677811b373f6f597f5c1ca23a0c072da4c4a Mon Sep 17 00:00:00 2001 From: Minao Tarosay Yamamoto Date: Mon, 27 May 2024 03:12:16 +0900 Subject: [PATCH 1/6] feat(camera): Add GPIO pin numbers for M5Stack CamS3 Unit --- .../CameraWebServer/CameraWebServer.ino | 1 + .../Camera/CameraWebServer/camera_pins.h | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino b/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino index 54e2df8f38c..5c544c934bf 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino +++ b/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino @@ -21,6 +21,7 @@ //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM +//#define CAMERA_MODEL_M5STACK_CAMS3_UNIT // Has PSRAM //#define CAMERA_MODEL_AI_THINKER // Has PSRAM //#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM //#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h b/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h index 450ef6a93ff..fe45086eade 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h +++ b/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h @@ -136,6 +136,27 @@ #define HREF_GPIO_NUM 26 #define PCLK_GPIO_NUM 21 +#elif defined(CAMERA_MODEL_M5STACK_CAMS3_UNIT) +#define PWDN_GPIO_NUM -1 +#define RESET_GPIO_NUM 21 +#define XCLK_GPIO_NUM 11 +#define SIOD_GPIO_NUM 17 +#define SIOC_GPIO_NUM 41 + +#define Y9_GPIO_NUM 13 +#define Y8_GPIO_NUM 4 +#define Y7_GPIO_NUM 10 +#define Y6_GPIO_NUM 5 +#define Y5_GPIO_NUM 7 +#define Y4_GPIO_NUM 16 +#define Y3_GPIO_NUM 15 +#define Y2_GPIO_NUM 6 +#define VSYNC_GPIO_NUM 42 +#define HREF_GPIO_NUM 18 +#define PCLK_GPIO_NUM 12 + +#define LED_GPIO_NUM 14 + #elif defined(CAMERA_MODEL_AI_THINKER) #define PWDN_GPIO_NUM 32 #define RESET_GPIO_NUM -1 From 5aed5aaa6574daa8aa7443b42e8c447466e3ac37 Mon Sep 17 00:00:00 2001 From: Minao Tarosay Yamamoto Date: Mon, 27 May 2024 04:39:01 +0900 Subject: [PATCH 2/6] docs(troubleshooting): Update guide for M5UnitCamS3 PSRAM configuration --- docs/en/troubleshooting.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/troubleshooting.rst b/docs/en/troubleshooting.rst index b80b50203db..a86e018e30d 100644 --- a/docs/en/troubleshooting.rst +++ b/docs/en/troubleshooting.rst @@ -214,6 +214,8 @@ With this knowledge find your module in the table and note what is written in th - For QSPI go to Tools > PSRAM > QSPI PSRAM - For OPI go to Tools > PSRAM > OPI PSRAM +For M5UnitCamS3, make sure to select the board as "M5UnitCamS3" in the Arduino IDE and set the PSRAM option to "OPI PSRAM". This will help avoid compatibility issues. + Note that WROOM-2 has always OPI. +---------+--------+------------+-------+ From 5e3ebbdcd278c60d34408d90c1761ceb1734df41 Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Mon, 27 May 2024 14:11:57 +0200 Subject: [PATCH 3/6] fix(): Remove QSPI option from M5Stack CamS3 --- boards.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/boards.txt b/boards.txt index b8110d6eeb5..e0c22060c55 100644 --- a/boards.txt +++ b/boards.txt @@ -19365,7 +19365,7 @@ m5stack_unit_cams3.build.partitions=default m5stack_unit_cams3.build.defines= m5stack_unit_cams3.build.loop_core= m5stack_unit_cams3.build.event_core= -m5stack_unit_cams3.build.psram_type=qspi +m5stack_unit_cams3.build.psram_type=opi m5stack_unit_cams3.build.memory_type={build.boot}_{build.psram_type} ## IDE 2.0 Seems to not update the value @@ -19381,9 +19381,6 @@ m5stack_unit_cams3.menu.JTAGAdapter.bridge=ESP USB Bridge m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 -m5stack_unit_cams3.menu.PSRAM.enabled=QSPI PSRAM -m5stack_unit_cams3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -m5stack_unit_cams3.menu.PSRAM.enabled.build.psram_type=qspi m5stack_unit_cams3.menu.PSRAM.disabled=Disabled m5stack_unit_cams3.menu.PSRAM.disabled.build.defines= m5stack_unit_cams3.menu.PSRAM.disabled.build.psram_type=qspi From 4dca1db256c58bea83b095c174ccd530079f033c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 12:12:42 +0000 Subject: [PATCH 4/6] ci(pre-commit): Apply automatic fixes --- .../Camera/CameraWebServer/camera_pins.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h b/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h index fe45086eade..34085086769 100644 --- a/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h +++ b/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h @@ -137,23 +137,23 @@ #define PCLK_GPIO_NUM 21 #elif defined(CAMERA_MODEL_M5STACK_CAMS3_UNIT) -#define PWDN_GPIO_NUM -1 +#define PWDN_GPIO_NUM -1 #define RESET_GPIO_NUM 21 -#define XCLK_GPIO_NUM 11 -#define SIOD_GPIO_NUM 17 -#define SIOC_GPIO_NUM 41 - -#define Y9_GPIO_NUM 13 -#define Y8_GPIO_NUM 4 -#define Y7_GPIO_NUM 10 -#define Y6_GPIO_NUM 5 -#define Y5_GPIO_NUM 7 -#define Y4_GPIO_NUM 16 -#define Y3_GPIO_NUM 15 -#define Y2_GPIO_NUM 6 +#define XCLK_GPIO_NUM 11 +#define SIOD_GPIO_NUM 17 +#define SIOC_GPIO_NUM 41 + +#define Y9_GPIO_NUM 13 +#define Y8_GPIO_NUM 4 +#define Y7_GPIO_NUM 10 +#define Y6_GPIO_NUM 5 +#define Y5_GPIO_NUM 7 +#define Y4_GPIO_NUM 16 +#define Y3_GPIO_NUM 15 +#define Y2_GPIO_NUM 6 #define VSYNC_GPIO_NUM 42 -#define HREF_GPIO_NUM 18 -#define PCLK_GPIO_NUM 12 +#define HREF_GPIO_NUM 18 +#define PCLK_GPIO_NUM 12 #define LED_GPIO_NUM 14 From 6165bfdc3204c71a3112266fd37bdaa501acb17e Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Mon, 27 May 2024 14:16:56 +0200 Subject: [PATCH 5/6] fix(): Make OPI PSRAM option as default --- boards.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boards.txt b/boards.txt index e0c22060c55..e0fb66b2e8c 100644 --- a/boards.txt +++ b/boards.txt @@ -19381,12 +19381,12 @@ m5stack_unit_cams3.menu.JTAGAdapter.bridge=ESP USB Bridge m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1 -m5stack_unit_cams3.menu.PSRAM.disabled=Disabled -m5stack_unit_cams3.menu.PSRAM.disabled.build.defines= -m5stack_unit_cams3.menu.PSRAM.disabled.build.psram_type=qspi m5stack_unit_cams3.menu.PSRAM.opi=OPI PSRAM m5stack_unit_cams3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM m5stack_unit_cams3.menu.PSRAM.opi.build.psram_type=opi +m5stack_unit_cams3.menu.PSRAM.disabled=Disabled +m5stack_unit_cams3.menu.PSRAM.disabled.build.defines= +m5stack_unit_cams3.menu.PSRAM.disabled.build.psram_type=qspi m5stack_unit_cams3.menu.FlashMode.qio=QIO 80MHz m5stack_unit_cams3.menu.FlashMode.qio.build.flash_mode=dio From 5503188e17f1769d625b5293223b2e13b977f81e Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Mon, 27 May 2024 14:20:39 +0200 Subject: [PATCH 6/6] fix(): Revert troubleshooting addition --- docs/en/troubleshooting.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/en/troubleshooting.rst b/docs/en/troubleshooting.rst index a86e018e30d..b80b50203db 100644 --- a/docs/en/troubleshooting.rst +++ b/docs/en/troubleshooting.rst @@ -214,8 +214,6 @@ With this knowledge find your module in the table and note what is written in th - For QSPI go to Tools > PSRAM > QSPI PSRAM - For OPI go to Tools > PSRAM > OPI PSRAM -For M5UnitCamS3, make sure to select the board as "M5UnitCamS3" in the Arduino IDE and set the PSRAM option to "OPI PSRAM". This will help avoid compatibility issues. - Note that WROOM-2 has always OPI. +---------+--------+------------+-------+