Multichannel SDI video signal switching system based on STM32
By integrating the STM32 main control module with the multi-domain isolated power supply system, the problems of power-induced jitter, switching matrix rigidity, signal closed-loop deficiency, and weak control input interference immunity in video signal switching systems are solved, thereby improving signal integrity and reliability and supporting flexible expansion and efficient operation and maintenance.
Patent Information
- Application Number
- CN202511290997.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2026-01-23
AI Technical Summary
Existing video signal switching systems suffer from issues such as power-induced jitter due to single-domain power supply mode, rigid switching matrix, lack of effective closed-loop signal control, weak control input interference immunity, communication and maintenance limitations, and lack of online upgrades and logs, all of which affect signal integrity, reliability, and system stability.
It adopts a multi-domain isolated power supply system, lock-in detection closed-loop criteria, programmable differential cross-point routing, LRC hardware interference immunity, dual physical layer communication, addressing, automatic fault-tolerant fallback, online upgrade and logging functions. It realizes signal health detection and switching configuration through STM32 main control module, and combines the collaborative work of power management, signal re-driving and shaping, high-speed signal switching and routing, adaptive equalization and criteria, signal driving and output, control input and parameter setting and communication module.
Significantly reduces jitter and bit error rate, improves signal integrity and reliability, enables flexible channel expansion and remote management, enhances system operation and maintenance efficiency, and ensures system stability and reliability in complex electromagnetic environments.
Smart Images

Figure CN121397166A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of video signal processing and switching control, and particularly relates to a multi-channel SDI video signal switching system based on an STM32. BACKGROUND
[0002] In the scenes of security centralized monitoring, broadcasting production, medical image integration, photoelectric detection and multi-source industrial video signal acquisition, multi-channel SDI high definition / ultra-high definition video signals need to be centrally accessed and quickly switched. The existing video signal switching scheme has the following structural defects: Single-domain power supply mode: usually, a "unified DC input + single-stage voltage reduction + tiled LDO" power supply mode is adopted, in which mode, key circuit modules such as high-speed equalization, cross point, driving and MCU digital logic, level buffer share the same noise source. Since these modules share the power supply path, switching transients and switch peaks will be superimposed on the common impedance path, thereby introducing power supply induced jitter (PSIJ). Such jitter will cause the eye diagram opening of the signal to be reduced, and then the bit error rate (BER) becomes unstable, affecting the integrity of the signal and the reliability of the system.
[0003] Switching matrix rigidity: fixed-scale matrix chips or mechanical relay schemes are adopted, the fixed-scale matrix chips cannot flexibly adjust the number of input and output ports according to the demand, and the mechanical relay scheme is difficult to expand due to physical limitations; in addition, the contacts of the mechanical relay have the problems of large size and short service life, thereby affecting the reliability of video signal transmission.
[0004] Missing signal effectiveness closed loop: the lock detection signal (LockDetect) of the equalization / re-timing chip is not fully utilized, resulting in invalidation or degradation of the input signal, which makes the invalidation or degradation of the signal occupy the link for a long time, and the system is slow in response when facing the input signal problem, which will cause signal loss or error, thereby affecting the overall performance of the system.
[0005] Weak control input anti-interference: panel dials or buttons are prone to produce burrs under mechanical rebound, ESD (electrostatic discharge) / EFT (electrical fast transient) transients and EMI (electromagnetic interference) impacts, which will cause misoperation and affect the stability and reliability of the system, although software delay de-burring can alleviate the problem to a certain extent, but in a complex electromagnetic environment, this method is not enough to completely avoid mis-switching.
[0006] Communication and operation limitations: the system adopts a single RS232 or local panel control mode, the communication distance of the RS232 interface is limited, and it does not support multi-device cluster management; the local panel control cannot realize remote operation; in addition, the system lacks address and broadcast discovery mechanism, which makes the device management and maintenance complex and inefficient in large-scale deployment.
[0007] Lack of online upgrade and log: the system lacks online upgrade function and detailed log recording mechanism, which makes it difficult to update software or firmware in time during system operation, difficult to repair known problems or add new functions, difficult to quickly locate and solve problems when failures occur, and increases maintenance cost and difficulty of system update. SUMMARY
[0008] To overcome the above shortcomings, the present application provides a multi-channel SDI video signal switching system based on STM32, which integrates the following systems: multi-domain isolated power supply system, locking detection closed-loop criterion, programmable differential cross-point routing, L-R-C hardware anti-interference and software multi-sample de-bouncing, dual physical layer communication and address, automatic fault tolerance fallback, online upgrade and log, and optional high-speed evolution reservation. The system improves signal integrity, reliability, expandability, and operation and maintenance plasticity.
[0009] The multi-channel SDI video signal switching system based on STM32 comprises a main control module, a power management module, an SDI input re-driver and signal shaping module, a high-speed signal switching and routing module, an adaptive equalization and criterion module, a signal driving and output module, a control input and parameter setting module, and a communication module. The STM32 main control module is used to collect the LOCK_DETECT signal of the adaptive equalization and criterion module, realize signal health detection of the input channel, control the signal switching configuration of the high-speed signal switching and routing module, realize flexible routing of the input and output signals, collect the dial switch setting in real time, realize setting of the local switching channel, working mode and system parameters, be responsible for data interaction with the external communication module, receive remote switching and management instructions, and manage various state indications, fault alarms and log records of the system. The power management module realizes multi-channel voltage distribution and power protection and indication, comprising a main step-down chip and a voltage stabilizing output chip. The main step-down chip realizes efficient conversion to stable low-voltage output, and the voltage stabilizing output chip further stabilizes the output of the main step-down chip. The SDI input re-driver and signal shaping module is used to receive 16-channel SDI coaxial input signals, and the signals are divided into two groups, with 8 channels in each group connected to a signal shaping module. Each module re-drives, equalizes and shapes 8-channel high-speed SDI signals, compensates for signal transmission loss and distortion, and restores signal amplitude and edge rate. Each chip selects 2-channel differential output, and finally 4-channel high-quality SDI differential signals are obtained for use by the subsequent switching module. The high-speed signal switching and routing module receives 4-way SDI differential signal input from a previous stage as an input end; under the control of a master module, switches any one or two-way input signal to an output end, realizing flexible selection and distribution of 4-to-2 signal path. The adaptive equalization and criterion module is 2 pieces, and 2-way SDI signals output by the high-speed signal switching and routing module are respectively sent into 2 adaptive equalizers; the adaptive equalizer automatically equalizes and compensates each way of SDI signal, further restores signal integrity, eliminates high-frequency loss and inter-symbol interference; each adaptive equalizer also outputs a LOCK_DETECT criterion signal, which is used to indicate whether the signal is locked, and is used for the master module to collect and switch logical reference; The signal driving and output module is 2 pieces, and 2-way SDI signals after equalization are respectively connected to 2 differential drivers, which perform amplitude shaping, driving amplification and impedance matching on the signals, ensure that the SDI signal output meets the SMPTE standard, meet the requirements of long-distance and high-quality coaxial transmission, and finally output the signals from a coaxial BNC interface to an external device; The control input and parameter setting module is a dial switch, which provides local hardware parameter setting capability for the system; each dial position of the dial switch corresponds to different input channel selection, switching mode setting or system function configuration; the state of the dial switch is periodically collected by the master module, and is used for initializing or dynamically adjusting system running parameters; The communication module provides a bus physical layer interface between the master module and external devices.
[0010] The power management module linear regulator has small output ripple, and is suitable for providing clean and stable power supply for analog / digital circuits sensitive to power supply noise. Each functional module obtains the required voltage level and current capacity, and guarantees stable and reliable operation of the whole system. The power module is provided with overcurrent, overtemperature and short circuit protection functions.
[0011] In the application, the locking basis determination and determination mechanism are as follows: the LOCK_DETECT signal reflects the stable state of the recovered input signal; the master chip samples the LOCK_DETECT state at a period of 10-25 ms, and counts the number of lock losses in a sliding window of 80-150 ms; when the lock loss count reaches a set threshold (5-9), it is determined that the current input source is invalid. This mechanism effectively filters transient glitches and avoids false switching.
[0012] The switching control flow is: when the current channel is replaced and disabled, the master chip will detect the LOCK_DETECT state of the next candidate input source in advance to ensure that it is locked; after confirmation, the cross-point switching control line is atomically rewritten to switch to the new channel; after switching, the system quickly confirms the stability of the new channel through 2-3 sampling periods, if it is still in an unknown state, the next candidate channel will be tried; each switching is based on a change log operation and a change log operation is determined, and then operation and maintenance and interruption are performed.
[0013] The signal boundary and adjacent control are: domain power supply (dual DC / DC and multi LDO), magnetic bead isolation and hardware assistance (L-R-C network) jointly reduce the influence of noise source, switching transient and external interference on high-speed signals; the equalizer preferentially restores high-frequency signals, the cross-point switch and the incremental driver design low additional signals, ensure that the output signal diagram and gradient are stable, and meet the SDI standard requirements.
[0014] The specific working process of the system of the application is: after power-on initialization, the dial switch is read, the main loop includes real-time acquisition of the LOCK_DETECT criterion to judge the channel health, the channel is switched according to the local dial code / remote instruction / health state, the channel state is reported regularly, the power state is collected and an alarm is given, log recording and watchdog are used to prevent faults; the criterion and response include LOCK_DETECT to determine whether the output channel is healthy, if healthy, it is maintained, if unhealthy, it is automatically / handily switched; the power abnormality triggers local and remote alarms.
[0015] The control system of the application is divided into four layers: a hardware abstraction layer, a service layer, a control layer and an application and remote operation and maintenance layer, wherein the hardware abstraction layer includes GPIO, serial port, flash memory, timing, the service layer includes locking acquisition, debouncing, routing, protocol, log, upgrading, parameter; the control layer includes state machine, rollback scheduling, event sending; the application and remote operation and maintenance layer includes command processing, configuration, log and upgrading.
[0016] The system lock detection sliding window of the application adopts the method of period sampling, write window, lock loss counting, and threshold determination; the input de-bouncing adopts the state judgment method of multi-sample consistent statistics greater than or equal to threshold; the rollback strategy adopts the sequential mode and standby mode; the log recording adopts the ring buffer writing event, supports page reading, and adopts the handshake, relay, block receiving, CRC, flag, reset, rollback mode for upgrade; the threshold is selected according to the trend of boundary samples in the limited interval; the parameter configuration and validity are divided into static (log capacity, etc.), dynamic (sampling period, window, threshold, rollback mode), and adaptive parameters; the remote command is checked and written into RAM and optional persistent storage; the log and event trace are switched according to the event category, fault, back trigger, full fault, input change, upgrade process event, and ring + optional persistent key event; the software differentiation includes sliding window criterion, dual-mode rollback, night anti-interference, log upgrade, framework, and optional threshold adaptation, which is different from the traditional single decision, fixed delay, unstructured rollback, and no upgrade rollback scheme.
[0017] The difference between the application and the traditional scheme is that the application adopts hardware lock criterion and software sliding window statistics, which significantly improves the anti-burr ability and false switching protection. The candidate source is pre-verified before switching, and the time of fast confirmation, black screen and fault recovery is quickly confirmed. The power supply is divided into domains, the magnetic beads are isolated, and the L-R-C hardware auxiliary is used, which effectively improves the anti-interference and signal interruption. The switching process is closed-loop controlled all the time, all event logs are recorded, and the upgrade maintenance and parameter optimization are based.
[0018] The system of the application realizes the systematic reduction of jitter and bit error rate through structure cooperation and closed-loop control, power supply noise isolation, programmable routing and lock fast judgment; realizes the controlled black screen time through window statistics and master / backup / priority rollback; realizes the significant reduction of false triggering through double-layer anti-interference; realizes the gradual expansion of channel scale through cascaded cross points and balanced / driven sub-boards; ensures efficient maintenance and iteration through double physical layer access, address, online upgrade and log function setting; does not affect the current 3G implementation and can realize the evolution reservation of high-speed standard; has software layer multi-window statistics, dual-mode rollback, cyclic log, online upgrade and parameter adaptive mechanism, so that the system forms comprehensive performance improvement in black screen duration, false triggering rate, expansion operation and maintenance, and elastic upgrade.
[0019] Drawings of the specification Figure 1 The schematic diagram of the application.
[0020] Figure 2 The signal link diagram of the application.
[0021] Figure 3 The logic diagram of the application. DETAILED DESCRIPTION
[0022] The multi-channel SDI video signal switching system based on STM32 comprises: The main control module: The STM32F103RCT6 chip is used to collect the LOCK_DETECT signal of the LMH0346, realize the signal health detection of the input channel, control the signal switching configuration of the DS25CP104A, realize the flexible routing of the input and output signals, collect the setting of the dial switch DSHP04TSGET in real time, realize the setting of the local switching channel, working mode and system parameters, be responsible for the data interaction with the external communication module SP3485, receive the remote switching and management instructions, and manage various state indications, fault alarms and log records of the system.
[0023] The power management module: The power management module comprises a main step-down chip and a voltage stabilizing output chip, the main step-down chip realizes efficient conversion to stable low-voltage output, and the voltage stabilizing output chip further stabilizes the output of the main step-down chip. The main step-down chip is two LMZ14203, which generates 5 V and main VCC respectively. The voltage stabilizing output chip is a multi-channel 1117-3V3, which outputs a domain of 3.3 V, such as V33_EQ, V33_XPT, V33_DRV, V33_MCU, V33_XO; the inter-domain stringing magnetic beads are BLM18 series, and the decoupling capacitor arrays are 10 μF, 1 μF, 0.1 μF and 0.01 μF respectively. The power input anti-interference, the control input front end is a small inductance / magnetic bead (5.6-6.8 nH), about 39 Ω resistance, 0.1 μF and 22 μF parallel capacitor; after conversion by SN65LVCP408PAPR, it is sent to the MCU; the software debouncing window is 10-30 ms, typically 15 ms, and it is confirmed if the same is consistent for more than 3 times in succession; The power lock criterion, the sampling period is 10-25 ms (typically 20 ms), the determination window is 80-150 ms (typically 100 ms), and the failure count threshold is 5-9 (typically 7); The power fallback strategy, the priority list is {Ch1, Ch2} (or extended {Ch1, Ch3, Ch2, Ch4, …}), and the main and standby can be selected; if all candidates fail to enter 300-800 ms (typically 500 ms) cycle retry.
[0024] The SDI input re-driving and signal shaping module: For 2 SN65LVCP408PAPR chips, used to receive 16-way SDI coaxial input signals, which are divided into two groups, each group of 8-way access to a SN65LVCP408PAPR; each SN65LVCP408PAPR for 8-way high-speed SDI signal re-drive, equalization and shaping, compensating for signal transmission loss and distortion, restoring signal amplitude and edge rate; each chip selects 2-way differential output, a total of 4-way high-quality SDI differential signal is obtained, for the use of the latter switching module.
[0025] High-speed signal switching and routing module: For DS25CP104A chip, used to receive 4-way SDI differential signal input from the previous stage, as the input terminal of DS25CP104A; DS25CP104A under the control of the host MCU (STM32F103RCT6), switch any one or two-way input signal to the output terminal, realize 4-to-2 signal path flexible selection and distribution; Switching matrix 4x4 differential cross point DS25CP104A, only part of the port is actually used still support any 1→1 selection and reserved expansion.
[0026] Adaptive equalization and criterion module: For 2 LMH0346 chips, 2-way SDI signals output by DS25CP104A are sent into 2 LMH0346 adaptive equalizers; LMH0346 automatically equalizes and compensates each SDI signal, further restores signal integrity, eliminates high-frequency loss and inter-symbol interference; each LMH0346 also outputs a LOCK_DETECT criterion signal, which is used to indicate whether the signal is locked, for the host MCU to collect and switch logic reference.
[0027] Signal driving and output module: For 2 LMH0302 chips, 2-way SDI signals after equalization are connected to 2 LMH0302 differential drivers; LMH0302 performs amplitude shaping, driving amplification and impedance matching on the signal, ensures that the SDI signal output meets the SMPTE standard, meets the long-distance, high-quality coaxial transmission requirements, and finally outputs the signal from the coaxial BNC interface to the external device.
[0028] Control input and parameter setting module: DSHP04TSGET dial switch, this module provides local hardware parameter setting capability for the system; each dial position of the dial switch corresponds to different input channel selection, switching mode setting or system function configuration; the dial switch state is collected by the host MCU regularly, used for initializing or dynamically adjusting system running parameters.
[0029] Communication module: RS232 (SP3232E) is used for near-end debugging; RS485 (SP3485) is used for remote bus; dial code K1~K4 forms 4bit address; protocol frame: SOF | LEN | CMD | ADDR | DATA | CRC16.
[0030] Log and upgrade: firmware dual partition (Boot / application), upgrade block, CRC check, rollback flag; log ring buffer record {timestamp, event type, old channel, new channel, reason code}.
[0031] In the embodiment, the power management module LMZ14203 is an integrated high-efficiency step-down DC-DC power module, supports a wide input voltage range (usually 6V~42V), and can directly convert the system input power (such as 12V or 24V) into stable low-voltage output (such as 5V) with high efficiency. The module integrates main components such as power MOSFET and inductor, has small size, high efficiency and strong output current capacity (up to 3A), and is suitable for providing main power supply for multiple digital and analog circuits of the system. 1117-3V3 is a low-dropout linear regulator, and the input end receives 5V power from the output of the LMZ14203, and further stabilizes it to 3.3V. The 3.3V voltage provides power supply for the main control chip (STM32F103RCT6), logic circuit and communication chip device.
[0032] The SP3485 communication module is suitable for long-distance and multi-point communication in an industrial environment. The SP3485 communication module supports master station / slave station communication protocol, realizes remote switching control, channel state query and parameter configuration and the like, and guarantees that the system can be flexibly connected to an upper computer, a centralized management platform or other automation systems.
[0033] The multi-channel SDI video signal switching system based on STM32 has 16-way SDI input, two SN65LVCP408PAPR re-drives, 4-to-2 selection of DS25CP104A chip, two LMH0346 equalizations, two LMH0302 differential drives, and then two-way SDI output.
Claims
1. A multi-channel SDI video signal switching system based on STM32, characterized in that: The system includes a main control module, a power management module, an SDI input re-drive and signal shaping module, a high-speed signal switching and routing module, an adaptive equalization and criterion module, a signal driving and output module, a control input and parameter setting module, and a communication module. The STM32 main control module is used to acquire the LOCK_DETECT signal of the adaptive equalization and criterion module to realize signal health detection of the input channel; and to control the signal switching configuration of the high-speed signal switching and routing module to realize flexible routing of input and output signals. It collects DIP switch settings in real time, enabling local switching of channels, working modes, and system parameters; it is responsible for data interaction with external communication modules and receiving remote switching and management commands. Manage various status indicators, fault alarms, and log records of the system; The power management module implements multi-channel voltage distribution and power protection and indication, including a main buck chip and a voltage regulator chip; the main buck chip achieves efficient conversion to a stable low-voltage output, and the voltage regulator chip further regulates the voltage of the main buck chip; The SDI input re-drive and signal shaping module consists of two chips, used to receive 16 channels of SDI coaxial input signals. The signals are divided into two groups, with each group of 8 channels connected to one signal shaping module. Each chip re-drives, equalizes, and shapes the 8 high-speed SDI signals to compensate for signal transmission loss and distortion, and restore signal amplitude and edge rate. Each chip uses 2 differential outputs, ultimately obtaining a total of 4 high-quality SDI differential signals for use by the subsequent switching module. The high-speed signal switching and routing module is used to receive four SDI differential signal inputs from the front end as input terminals; under the control of the main control module, any one or two input signals can be switched to the output terminal to achieve flexible selection and allocation of 4-to-2 signal paths. The adaptive equalization and criterion module consists of two chips, which send the two SDI signals output from the high-speed signal switching and routing module to two adaptive equalizers respectively. The adaptive equalizers perform automatic equalization compensation on each SDI signal to further restore signal integrity and eliminate the effects of high-frequency loss and inter-symbol interference. Each adaptive equalizer also outputs a LOCK_DETECT criterion signal to indicate whether the signal is locked, which is used as a reference for the main control module's acquisition and switching logic. The signal driving and output module consists of two chips. The two equalized SDI signals are respectively connected to two differential drivers to perform amplitude shaping, drive amplification and impedance matching on the signals to ensure that the SDI signal output meets the SMPTE standard, meets the requirements of long-distance and high-quality coaxial transmission, and finally outputs the signal to external devices from the coaxial BNC interface. The control input and parameter setting module is a DIP switch, which provides the system with local hardware parameter setting capabilities. Each switch position corresponds to different input channel selection, switching mode setting, or system function configuration. The DIP switch status is collected periodically by the main control module for initializing or dynamically adjusting system operating parameters. The communication module provides a bus physical layer interface between the main control module and external devices.
2. The STM32-based multi-channel SDI video signal switching system as described in claim 1, characterized in that: The main control module is an STM32F103RCT6 chip; The power management module implements multi-channel voltage distribution and power protection and indication, including the main buck converter chip (LMZ14203) and the voltage regulator output chip (1117-3V3). The SDI input re-drive and signal shaping module consists of two SN65LVCP408PAPR chips; The high-speed signal switching and routing module uses the DS25CP104A chip; The adaptive equalization and criterion module consists of two LMH0346 chips; The signal drive and output module consists of two LMH0302 chips; The control input and parameter setting module is a DSHP04TSGET DIP switch; The communication module uses the SP3485 chip.