diff --git a/samples/drivers/video/capture/README.rst b/samples/drivers/video/capture/README.rst index 39049daed97..c8768bc50f6 100644 --- a/samples/drivers/video/capture/README.rst +++ b/samples/drivers/video/capture/README.rst @@ -14,7 +14,7 @@ Requirements ************ This sample needs a video capture device (e.g. a camera) but it is not mandatory. -Supported camera modules on some i.MX RT boards can be found below. +Supported boards and camera modules include: - `Camera iMXRT`_ @@ -27,6 +27,9 @@ Supported camera modules on some i.MX RT boards can be found below. - :zephyr:board:`frdm_mcxn947` with any ``arducam,dvp-20pin-connector`` camera module such as :ref:`dvp_20pin_ov7670`. +- :zephyr:board:`stm32h7b3i_dk` + with the :ref:`st_b_cams_omv_mb1683` shield and a compatible camera module. + Also :zephyr:board:`arduino_nicla_vision` can be used in this sample as capture device, in that case The user can transfer the captured frames through on board USB. @@ -41,6 +44,10 @@ On :zephyr:board:`mimxrt1170_evk`, the OV5640 camera module should be plugged in 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. +On :zephyr:board:`stm32h7b3i_dk`, connect the :ref:`st_b_cams_omv_mb1683` shield to the +board on CN7 connector. A USB cable should be connected from a host to the micro USB +connector in order to get console output. + For :zephyr:board:`arduino_nicla_vision` there is no extra wiring required. Building and Running @@ -83,6 +90,16 @@ using the :ref:`dvp_20pin_ov7670` and :ref:`lcd_par_s035` connected to the board :goals: build :compact: +For :zephyr:board:`stm32h7b3i_dk`, build this sample application with the following commands, +using the :ref:`st_b_cams_omv_mb1683` shield with a compatible camera module: + +.. zephyr-app-commands:: + :zephyr-app: samples/drivers/video/capture + :board: stm32h7b3i_dk + :shield: st_b_cams_omv_mb1683 + :goals: build + :compact: + For testing purpose and 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, and using :ref:`snippet-video-sw-generator`: @@ -105,6 +122,16 @@ append ``-DCONFIG_VIDEO_SHELL=y`` to the build command: :goals: build :compact: +For :zephyr:board:`stm32h7b3i_dk` with shell commands: + +.. zephyr-app-commands:: + :zephyr-app: samples/drivers/video/capture + :board: stm32h7b3i_dk + :shield: st_b_cams_omv_mb1683 + :gen-args: -DCONFIG_VIDEO_SHELL=y + :goals: build + :compact: + Sample Output ============= diff --git a/samples/drivers/video/capture/boards/stm32h7b3i_dk.conf b/samples/drivers/video/capture/boards/stm32h7b3i_dk.conf new file mode 100644 index 00000000000..513ebc86673 --- /dev/null +++ b/samples/drivers/video/capture/boards/stm32h7b3i_dk.conf @@ -0,0 +1,12 @@ +# +# Copyright (c) 2025 Charles Dias +# +# SPDX-License-Identifier: Apache-2.0 +# + +CONFIG_LOG_BUFFER_SIZE=2048 + +CONFIG_VIDEO_PIXEL_FORMAT="RGBP" +CONFIG_VIDEO_FRAME_WIDTH=480 +CONFIG_VIDEO_FRAME_HEIGHT=272 +CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=262144 diff --git a/samples/drivers/video/capture/boards/stm32h7b3i_dk.overlay b/samples/drivers/video/capture/boards/stm32h7b3i_dk.overlay new file mode 100644 index 00000000000..b9e8ba05e94 --- /dev/null +++ b/samples/drivers/video/capture/boards/stm32h7b3i_dk.overlay @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2025 Charles Dias + * + * SPDX-License-Identifier: Apache-2.0 + * + */ + +/delete-node/ &sram1; +/delete-node/ &sram2; + +/* Increase the SRAM0 bank memory size to accommodate the VIDEO_BUFFER_POOL_SZ_MAX configuration. */ +&sram0 { + reg = <0x24000000 DT_SIZE_K(1024)>; +}; diff --git a/samples/drivers/video/capture/sample.yaml b/samples/drivers/video/capture/sample.yaml index 7c23fb7ebb2..3c4d16010f9 100644 --- a/samples/drivers/video/capture/sample.yaml +++ b/samples/drivers/video/capture/sample.yaml @@ -12,6 +12,7 @@ tests: - platform:mimxrt1170_evk@B/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0" - platform:frdm_mcxn947/mcxn947/cpu0:SHIELD="dvp_20pin_ov7670;lcd_par_s035_8080" - platform:frdm_mcxn236/mcxn236:SHIELD="dvp_20pin_ov7670;lcd_par_s035_8080" + - platform:stm32h7b3i_dk:SHIELD="st_b_cams_omv_mb1683" extra_configs: - CONFIG_TEST=y - CONFIG_FPU=y @@ -34,6 +35,7 @@ tests: - frdm_mcxn236/mcxn236 - mm_swiftio - esp32s3_eye/esp32s3/procpu + - stm32h7b3i_dk depends_on: video integration_platforms: - mimxrt1064_evk/mimxrt1064