Closed jack685 closed 1 year ago
esp-idf commit e7435a75f54372e9620b4dbf40e0cce584301c4f (HEAD)
@jack685 jd_prepare failed (6)
means JDR_FMT1, /* 6: Data format error (may be damaged data) */
Seems trying to decode a broken jpeg file.
@leeebo How to solve this problem? My hardware is ESP32-S2-kaluga-1 with OV2640, when i enable jpeg mode and report error log.
I have the same problem.
I (46) boot: ESP-IDF v4.2 2nd stage bootloader
I (46) boot: compile time 10:05:30
I (46) boot: chip revision: 0
I (47) qio_mode: Enabling default flash chip QIO
I (53) boot.esp32s2: SPI Speed : 80MHz
I (58) boot.esp32s2: SPI Mode : QIO
I (62) boot.esp32s2: SPI Flash Size : 4MB
I (67) boot: Enabling RNG early entropy source...
I (72) boot: Partition Table:
I (76) boot: ## Label Usage Type ST Offset Length
I (83) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (91) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (98) boot: 2 factory factory app 00 00 00010000 00100000
I (106) boot: End of partition table
I (110) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x0740c ( 29708) map
I (124) esp_image: segment 1: paddr=0x00017434 vaddr=0x3ffbea10 size=0x01d64 ( 7524) load
I (129) esp_image: segment 2: paddr=0x000191a0 vaddr=0x40024000 size=0x00404 ( 1028) load
I (137) esp_image: segment 3: paddr=0x000195ac vaddr=0x40024404 size=0x06a6c ( 27244) load
I (152) esp_image: segment 4: paddr=0x00020020 vaddr=0x40080020 size=0x191e0 (102880) map
I (173) esp_image: segment 5: paddr=0x00039208 vaddr=0x4002ae70 size=0x03b94 ( 15252) load
I (183) boot: Loaded app from partition at offset 0x10000
I (183) boot: Disabling RNG early entropy source...
I (185) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (192) cache: Data cache : size 8KB, 4Ways, cache line size 32Byte
I (199) spiram: Found 16MBit SPI RAM device
I (204) spiram: SPI RAM mode: sram 80m
I (209) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (216) cpu_start: Pro cpu up.
I (219) cpu_start: Application information:
I (224) cpu_start: Project name: esp32-s2-hmi
I (230) cpu_start: App version: 282a356-dirty
I (235) cpu_start: Compile time: May 10 2021 10:05:27
I (241) cpu_start: ELF file SHA256: 74d147c8e745ec1f...
I (247) cpu_start: ESP-IDF: v4.2
I (252) cpu_start: Single core mode
I (475) spiram: SPI SRAM memory test OK
I (475) heap_init: Initializing. RAM available for dynamic allocation:
I (475) heap_init: At 3FFC0FD8 len 0003B028 (236 KiB): DRAM
I (482) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (488) cpu_start: Pro cpu start user code
I (492) spiram: Adding pool of 2048K of external SPI memory to heap allocator
I (500) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (562) spi_flash: detected chip: gd
I (563) spi_flash: flash io: qio
I (563) cpu_start: Starting scheduler on PRO CPU.
I (565) gpio: GPIO[6]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (565) gpio: GPIO[11]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (575) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (585) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (595) lcd: lcd_buffer_size: 2048, lcd_dma_size: 1024, lcd_dma_node_cnt: 2
I (905) lcd: ILI19341 init...
I (1105) lcd: lcd init ok
I (1105) gpio: GPIO[2]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
I (1105) cam: cam_xclk_pin setup
I (1105) cam: cam_buffer_size: 2048, cam_dma_size: 1024, cam_dma_node_cnt: 2, cam_total_cnt: 150
I (1115) cam: frame1_buffer_en
I (1115) cam: frame2_buffer_en
I (1125) sccb: pin_sda 8 pin_scl 7
I (1365) main: sensor_id: 0x18
I (1365) main: OV2640 init start...
I (1415) OV2640: HID:9794
I (1455) main: camera init done
E (1615) jpeg: Image decoder: jd_prepare failed (6)
E (1695) jpeg: Image decoder: jd_prepare failed (6)
E (1775) jpeg: Image decoder: jd_prepare failed (6)
E (1865) jpeg: Image decoder: jd_prepare failed (6)
E (1945) jpeg: Image decoder: jd_prepare failed (6)
E (2025) jpeg: Image decoder: jd_prepare failed (6)
E (2115) jpeg: Image decoder: jd_prepare failed (6)
E (2195) jpeg: Image decoder: jd_prepare failed (6)
E (2275) jpeg: Image decoder: jd_prepare failed (6)
E (2365) jpeg: Image decoder: jd_prepare failed (6)
E (2445) jpeg: Image decoder: jd_prepare failed (6)
E (2525) jpeg: Image decoder: jd_prepare failed (6)
E (2615) jpeg: Image decoder: jd_prepare failed (6)
$ idf.py --version
ESP-IDF v4.2
I noted that my kaluga board is V1.2 so I changed that in two places in idf.py menuconfig
. However, that did not resolve the problem.
Turning off jpeg mode gave an image with severe banding and which becomes corrupted after a short time.
Sorry for not responding to your question in a timely manner! Since this problem has lost its time, I will close it after a week. If you still need to solve this problem, please leave a comment or open a new issue, thank you!
board: ESP32-s2-kaluga-1 , I enable jpeg mode ,but report err. what is the reason? I (185) boot: Loaded app from partition at offset 0x10000 I (185) boot: Disabling RNG early entropy source... I (187) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte I (194) cache: Data cache : size 8KB, 4Ways, cache line size 32Byte I (201) spiram: Found 16MBit SPI RAM device I (206) spiram: SPI RAM mode: sram 80m I (211) spiram: PSRAM initialized, cache is in normal (1-core) mode. I (218) cpu_start: Pro cpu up. I (221) cpu_start: Application information: I (226) cpu_start: Project name: esp32-s2-hmi I (232) cpu_start: App version: cb426b3-dirty I (237) cpu_start: Compile time: Mar 15 2021 11:58:10 I (243) cpu_start: ELF file SHA256: e3d0704fff0661e4... I (249) cpu_start: ESP-IDF: v4.2-332-ge7435a75f-dirty I (256) cpu_start: Single core mode I (478) spiram: SPI SRAM memory test OK I (479) heap_init: Initializing. RAM available for dynamic allocation: I (479) heap_init: At 3FFC0FB8 len 0003B048 (236 KiB): DRAM I (485) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM I (491) cpu_start: Pro cpu start user code I (496) spiram: Adding pool of 2048K of external SPI memory to heap allocator I (504) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations I (566) spi_flash: detected chip: generic I (566) spi_flash: flash io: qio I (566) cpu_start: Starting scheduler on PRO CPU. I (570) gpio: GPIO[6]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (570) gpio: GPIO[11]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (580) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (590) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (600) lcd: lcd_buffer_size: 2048, lcd_dma_size: 1024, lcd_dma_node_cnt: 2
I (910) lcd: ST7789 init...
I (910) lcd: lcd init ok
I (910) gpio: GPIO[2]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2 I (910) cam: cam_xclk_pin setup
I (910) cam: cam_buffer_size: 2048, cam_dma_size: 1024, cam_dma_node_cnt: 2, cam_total_cnt: 150
I (920) cam: frame1_buffer_en
I (930) cam: frame2_buffer_en
I (930) sccb: pin_sda 8 pin_scl 7
I (1180) main: sensor_id: 0x18
I (1180) main: OV2640 init start... I (1230) OV2640: HID:9794
I (1270) main: camera init done
E (1420) jpeg: Image decoder: jd_prepare failed (6) E (1520) jpeg: Image decoder: jd_prepare failed (6) E (1620) jpeg: Image decoder: jd_prepare failed (6) E (1730) jpeg: Image decoder: jd_prepare failed (6) E (1830) jpeg: Image decoder: jd_prepare failed (6) E (1940) jpeg: Image decoder: jd_prepare failed (6) E (2040) jpeg: Image decoder: jd_prepare failed (6) E (2150) jpeg: Image decoder: jd_prepare failed (6) E (2250) jpeg: Image decoder: jd_prepare failed (6) E (2360) jpeg: Image decoder: jd_prepare failed (6) E (2460) jpeg: Image decoder: jd_prepare failed (6) E (2570) jpeg: Image decoder: jd_prepare failed (6) E (2670) jpeg: Image decoder: jd_prepare failed (6) E (2780) jpeg: Image decoder: jd_prepare failed (6) E (2880) jpeg: Image decoder: jd_prepare failed (6) E (2990) jpeg: Image decoder: jd_prepare failed (6) E (3090) jpeg: Image decoder: jd_prepare failed (6) E (3200) jpeg: Image decoder: jd_prepare failed (6) E (3300) jpeg: Image decoder: jd_prepare failed (6) E (3410) jpeg: Image decoder: jd_prepare failed (6) E (3510) jpeg: Image decoder: jd_prepare failed (6) E (3620) jpeg: Image decoder: jd_prepare failed (6) E (3720) jpeg: Image decoder: jd_prepare failed (6) E (3830) jpeg: Image decoder: jd_prepare failed (6) E (3940) jpeg: Image decoder: jd_prepare failed (6) E (4040) jpeg: Image decoder: jd_prepare failed (6) E (4150) jpeg: Image decoder: jd_prepare failed (6) E (4250) jpeg: Image decoder: jd_prepare failed (6) E (4360) jpeg: Image decoder: jd_prepare failed (6) E (4460) jpeg: Image decoder: jd_prepare failed (6) E (4570) jpeg: Image decoder: jd_prepare failed (6) E (4670) jpeg: Image decoder: jd_prepare failed (6) E (4780) jpeg: Image decoder: jd_prepare failed (6) E (4880) jpeg: Image decoder: jd_prepare failed (6) E (4990) jpeg: Image decoder: jd_prepare failed (6) E (5090) jpeg: Image decoder: jd_prepare failed (6) E (5200) jpeg: Image decoder: jd_prepare failed (6) E (5300) jpeg: Image decoder: jd_prepare failed (6)