Skip to content

M5 "5MP" does not read images / crashes #769

@RubenKelevra

Description

@RubenKelevra

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

The M5 "5MP" unit should be supported.

Actual behavior (suspected bug)

@turenkomv reported issues.

Error logs or terminal output

Without stack size increase:

 
[19:51:57]Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception). 
[19:51:57]Debug exception reason: Stack canary watchpoint triggered (framebuffer_tas) 
[19:51:57]Core  1 register dump:
[19:51:57]PC      : 0x4037ef9e  PS      : 0x00060836  A0      : 0x820494aa  A1      : 0x3fcb4780
WARNING Decoded 0x4037ef9e: xPortSetInterruptMaskFromISR at C:\Users\turen\.platformio\packages\framework-espidf\components\freertos\FreeRTOS-Kernel\portable\xtensa\include\freertos/portmacro.h:552
 (inlined by) xPortEnterCriticalTimeout at C:\Users\turen\.platformio\packages\framework-espidf\components\freertos\FreeRTOS-Kernel\portable\xtensa/port.c:478
[19:51:57]A2      : 0x3fc9ae6c  A3      : 0xffffffff  A4      : 0x00000007  A5      : 0x3fcb47be  
[19:51:57]A6      : 0x00000066  A7      : 0x00000064  A8      : 0x00060820  A9      : 0x3fcb4780
[19:51:57]A10     : 0x00060823  A11     : 0x00000000  A12     : 0x00060820  A13     : 0x00060223
[19:51:57]A14     : 0x00000000  A15     : 0x0000abab  SAR     : 0x00000018  EXCCAUSE: 0x00000001
[19:51:57]EXCVADDR: 0x00000000  LBEG    : 0x40056fc5  LEND    : 0x40056fe7  LCOUNT  : 0xffffffff


[19:51:57]Backtrace: 0x4037ef9b:0x3fcb4780 0x420494a7:0x3fcb47b0 0x420495cd:0x3fcb47d0 0x4200f9ed:0x3fcb47f0 0x42016ada:0x3fcb48d0 0x420a5a61:0x3fcb4910 0x40384606:0x3fcb4940 0x4201a84a:0x3fcb4990 0x42019d6a:0x3fcb49d0 0x4200bc76:0x3fcb49f0
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x4037ef9b: xPortSetInterruptMaskFromISR at C:\Users\turen\.platformio\packages\framework-espidf\components\freertos\FreeRTOS-Kernel\portable\xtensa\include\freertos/portmacro.h:552
 (inlined by) xPortEnterCriticalTimeout at C:\Users\turen\.platformio\packages\framework-espidf\components\freertos\FreeRTOS-Kernel\portable\xtensa/port.c:478
WARNING Decoded 0x420494a7: vPortEnterCritical at C:\Users\turen\.platformio\packages\framework-espidf\components\freertos\FreeRTOS-Kernel\portable\xtensa\include\freertos/portmacro.h:567
 (inlined by) find_key at C:\Users\turen\.platformio\packages\framework-espidf\components\pthread/pthread_local_storage.c:77
WARNING Decoded 0x420495cd: pthread_setspecific at C:\Users\turen\.platformio\packages\framework-espidf\components\pthread/pthread_local_storage.c:199
WARNING Decoded 0x4200f9ed: esphome::logger::Logger::check_and_set_task_log_recursion_(bool) at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/src/esphome/components/logger/logger.h:298
 (inlined by) esphome::logger::Logger::check_and_set_task_log_recursion_(bool) at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/src/esphome/components/logger/logger.h:287    
 (inlined by) esphome::logger::Logger::log_vprintf_(unsigned char, char const*, int, char const*, __va_list_tag) at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/src/esphome/components/logger/logger.cpp:35
WARNING Decoded 0x42016ada: esphome::esp_idf_log_vprintf_(char const*, __va_list_tag) at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/src/esphome/core/log.cpp:56
WARNING Decoded 0x420a5a61: esp_log_writev at C:\Users\turen\.platformio\packages\framework-espidf\components\log/log.c:210
WARNING Decoded 0x40384606: esp_log_write at C:\Users\turen\.platformio\packages\framework-espidf\components\log/log.c:220
WARNING Decoded 0x4201a84a: cam_take at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/managed_components/espressif__esp32-camera/driver/cam_hal.c:541 (discriminator 1)
WARNING Decoded 0x42019d6a: esp_camera_fb_get at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/managed_components/espressif__esp32-camera/driver/esp_camera.c:384
WARNING Decoded 0x4200bc76: esphome::esp32_camera::ESP32Camera::framebuffer_task(void*) at C:\Projects\m5stack-camera-1\.esphome\build\m5stack-camera-1/src/esphome/components/esp32_camera/esp32_camera.cpp:412


[Source](https://github.com/espressif/esp32-camera/pull/765#issuecomment-3045941004)

With stack size increase:


[23:40:49][W][esp32_camera:204]: Got invalid frame from camera!
[23:40:49]cam_hal: EV-EOF-OVF
...
[23:40:51]cam_hal: EV-EOF-OVF
[23:40:51][D][esp-idf:000][cam_task]: W (12646) cam_hal: NO-SOI - 100 additional misses
[23:40:51]cam_hal: EV-EOF-OVF
...
[23:40:53]cam_hal: EV-EOF-OVF
[23:40:53][W][esp32_camera:204]: Got invalid frame from camera!
[23:40:53][D][esp-idf:000][framebuffer_tas]: W (14666) cam_hal: Failed to get frame: timeout
[23:40:53]cam_hal: EV-EOF-OVF
...
[23:40:57]cam_hal: EV-EOF-OVF
[23:40:57][W][esp32_camera:204]: Got invalid frame from camera!
[23:40:57][D][esp-idf:000][framebuffer_tas]: W (18680) cam_hal: Failed to get frame: timeout
[23:40:57]cam_hal: EV-EOF-OVF
...
[23:41:01]cam_hal: EV-EOF-OVF
[23:41:01][W][esp32_camera:204]: Got invalid frame from camera!
[23:41:01][D][esp-idf:000][framebuffer_tas]: W (22693) cam_hal: Failed to get frame: timeout
[23:41:01]cam_hal: EV-EOF-OVF
...
[23:41:01]cam_hal: EV-EOF-OVF
[23:41:01][D][esp-idf:000][cam_task]: W (22934) cam_hal: NO-SOI - 100 additional misses
[23:41:01]cam_hal: EV-EOF-OVF
...
[23:41:05]cam_hal: EV-EOF-OVF
[23:41:05][W][esp32_camera:204]: Got invalid frame from camera!
[23:41:05][D][esp-idf:000][framebuffer_tas]: W (26707) cam_hal: Failed to get frame: timeout
[23:41:05]cam_hal: EV-EOF-OVF
...
[23:41:09]cam_hal: EV-EOF-OVF
[23:41:09][W][esp32_camera:204]: Got invalid frame from camera!
[23:41:09][D][esp-idf:000][framebuffer_tas]: W (30720) cam_hal: Failed to get frame: timeout
[23:41:09]cam_hal: EV-EOF-OVF
...
[23:41:11]cam_hal: EV-EOF-OVF
[23:41:11][D][esp-idf:000][cam_task]: W (32936) cam_hal: NO-SOI - 100 additional misses
[23:41:11]cam_hal: EV-EOF-OVF
...
[23:41:13]cam_hal: EV-EOF-OVF
[23:41:13][W][esp32_camera:204]: Got invalid frame from camera!
[23:41:13][D][esp-idf:000]cam_hal: EV-EOF-OVF
[23:41:13][framebuffer_tas]: W (34731) cam_hal: Failed to get frame: timeout


[Source](https://github.com/espressif/esp32-camera/pull/761#issuecomment-3040155353)

Steps to reproduce the behavior

Setup M5 "5MP" with something like ESPHome and see the esp32-camera library throw errors:

Project release version

2.1.0-ish

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Linux

Operating system version

unknown

Shell

Bash

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions