Open wuujooon opened 3 years ago
USB related examples are only supported with IDF master branch (future IDF 4.4), you can try with IDF lastest master for both your Camera project and usb_cdc_4g_module project.
Have you finished your project? I want to use 4G module on S3 with camera too...
I'm working on a project with function usb_cdc_4g_module and OV5640 camera, I refer to idf_usb_support_patch/readme using idf 166c30e7b2ed1d,and git clone esp32-camera,change the gpio to fit my OV5640 module,build and flash is OK,but when monitor,esp32s2 always reboot,the log is as follows: Executing action: monitor Serial port /dev/cu.usbserial-14340 Connecting..... Detecting chip type... ESP32-S2 Running idf_monitor in directory /Users/wj/code/esp/esp32-camera/examples Executing "/Users/wj/.espressif/python_env/idf4.4_py3.9_env/bin/python /Users/wj/code/esp/esp-idf/tools/idf_monitor.py -p /dev/cu.usbserial-14340 -b 115200 --toolchain-prefix xtensa-esp32s2-elf- --target esp32s2 /Users/wj/code/esp/esp32-camera/examples/build/camera_example.elf -m '/Users/wj/.espressif/python_env/idf4.4_py3.9_env/bin/python' '/Users/wj/code/esp/esp-idf/tools/idf.py'"... --- idf_monitor on /dev/cu.usbserial-14340 115200 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ESP-ROM:esp32s2-rc4-20191025 Build:Oct 25 2019 rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3ffe6100,len:0x17b0 load:0x4004c000,len:0xcf8 load:0x40050000,len:0x2c5c entry 0x4004c238 I (21) boot: ESP-IDF v4.4-dev-2184-g166c30e7b2-dirty 2nd stage bootloader I (21) boot: compile time 17:40:00 I (22) boot: chip revision: 0 I (26) qio_mode: Enabling default flash chip QIO I (31) boot.esp32s2: SPI Speed : 80MHz I (36) boot.esp32s2: SPI Mode : QIO I (41) boot.esp32s2: SPI Flash Size : 4MB I (45) boot: Enabling RNG early entropy source... I (51) boot: Partition Table: I (54) boot: ## Label Usage Type ST Offset Length I (62) boot: 0 nvs WiFi data 01 02 00011000 00006000 I (69) boot: 1 phy_init RF data 01 01 00017000 00001000 I (77) boot: 2 factory factory app 00 00 00020000 00100000 I (84) boot: End of partition table I (88) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=0b940h ( 47424) map I (105) esp_image: segment 1: paddr=0002b968 vaddr=3ffc0440 size=02db8h ( 11704) load I (108) esp_image: segment 2: paddr=0002e728 vaddr=40024000 size=018f0h ( 6384) load I (115) esp_image: segment 3: paddr=00030020 vaddr=40080020 size=1e40ch (123916) map I (143) esp_image: segment 4: paddr=0004e434 vaddr=400258f0 size=0ab4ch ( 43852) load I (153) esp_image: segment 5: paddr=00058f88 vaddr=50000000 size=00010h ( 16) load I (160) boot: Loaded app from partition at offset 0x20000 I (160) boot: Disabling RNG early entropy source... I (174) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte I (174) cache: Data cache : size 8KB, 4Ways, cache line size 32Byte I (178) spiram: Found 16MBit SPI RAM device I (183) spiram: SPI RAM mode: sram 80m I (187) spiram: PSRAM initialized, cache is in normal (1-core) mode. I (194) cpu_start: Pro cpu up. I (417) sf?ff????PI SRAM memory test OK I (426) cpu_start: Pro cpu start user code I (426) cpu_start: cpu freq: 240000000 I (426) cpu_start: Application information: I (428) cpu_start: Project name: camera_example I (434) cpu_start: App version: d1f6b9c-dirty I (440) cpu_start: Compile time: Aug 25 2021 19:18:07 I (446) cpu_start: ELF file SHA256: 0f90ddbd6e1c0d33... I (452) cpu_start: ESP-IDF: v4.4-dev-2184-g166c30e7b2-dirty I (459) heap_init: Initializing. RAM available for dynamic allocation: I (466) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM I (472) heap_init: At 3FFC3AB0 len 00038550 (225 KiB): DRAM I (478) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM I (485) spiram: Adding pool of 2048K of external SPI memory to heap allocator I (493) spi_flash: detected chip: generic I (497) spi_flash: flash io: qio I (501) cpu_start: Starting scheduler on PRO CPU. I (506) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations I (514) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2 I (524) cam_hal: cam init ok I (527) sccb: pin_sda 1 pin_scl 0 I (544) camera: Detected camera at address=0x3c I (548) ov3660: Mismatch PID=0x5640 I (552) camera: Detected OV5640 camera I (552) camera: Camera PID=0x5640 VER=0x00 MIDL=0x00 MIDH=0x00 I (1309) s2 ll_cam: node_size: 3840, nodes_per_line: 1, lines_per_node: 6 I (1309) s2 ll_cam: dma_half_buffer_min: 3840, dma_half_buffer: 15360, lines_per_half_buffer: 24, dma_buffer_size: 30720 I (1317) cam_hal: buffer_size: 30720, half_buffer_size: 15360, node_buffer_size: 3840, node_cnt: 8, total_cnt: 10 I (1328) cam_hal: Allocating 153600 Byte frame buffer in PSRAM I (1334) cam_hal: cam config ok I (1367) ov5640: Set PLL: bypass: 0, multiplier: 8, sys_div: 1, pre_div: 1, root_2x: 0, pclk_root_div: 1, pclk_manual: 1, pclk_div: 4 I (1368) ov5640: Calculated XVCLK: 20000000 Hz, REFIN: 20000000 Hz, VCO: 160000000 Hz, PLL_CLK: 64000000 Hz, SYSCLK: 16000000 Hz, PCLK: 8000000 Hz ESP-ROM:esp32s2-rc4-20191025 Build:Oct 25 2019 rst:0x8 (TG1WDT_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT) Saved PC:0x4002a104 0x4002a104: _xt_context_save at /Users/wj/code/esp/esp-idf/components/freertos/port/xtensa/xtensa_context.S:118
SPIWP:0xee mode:DIO, clock div:1 load:0x3ffe6100,len:0x17b0 load:0x4004c000,len:0xcf8 load:0x40050000,len:0x2c5c entry 0x4004c238 I (24) boot: ESP-IDF v4.4-dev-2184-g166c30e7b2-dirty 2nd stage bootloader I (24) boot: compile time 17:40:00 I (25) boot: chip revision: 0 I (28) qio_mode: Enabling default flash chip QIO I (34) boot.esp32s2: SPI Speed : 80MHz I (38) boot.esp32s2: SPI Mode : QIO I (43) boot.esp32s2: SPI Flash Size : 4MB W (48) boot.esp32s2: PRO CPU has been reset by WDT. W (53) boot.esp32s2: WDT reset info: PRO CPU PC=0x4004c488 I (59) boot: Enabling RNG early entropy source... I (65) boot: Partition Table: I (68) boot: ## Label Usage Type ST Offset Length I (76) boot: 0 nvs WiFi data 01 02 00011000 00006000 I (83) boot: 1 phy_init RF data 01 01 00017000 00001000 I (91) boot: 2 factory factory app 00 00 00020000 00100000 I (98) boot: End of partition table I (102) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=0b940h ( 47424) map I (119) esp_image: segment 1: paddr=0002b968 vaddr=3ffc0440 size=02db8h ( 11704) load I (122) esp_image: segment 2: paddr=0002e728 vaddr=40024000 size=018f0h ( 6384) load I (129) esp_image: segment 3: paddr=00030020 vaddr=40080020 size=1e40ch (123916) map I (157) esp_image: segment 4: paddr=0004e434 vaddr=400258f0 size=0ab4ch ( 43852) load I (167) esp_image: segment 5: paddr=00058f88 vaddr=50000000 size=00010h ( 16) load I (174) boot: Loaded app from partition at offset 0x20000 I (174) boot: Disabling RNG early entropy source... I (188) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte I (188) cache: Data cache : size 8KB, 4Ways, cache line size 32Byte
so, can commit 166c30e7b2ed1d idf support esp32-camera?or Can i use release/v4.3 idf to support usb_cdc_4g_module and esp32-camera.