Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions samples/drivers/video/tcpserversink/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ This samples requires a video capture device and network support.
- :zephyr:board:`mimxrt1064_evk`
- `MT9M114 camera module`_

- :zephyr:board:`stm32n6570_dk`
- :ref:`ST B-CAMS-IMX-MB1854 <st_b_cams_imx_mb1854>`

Wiring
******

Expand All @@ -26,6 +29,12 @@ J35 camera connector. A USB cable should be connected from a host to the micro
USB debug connector (J41) in order to get console output via the freelink
interface. Ethernet cable must be connected to RJ45 connector.

On :zephyr:board:`stm32n6570_dk`, the MB1854 IMX335 camera module must be plugged in
the CSI-2 camera connector. A RJ45 ethernet cable must be plugged in the ethernet CN6
connector. For an optimal image experience, it is advice to embed STM32 image signal
processing middleware: https://github.com/stm32-hotspot/zephyr-stm32-mw-isp.


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

Expand All @@ -49,6 +58,15 @@ a video software pattern generator is supported by using :ref:`snippet-video-sw-
:goals: build
:compact:

For :zephyr:board:`stm32n6570_dk`, the sample can be built with the following command:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/video/tcpserversink
:board: stm32n6570_dk
:shield: st_b_cams_imx_mb1854
:goals: build
:compact:

Sample Output
=============

Expand Down
23 changes: 23 additions & 0 deletions samples/drivers/video/tcpserversink/boards/stm32n6570_dk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Video buffer pool
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10

# Camera interface
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="pRAA"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those 3 DCMIPP / SENSOR related config are not needed since they depend on the sensor and moreover are already set within the boards/shields/st_b_cams_imx_mb1854/Kconfig.defconfig which is applied when selecting the st_b_cams_imx_mb1854 shield

CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=2592
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=1944
CONFIG_FPU=y

# Capture
CONFIG_VIDEO_FRAME_WIDTH=1920
CONFIG_VIDEO_FRAME_HEIGHT=1080
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2

# Video encoder
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"

# Network buffers
CONFIG_NET_BUF_RX_COUNT=4
CONFIG_NET_BUF_TX_COUNT=8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Video buffer pool
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10

# Camera interface
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="pRAA"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those 3 DCMIPP / SENSOR related config are not needed since they depend on the sensor and moreover are already set within the boards/shields/st_b_cams_imx_mb1854/Kconfig.defconfig which is applied when selecting the st_b_cams_imx_mb1854 shield

CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=2592
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=1944
CONFIG_FPU=y

# Capture
CONFIG_VIDEO_FRAME_WIDTH=1920
CONFIG_VIDEO_FRAME_HEIGHT=1080
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2

# Video encoder
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"

# Network buffers
CONFIG_NET_BUF_RX_COUNT=4
CONFIG_NET_BUF_TX_COUNT=8
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2025 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
zephyr,videoenc = &venc;
};
};

&venc {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Video buffer pool
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10

# Camera interface
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="pRAA"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those 3 DCMIPP / SENSOR related config are not needed since they depend on the sensor and moreover are already set within the boards/shields/st_b_cams_imx_mb1854/Kconfig.defconfig which is applied when selecting the st_b_cams_imx_mb1854 shield

CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=2592
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=1944
CONFIG_FPU=y

# Capture
CONFIG_VIDEO_FRAME_WIDTH=1920
CONFIG_VIDEO_FRAME_HEIGHT=1080
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2

# Video encoder
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"

# Network buffers
CONFIG_NET_BUF_RX_COUNT=4
CONFIG_NET_BUF_TX_COUNT=8
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2025 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
zephyr,videoenc = &venc;
};
};

&venc {
status = "okay";
};