Description
Describe the bug
Building the capture sample on frdm_mcxn947
board, after the rework to enable video, the capture does work or does not work depending on the log mode.
Below the focus is on samples/drivers/video/capture
only.
Thank you to @marinjurjevic for discovering and investigating this!
Regression
- This is a regression.
Steps to reproduce
[EDIT] See below for the actual build command.
west build -b frdm_mcxn947/mcxn947/cpu0 --shield dvp_20pin_ov7670 samples/drivers/video/capture -- -DCONFIG_LOG_MODE_DEFERRED=y
(andwest flash
) => no crashwest build -b frdm_mcxn947/mcxn947/cpu0 --shield dvp_20pin_ov7670 samples/drivers/video/capture -- -DCONFIG_LOG_MODE_IMMEDIATE=y
(andwest flash
) => crash
Relevant log output
[EDIT] See below for the actual output
With CONFIG_LOG_MODE_DEFERRED=y
*** Booting Zephyr OS build v4.1.0-7085-gba905d045b97 ***
[00:00:00.045,000] main: Video device: video-sdma
[00:00:00.045,000] main: - Capabilities:
[00:00:00.045,000] main: RGBP width [320; 320; 0] height [240; 240; 0]
[00:00:00.045,000] main: - Video format: RGBP 320x240
[00:00:00.048,000] main: - Supported frame intervals for the default format:
[00:00:00.048,000] main: - Supported controls:
[00:00:00.048,000] main: device: ov7670@21
[00:00:00.048,000] video_ctrls: Horizontal Flip 0x00980914 (bool) (flags=0x00) : min=0 max=1 step=1 default=0 value=0
[00:00:00.048,000] video_ctrls: Vertical Flip 0x00980915 (bool) (flags=0x00) : min=0 max=1 step=1 default=0 value=0
[00:00:00.048,000] main: Capture started
uart:~$
With CONFIG_LOG_MODE_IMMEDIATE=y
[00:00:00.048,000] main: - Supported frame intervals for the default format:
[00:00:00.058,000] main: - Supported controls:
[00:00:00.065,000] main: device: ov7670@21
[00:00:00.073,000] os: ***** USAGE FAULT *****
[00:00:00.081,000] os: Stack overflow (context area not valid)
[00:00:00.090,000] os: r0/a1: 0xaaaaaaaa r1/a2: 0xaaaaaaaa r2/a3: 0x1000d3c8
[00:00:00.101,000] os: r3/a4: 0x09000000 r12/ip: 0x100123ce r14/lr: 0x1000c8b5
[00:00:00.112,000] os: xpsr: 0x5b011600
[00:00:00.120,000] os: Faulting instruction address (r15/pc): 0x0000005b
[00:00:00.130,000] os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
[00:00:00.140,000] os: Current thread: 0x30000cb8 (main)
[00:00:00.148,000] os: Halting system
uart:~$
Impact
Functional Limitation – Some features not working as expected, but system usable.
Environment
- OS:
Debian 13.0
- Toolchain:
zephyr-sdk-0.17.0
- Commit ba905d0 (main)
Additional Context
As a side-note, the video capture with UVC works (west build -b frdm_mcxn947/mcxn947/cpu0 --shield dvp_20pin_ov7670 samples/subsys/usb/uvc/
), however as soon as the capture stop, an error message appears (Bus fault on vector table read
). Possibly unrelated.