Skip to content

Commit

Permalink
samples: drivers: video: add arduino nicla vision
Browse files Browse the repository at this point in the history
As supported board to the video capture sample.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
  • Loading branch information
uLipe committed Sep 19, 2024
1 parent c3c5cc7 commit 0b5da7a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
13 changes: 13 additions & 0 deletions samples/drivers/video/capture/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Supported camera modules on some i.MX RT boards can be found below.
- :ref:`mimxrt1170_evk`
- `OV5640 camera module`_

Also :ref:`arduino_nicla_vision_board` can be used in this sample as capture device, in that case
The user can transfer the captured frames through on board USB.

Wiring
******

Expand All @@ -35,6 +38,8 @@ On :ref:`mimxrt1170_evk`, the OV5640 camera module should be plugged into the
J2 camera connector. A USB cable should be connected from a host to the micro
USB debug connector (J11) in order to get console output via the daplink interface.

For :ref:`arduino_nicla_vision_board` there is no extra wiring required.

Building and Running
********************

Expand All @@ -56,6 +61,14 @@ For :ref:`mimxrt1170_evk`, build this sample application with the following comm
:goals: build
:compact:

For :ref:`arduino_nicla_vision_board`, build this sample application with the following commands:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/video/capture
:board: arduino_nicla_vision/stm32h747xx/m7
:goals: build
:compact:

For testing purpose without the need of any real video capture and/or display hardwares,
a video software pattern generator is supported by the above build commands without
specifying the shields.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=1
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=160000
CONFIG_DMA=y

# Arduino Nicla Vision has easy access to the USB console
# So use it to check the log messages
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_WORKQUEUE_STACK_SIZE=8192
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y
CONFIG_MAIN_STACK_SIZE=4096

CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_LINE_CTRL=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright 2024 Felipe Neves
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
zephyr,console = &cdc_acm_uart0;
zephyr,shell-uart = &cdc_acm_uart0;
};
};

zephyr_udc0: &usbotg_hs {
status = "okay";
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
1 change: 1 addition & 0 deletions samples/drivers/video/capture/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tests:
- platform:mimxrt1064_evk:SHIELD="dvp_fpc24_mt9m114;rk043fn66hs_ctg"
- platform:mimxrt1170_evk/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0"
platform_allow:
- arduino_nicla_vision/stm32h747xx/m7
- mimxrt1064_evk
- mimxrt1170_evk/mimxrt1176/cm7
- mm_swiftio
Expand Down
2 changes: 1 addition & 1 deletion samples/drivers/video/capture/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static inline void video_display_frame(const struct device *const display_dev,

int main(void)
{
struct video_buffer *buffers[2], *vbuf;
struct video_buffer *buffers[CONFIG_VIDEO_BUFFER_POOL_NUM_MAX], *vbuf;
struct video_format fmt;
struct video_caps caps;
unsigned int frame = 0;
Expand Down

0 comments on commit 0b5da7a

Please sign in to comment.