Skip to content

drivers: video: ov7670/smartdma: red pattern instead of image #89569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
josuah opened this issue May 6, 2025 · 0 comments
Open

drivers: video: ov7670/smartdma: red pattern instead of image #89569

josuah opened this issue May 6, 2025 · 0 comments
Assignees
Labels
area: camera area: Drivers area: Samples Samples area: Video Video subsystem bug The issue is a bug, or the PR is fixing a bug platform: NXP Drivers NXP Semiconductors, drivers

Comments

@josuah
Copy link
Collaborator

josuah commented May 6, 2025

Describe the bug

The FRDM-MCXN connected with the OV7670 camera gives unexpected output with red/white color stripes.

To Reproduce

I used UVC but a display shield might work as well:

git remote add tvai https://github.com/tinyvision-ai-inc/zephyr/
git fetch tvai
git cherry-pick tvai/pr-usb-uvc~4..tvai/pr-usb-uvc
git cherry-pick tvai/pr-frdm-mcxn947-shield~4..tvai/pr-frdm-mcxn947-shield
west build --board frdm_mcxn947/mcxn947/cpu0 --shield dvp_20pin_ov7670 samples/subsys/usb/uvc/

Expected behavior

The correct color image data output with mostly dark pixels (when ambient light is off) instead of red.

Impact

None: uses features not yet merged for bug reproduction such as UVC.

Logs and console output

The host selected the RGBP (RGB565) pixel format (last listed wins):

...
[176148.509184] usb 1-4.3.1.2: Trying format 0x39555659 (YVU9): 320x240
[176148.509188] usb 1-4.3.1.2: Using default frame interval 2026253.6 us (0.4 fps)
[176148.510307] usb 1-4.3.1.2: Trying format 0x4f424752 (RGBO): 320x240
[176148.510312] usb 1-4.3.1.2: Using default frame interval 2026253.6 us (0.4 fps)
[176148.511374] usb 1-4.3.1.2: Trying format 0x51424752 (RGBQ): 320x240
[176148.511377] usb 1-4.3.1.2: Using default frame interval 2026253.6 us (0.4 fps)
[176148.512321] usb 1-4.3.1.2: Trying format 0x50424752 (RGBP): 320x240
[176148.512326] usb 1-4.3.1.2: Using default frame interval 2026253.6 us (0.4 fps)
[176148.514082] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.514105] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.514118] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.514131] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.514144] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.514162] usb 1-4.3.1.2: uvc_v4l2_mmap
...
[176148.514440] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.514449] usb 1-4.3.1.2: uvc_v4l2_mmap
[176148.517194] usb 1-4.3.1.2: Allocated 5 URB buffers of 32x512 bytes each
[176148.780992] usb 1-4.3.1.2: Frame complete (EOF found)
[176148.804185] usb 1-4.3.1.2: frame 1 stats: 0/8/8 packets, 0/0/0 pts (!early !initial), 0/0 scr, last pts/stc/sof 0/0/0
[176148.915010] usb 1-4.3.1.2: Frame complete (EOF found)
[176148.938116] usb 1-4.3.1.2: frame 2 stats: 0/8/8 packets, 0/0/0 pts (!early !initial), 0/0 scr, last pts/stc/sof 0/0/0
[176149.048189] usb 1-4.3.1.2: Frame complete (EOF found)
[176149.071250] usb 1-4.3.1.2: frame 3 stats: 0/8/8 packets, 0/0/0 pts (!early !initial), 0/0 scr, last pts/stc/sof 0/0/0
[176149.180989] usb 1-4.3.1.2: Frame complete (EOF found)
[176149.204179] usb 1-4.3.1.2: frame 4 stats: 0/8/8 packets, 0/0/0 pts (!early !initial), 0/0 scr, last pts/stc/sof 0/0/0
[176149.315186] usb 1-4.3.1.2: Frame complete (EOF found)
...

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used

Additional context

Single frame:

Image

Multiple frames converted to GIF. The effect of turning the light on:

Image

@josuah josuah self-assigned this May 6, 2025
@josuah josuah added bug The issue is a bug, or the PR is fixing a bug area: Drivers area: Samples Samples area: Video Video subsystem area: camera platform: NXP Drivers NXP Semiconductors, drivers labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: camera area: Drivers area: Samples Samples area: Video Video subsystem bug The issue is a bug, or the PR is fixing a bug platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

No branches or pull requests

1 participant