A method for controlling the timing of hardware initialization of a GMSL video acquisition box supporting hot plug

By controlling the timing of PoC power soft start, deserializer reset, and image sensor reset release after the camera is inserted using the MCU, the problems of electrical damage, link reconnection, and host computer freezing during hot-plugging of the GMSL video acquisition system are solved, and efficient hardware initialization and automatic image preview recovery are achieved.

CN123185449APending Publication Date: 2026-11-27深圳森云智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611087063.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

The existing GMSL video acquisition system has problems such as high risk of electrical damage, inability to automatically reconnect the link, timing disorder leading to initialization failure, and host computer freezing when hot-swapping camera modules.

Method used

After the camera module is inserted, the MCU detects the camera module and uses a timing control method of PoC power soft start, GMSL deserializer reset and link lock, and image sensor reset release. Combined with the collaborative work of the USB controller and the host computer, the hardware initialization timing can be precisely controlled.

Benefits of technology

It effectively avoids damage to hardware caused by surge current and contact arc during hot-plugging, ensuring a near 100% success rate for link reconnection. The host computer automatically restores the image preview, eliminating the need for frequent manual software restarts or USB bus unplugging and plugging, significantly improving the efficiency of R&D debugging and production line testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185449A_ABST
    Figure CN123185449A_ABST
Patent Text Reader

Abstract

The application is suitable for the field of vehicle-mounted and machine vision video acquisition technology, and provides a GMSL video acquisition box hardware initialization timing control method supporting hot plug, which is applied to a video acquisition box containing an MCU, a GMSL deserializer, a PoC power supply switch and a USB controller. The method comprises the following steps: detecting the insertion of a camera module into a GMSL coaxial port to send an access trigger signal to the MCU; supplying power in a slow start mode; resetting the deserializer and activating the reverse channel to establish link locking and poll the locking state; controlling the image sensor reset pin via the remote serializer; after the configuration is completed, the USB controller sends a ready notification to the upper computer to rebuild the USB receiving pipe and restore the image preview. Through the strict timing control of the MCU, the application eliminates the hidden danger of electrical burning caused by hot plug, ensures the success rate of link establishment, and avoids the upper computer from freezing and crashing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle-mounted and machine vision video acquisition technology, specifically a hardware initialization timing control method for a hot-swappable GMSL video acquisition box. Background Technology

[0002] Vehicle-mounted and machine vision cameras typically employ Gigabit Multimedia Serial Link (GMSL) for high-bandwidth, long-distance video transmission. In typical R&D and testing scenarios, the video capture box is connected to a PC via a USB interface, and control and image preview are performed by PC-based host software (such as SensingCaptureV2). GMSL typically uses Power over Coax (PoC) technology, superimposing high-frequency video signals, bidirectional control signals, and DC power (usually 12V or 24V) onto the same coaxial cable for transmission.

[0003] However, existing GMSL video acquisition systems have the following defects and shortcomings when hot-plugging camera modules: 1. High risk of electrical damage (burnout): If the camera is blindly hot-plugged while the acquisition box is powered on, the "arc bounce" and "instantaneous surge current" at the moment of contact can easily damage the deserializer chip or the serializer chip at the camera end.

[0004] 2. Link cannot be automatically reconnected (locked): When the link is suddenly disconnected, the internal state machine of the deserializer often enters a suspended or undefined state; when a new camera is inserted again, if there is no specific reset activation process, the deserializer cannot adaptively rebuild the reverse control channel, resulting in the link being unable to lock.

[0005] 3. Timing disorder leads to initialization failure: The timing requirements of "power stabilization → hardware reset release → register initialization configuration" for image sensors and serializers are extremely stringent; if there is no microsecond-level fine control of the power supply and reset pin by the MCU during hot-plugging, the image sensor is very likely to enter a dead state (no I2C response, no image output).

[0006] 4. Host computer crash: When the camera is suddenly disconnected, the existing host computer control architecture often throws a USB Timeout error due to the interruption of video transmission by the USB acquisition controller (such as FX3), causing the PC debugging software to crash. It is necessary to force restart the software and reconnect the USB bus.

[0007] Therefore, in view of the above situation, there is an urgent need to provide a hardware initialization timing control method for GMSL video capture boxes that supports hot-swapping, so as to overcome the shortcomings in current practical applications. Summary of the Invention

[0008] The purpose of this invention is to provide a hardware initialization timing control method for a hot-swappable GMSL video capture box, effectively solving the problems mentioned in the background art.

[0009] This invention is implemented as follows: a hardware initialization timing control method for a hot-swappable GMSL video capture box, applied to a video capture box including an MCU, a GMSL deserializer, a PoC power switch, and a USB controller. The method includes: S1: Access detection: The MCU or GMSL deserializer detects the access signal of the GMSL coaxial port. When the camera module is detected to be inserted into the GMSL coaxial port, an access trigger signal is sent to the MCU. S2: PoC power soft start. In response to the access trigger signal, the MCU sends an enable command to the PoC power switch to supply power to the camera module via the coaxial cable in a soft start mode, and waits for a first preset time T_poc_stable. S3: Link Locking. The MCU performs a reset operation on the GMSL deserializer and enables the reverse channel of the GMSL deserializer to establish a link lock with the remote serializer. The MCU polls the locking status of the GMSL deserializer. When a valid locking signal is detected within the second preset time T_lock, the link lock is determined to be successful. S4: Sensor reset release. The MCU controls the image sensor's reset pin via the GMSL deserializer and remote serializer to first keep the image sensor in a reset state, then release the reset, and wait for a third preset time T_sensor_stable. S5: Parameter configuration and video stream reconstruction. Perform parameter configuration on the remote serializer and image sensor. After the configuration is completed, the USB controller sends a ready notification to the host computer so that the host computer can rebuild the USB receiving pipe and restore the image preview.

[0010] As a further aspect of the present invention: before S1, it also includes: The MCU turns off the PoC power switch by default in standby mode, so that the GMSL coaxial port is in a power-off state. The access signal is obtained through impedance detection. When the camera module is inserted, the characteristic impedance of the GMSL coaxial port changes abruptly, triggering a GPIO interrupt of the GMSL deserializer or a change in the level of the detection pin of the MCU. The access trigger signal is generated by the GPIO interrupt or the change in the level of the detection pin.

[0011] As a further aspect of the present invention: in S2, the first preset duration T_poc_stable is 10ms to 20ms.

[0012] As a further aspect of the present invention: In S3, the locking state of the MCU polling the GMSL deserializer is specifically as follows: The MCU reads the LOCK register of the GMSL deserializer using a hardware timing method; If no valid lock signal is detected within the second preset duration T_lock, the MCU will turn off the PoC power switch and return to standby mode. The second preset duration T_lock is 50ms.

[0013] As a further aspect of the present invention: S4 specifically includes: The MCU sends a command to the remote serializer via the I2C / control bus of the GMSL deserializer, controlling the GPIO pin of the remote serializer to output a low level. The GPIO pin is physically connected to the reset pin of the image sensor, so that the image sensor is kept in a reset state for a fourth preset time T_reset. The MCU then sends a command to the remote serializer to control the GPIO pin to output a high level, releasing the image sensor from its reset state. The MCU waits for the third preset duration T_sensor_stable; The fourth preset duration T_reset is 5ms, and the third preset duration T_sensor_stable is 15ms.

[0014] As a further aspect of the present invention: In S5, the parameter configuration includes: The MCU or host computer sends out an initialization configuration sequence to configure the registers of the remote serializer and the image sensor; After configuration, the internal state machine of the GMSL deserializer is reconstructed, and the USB controller sends a control endpoint notification to the host computer. After the host computer captures the control endpoint notification, it rebuilds the USB receiving pipeline, which includes a UVC transmission pipeline or a bulk transmission pipeline.

[0015] As a further aspect of the present invention: after S5, S6 is also included: When the camera module is unplugged from the GMSL coaxial port, the GMSL deserializer detects the loss of the lock signal and sends an interrupt to the MCU; In response to the interrupt, the MCU forcibly shuts down the PoC power switch and sends a notification to the host computer so that the host computer can suspend the image acquisition thread.

[0016] As a further aspect of the present invention: the MCU forcibly shuts down the PoC power switch within 20 microseconds.

[0017] As a further embodiment of the present invention: the MCU is an STM32 series microcontroller, the USB controller is a CYPRESS FX3 series controller, the GMSL deserializer is a MAX96712 or MAX96724 series deserializer chip, the remote serializer is a MAX96717 or MAX96717F series serializer chip, and the image sensor is an AR0820 series image sensor.

[0018] As a further aspect of the present invention: in S1-S5, the image sensor reset timing and the PoC power switch switching timing are coordinated and closed-loop controlled through the reverse control channel between the GMSL deserializer and the remote serializer. In S5, after the host computer rebuilds the video stream receiving pipeline, the video capture box automatically restores the image preview without having to unplug and replug the USB bus.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. High power supply safety and extended hardware lifespan: Unlike the existing technology of BlindApply PoC, this invention adopts a dynamic power control logic of "no power insertion detection → PoC soft start after impedance is met → PoC cut-off instantaneously upon removal". Since the PoC power supply is precisely switched according to the insertion and removal status, it avoids the damage to the SerDes chip and camera caused by the surge current and contact arc during hot-plugging, which greatly reduces the failure rate of the acquisition box in complex test environments.

[0020] 2. High link establishment success rate (close to 100%): Unlike existing cameras that rely on local RC reset and whose timing is easily affected by power fluctuations, this invention adopts an active, microsecond-level reset timing sequence of "MCU control of deserializer → cross-link control of serializer GPIO → cascade control of image sensor PDB release". Since T_poc_stable→T_lock→T_sensor_stable is precisely locked in the optimal working range, the power-on timing of the image sensor and serializer is strictly guaranteed, and the success rate of hot-plug reconnection is close to 100%.

[0021] 3. Hardware and software integration, automatic recovery, and prevention of host computer freezing: This invention packages the changes in the underlying hardware state (impedance change, LOCK establishment / loss) into proprietary control events by the USB controller and interfaces with the host computer SensingCaptureV2 to achieve a seamless closed loop of "hard plugging and unplugging → soft reset and reconnection → automatic image recovery"; when the camera is unplugged, the host computer pauses gracefully, and when the camera is plugged back in, the image automatically recovers within 3 seconds, eliminating the need for testers to frequently manually restart the software or unplug and plug the USB bus, significantly improving the efficiency of R&D debugging and production line testing. Attached Figure Description

[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the hot-swappable hardware architecture of the present invention.

[0024] Figure 2 This is a timing diagram for the strict initialization of the hot-plug (insertion) hardware in this invention.

[0025] Figure 3 This is a flowchart of the method of the present invention. Detailed Implementation

[0026] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] The present invention will be further explained below with reference to specific embodiments.

[0028] Please see Figures 1-3This invention provides a hardware initialization timing control method for a hot-swappable GMSL video capture box 200, which is implemented collaboratively by the video capture box 200 hardware circuit (including MCU 220, GMSL deserializer 240, PoC power switch 230, and USB controller 210) and the host computer 100 (SensingCaptureV2). Its core timing control flow is as follows: camera access detection → PoC power switch soft start and stabilization (T_poc_stable) → deserializer reconstruction and polling link lock (T_lock) → cross-chip cascade reset and release of image sensor 420 (T_sensor_stable) → batch register configuration and reconstruction of host computer video stream → (during hot-swapping) microsecond-level emergency cutoff of PoC power switch. The specific control steps are as follows: S1: Access detection: The MCU 220 or GMSL deserializer 240 detects the access signal of the GMSL coaxial port 300. When the camera module 400 is detected to be inserted into the GMSL coaxial port 300, an access trigger signal is sent to the MCU 220. S2: PoC power soft start. In response to the access trigger signal, the MCU 220 sends an enable command to the PoC power switch 230 to supply power to the camera module 400 via the coaxial cable in a soft start mode, and waits for a first preset time T_poc_stable; the first preset time T_poc_stable is 10ms to 20ms. S3: Link Locking. The MCU 220 performs a reset operation on the GMSL deserializer 240 and enables the reverse channel of the GMSL deserializer 240 to establish a link lock with the remote serializer 410. The MCU 220 polls the locking status of the GMSL deserializer 240. When a valid locking signal is detected within a second preset duration T_lock, the link lock is determined to be successful. The second preset duration T_lock is 50ms. S4: Sensor reset release. The MCU 220 controls the reset pin of the image sensor 420 via the GMSL deserializer 240 and the remote serializer 410 to first keep the image sensor 420 in a reset state, then release the reset, and wait for a third preset time T_sensor_stable; the third preset time T_sensor_stable is 15ms. S5: Parameter configuration and video stream reconstruction. Parameter configuration is performed on the remote serializer 410 and the image sensor 420. After the configuration is completed, the USB controller 210 sends a ready notification to the host computer 100 so that the host computer 100 can rebuild the USB receiving pipe and restore the image preview.

[0029] S6: When the camera module 400 is unplugged from the GMSL coaxial port 300, the GMSL deserializer 240 detects the loss of the lock signal and sends an interrupt to the MCU 220; in response to the interrupt, the MCU 220 forcibly shuts down the PoC power switch 230 and sends a notification to the host computer 100 so that the host computer 100 can suspend the image acquisition thread.

[0030] In an embodiment of the present invention, after the acquisition box is powered on, the MCU 220 turns off the PoC power switch 230 of the corresponding GMSL channel by default to prevent short circuits caused by live interface contacts; the MCU 220 or the deserializer monitors the coaxial port in real time through a dedicated analog detection circuit (such as impedance detection or the LFLT cable fault / connection status pin built into the GMSL chip); when the camera module 400 is inserted into the coaxial port, the characteristic impedance of the port changes abruptly, triggering the deserializer GPIO interrupt or the MCU 220 to detect the pin level change and send a "camera connected" signal to the MCU 220; After receiving the access signal, the MCU 220 sends an enable command to the PoC power switch 230 to output DC power to the coaxial cable in a soft-start manner to avoid instantaneous surges; the MCU 220 starts a hardware timer to force a wait for T_poc_stable (preferably 10ms to 20ms) until the power supply track between the remote serializer 410 and the image sensor 420 is completely stable; MCU 220 performs a software reset on the deserializer to clear the abnormal state machine, initializes the deserializer parameters and enables its back-channel transmission function, and begins establishing a phase-locked loop (LLOL) with the remote serializer 410. MCU 220 polls the deserializer's LOCK register using a hardware timer: if the LOCK signal is detected to be high within a preset maximum waiting time T_lock (preferably 50ms), it determines that the link electrical and underlying protocol are successfully aligned and proceeds to the next step; if the timeout does not result in a LOCK, MCU 220 immediately shuts down the PoC power supply and issues an alarm (to prevent accidental short circuits) and returns to standby mode. After the link lock is established, the MCU 220 controls the GPIO pin of the remote serializer 410 (which is physically connected to the RESET / PDB pin of the image sensor 420) via the I2C / control bus of the deserializer, bypassing the physical coaxial cable. The MCU 220 first instructs the remote serializer 410 to pull the GPIO low to put the sensor in a reset state, holds it for T_reset (preferably 5ms) and then sends a release reset command (pulling the GPIO high). Then it forces a wait for T_sensor_stable (preferably 15ms) to ensure that the internal PLL and crystal oscillator of the image sensor 420 start oscillating and stabilize after the reset is released. The MCU 220 or the host computer 100 (SensingCaptureV2) issues a standard initialization configuration sequence to perform batch register configuration on the remote serializer 410 and the image sensor 420. After the configuration is completed, the internal state machine of the GMSL deserializer 240 is reconstructed, and the USB controller 210 sends a "device hot-plug ready" control endpoint notification to the PC software. After SensingCaptureV2 captures this event, it seamlessly rebuilds the USB receive pipeline (UVC / bulk transfer pipeline), and the screen preview is automatically restored. If the camera is unplugged during operation, the deserializer hardware detects the loss of the LOCK signal within microseconds and immediately sends a high-priority interrupt to the MCU 220. Within 20 microseconds, the MCU 220 forcibly shuts down the PoC power switch 230 and disconnects the coaxial cable power supply to prevent arcing and burnout of the connector during hot unplugging. At the same time, the MCU 220 notifies SensingCaptureV2 to suspend the image acquisition thread, and the software enters the "waiting for camera connection" prompt state to prevent the software from freezing.

[0031] The technical solution of the present invention will be described in detail below with reference to practical applications: Hardware Platform Environment: In this embodiment, the video capture box 200 is based on SensingCaptureV2 intelligent acquisition equipment, integrating an STM32 series MCU 220, a CYPRESS FX3 series USB controller 210, and a MAX96712 / MAX96724 series GMSL deserialization chip, and is equipped with a PoC independent power supply control circuit. The camera module 400 is equipped with a MAX96717 / MAX96717F series serial chip and an AR0820 series image sensor 420. The host computer 100 is a PC running SensingCaptureV2 acquisition software.

[0032] The following example, where a tester inserts the AR0820 camera module 400 cable into the GMSL interface, illustrates the complete workflow of this invention: 1. Standby detection phase: With no camera plugged into the GMSL port, the MCU 220, in standby mode, defaults to disabling the PoC power switch 230 for the corresponding GMSL channel. The PoC power switch 230 outputs 0V, and the GMSL coaxial port 300 is de-energized to prevent short circuits caused by live interface contacts. The MAX96712 deserializer is in detection mode, monitoring the impedance characteristics of the coaxial port in real time using a dedicated analog detection circuit (such as impedance detection or the LFLT cable fault / connection status pin integrated into the GMSL chip).

[0033] 2. Insertion and Access Detection Phase: The tester plugged the AR0820 camera module 400 cable into the GMSL interface. When the camera module 400 was plugged into the coaxial port, the port's characteristic impedance changed abruptly, triggering a GPIO interrupt of the MAX96712 deserializer or a change in the pin level detected by the MCU 220, which then sent an "camera connected" connection trigger signal to the MCU 220.

[0034] 3. PoC power supply soft start and stabilization phase: After receiving the access signal, MCU 220 sends an enable command to the PoC power switch to output 12V DC power to the coaxial cable in a soft-start manner, avoiding instantaneous surges. MCU 220 starts a hardware timer, forcibly waiting for a first preset duration T_poc_stable (preferably 12ms in this embodiment) until the power supply track between the remote MAX96717 serializer (i.e., remote serializer 410) and the PMIC (Power Management Chip) of the AR0820 image sensor is completely stable. In specific implementations, T_poc_stable can be selected within the range of 10ms to 20ms.

[0035] 4. Deserializer reconstruction and reverse channel locking stage: MCU 220 performs a software reset on the MAX96712 deserializer to clear the abnormal state machine, initializes the deserializer parameters, activates its back-channel transmission function, and begins establishing a phase-locked loop (LLOL) with the remote MAX96717 serializer. MCU 220 cyclically reads the MAX96712's LOCK register status using hardware timing: in this embodiment, if LOCK=1 is successfully read at 30ms, it determines that the link electrical and underlying protocol are successfully aligned, and proceeds to the next stage.

[0036] If the LOCK signal is not detected to be high within the second preset time T_lock (preferably 50ms in this embodiment), the MCU 220 immediately shuts down the PoC power supply and issues an alarm (to prevent accidental short circuit) and returns to standby mode.

[0037] 5. Reset stage of hardware cascade between serializer and image sensor: After the link lock is established, MCU 220 controls the GPIO0 pin of the remote MAX96717 serializer (which is physically connected to the PDB reset pin of the AR0820 image sensor) via the I2C / control bus of the MAX96712 deserializer, bypassing the physical coaxial cable. MCU 220 first instructs the MAX96717 serializer to pull GPIO0 low, putting the AR0820 image sensor (i.e., image sensor 420) in a reset state for a fourth preset duration T_reset (preferably 5ms in this embodiment); then it sends a release reset command to pull GPIO0 high, releasing the AR0820 image sensor from its reset state.

[0038] The MCU 220 then starts a timer to force a wait for a third preset duration T_sensor_stable (preferably 15ms in this embodiment) to ensure that the PLL and crystal oscillator inside the AR0820 image sensor start oscillating and stabilize after the reset is released.

[0039] 6. Batch parameter configuration and host computer stream reconstruction stage: The MCU 220 or the host computer 100 SensingCaptureV2 issues a standard initialization configuration sequence to perform batch register configuration (such as exposure parameters, channel mapping, etc.) on the MAX96717 serializer and AR0820 image sensor. After configuration, the internal state machine of the MAX96712 deserializer is reconstructed, and the FX3 USB controller 210 sends a "device hot-plug ready" control endpoint notification to the host computer 100 on the PC.

[0040] After SensingCaptureV2 captures the event, it seamlessly rebuilds the USB receive pipeline (UVC transmission pipeline or bulk transmission pipeline). The AR0820 begins outputting MIPI signals, which travel through the MAX96717 serializer, coaxial cable, and MAX96712 deserializer to the FX3 chip, and the screen automatically resumes preview. The entire process requires no re-plugging of the USB bus, and the host computer never crashes.

[0041] 7. Emergency handling stage of hot pulling out: If the AR0820 camera module is unplugged during operation, the MAX96712 deserializer hardware detects the loss of the LOCK signal within microseconds and immediately sends a high-priority interrupt to the MCU 220. Within a preset response time (preferably 20 microseconds in this embodiment), the MCU 220 forcibly shuts off the PoC power switch 230 and disconnects the coaxial cable power supply to prevent arcing and burnout of the connector during hot-plugging. Simultaneously, the MCU 220 notifies SensingCaptureV2 to suspend the image acquisition thread, and the host computer 100 enters a "waiting for camera connection" state to prevent software freeze.

[0042] When the camera module 400 is reinserted, repeat steps 1 to 6 above. The image will automatically recover within 3 seconds without needing to restart the host computer 100 or re-plug the USB bus.

[0043] Timeout handling mechanism: If the MCU 220 does not detect a valid LOCK signal within the 50ms T_lock duration, it determines that the link establishment has failed. At this time, the MCU 220 performs exception handling: immediately shuts off the PoC power switch, cuts off power to the coaxial cable, issues an alarm, and returns to standby mode, waiting for the next access detection trigger. This timeout handling mechanism effectively prevents infinite waiting and system hangs caused by mis-plugging, cable damage, or poor contact.

[0044] Compatibility with different hardware platforms: This invention is not limited to the specific chip models described in the above embodiments. In one variant embodiment, the GMSL deserializer 240 can be a MAX96724 series chip, the remote serializer 410 can be a MAX96717F series chip, and the image sensor 420 can be another model of a GMSL-compatible image sensor 420. In another variant embodiment, the MCU 220 can be an ARM Cortex-M series microcontroller from another brand, and the USB controller 210 can be another USB controller 210 that supports UVC or bulk transfer protocols. All of the above variations do not depart from the scope of protection of this invention.

[0045] Definitions: 1. GMSL (Gigabit Multimedia Serial Link): A gigabit multimedia serial link, mainly used for long-distance, low-latency high-definition video transmission in automobiles and industrial cameras.

[0046] 2. PoC (Power over Coax): Coaxial cable power supply technology, which transmits high-frequency video signals, bidirectional control signals and DC power simultaneously through a single coaxial cable.

[0047] 3. Lock (Phase-locked / Link-locked): This refers to the state in which the GMSL deserializer 240 and the remote serializer 410 have successfully handshaked and aligned at the clock and protocol layers, and a stable connection has been established between the control channel and the data path.

[0048] 4. PDB / RESET Pin: The hardware reset control pin of the image sensor 420. It is usually reset when low level and normal operation when high level. It has extremely high requirements for the release timing after power-on.

[0049] In summary, unlike existing technologies that use a blind-apply PoC upon power-on, this invention employs a dynamic power control logic of "no-power insertion detection → PoC soft-start after impedance satisfaction → PoC instantaneous disconnection upon removal." The PoC power supply is precisely switched according to the insertion / removal status, avoiding damage to the SerDes chip and camera from surge currents and contact arcs during hot-plugging, thus significantly reducing the failure rate of the acquisition box in complex testing environments. Unlike existing cameras that rely on local RC reset and whose timing is susceptible to power fluctuations, this invention employs an active, microsecond-level reset timing sequence: "MCU 220 controls the deserializer → cross-link control of the remote serializer 410 GPIO → cascade control of the image sensor PDB release." Because T_poc_stable → T_lock → T_sensor_stable are precisely locked within the optimal operating range, the power-on timing of the image sensor 420 and the remote serializer 410 is strictly guaranteed, resulting in a near 100% success rate for hot-plugging and reconnecting. This invention packages the changes in the underlying hardware state (impedance change, LOCK establishment / loss) into proprietary control events by the USB controller 210 and interfaces them with the host computer 100 SensingCaptureV2 to achieve a seamless closed loop of "hard plugging / unplugging → soft reset and reconnection → automatic image recovery". When the camera is unplugged, the host computer 100 pauses gracefully, and when the camera is plugged back in, the image automatically recovers within 3 seconds. This eliminates the need for testers to frequently restart the software or unplug and plug the USB bus, significantly improving the efficiency of R&D debugging and production line testing.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A hardware initialization timing control method for a hot-swappable GMSL video capture box, applied to a video capture box, the video capture box comprising an MCU, a GMSL deserializer, a PoC power switch, and a USB controller, characterized in that, The method includes: S1: Access detection: The MCU or GMSL deserializer detects the access signal of the GMSL coaxial port. When the camera module is detected to be inserted into the GMSL coaxial port, an access trigger signal is sent to the MCU. S2: PoC power soft start. In response to the access trigger signal, the MCU sends an enable command to the PoC power switch to supply power to the camera module via the coaxial cable in a soft start mode, and waits for a first preset time T_poc_stable. S3: Link Locking. The MCU performs a reset operation on the GMSL deserializer and enables the reverse channel of the GMSL deserializer to establish a link lock with the remote serializer. The MCU polls the locking status of the GMSL deserializer. When a valid locking signal is detected within the second preset time T_lock, the link lock is determined to be successful. S4: Sensor reset release. The MCU controls the image sensor's reset pin via the GMSL deserializer and remote serializer to first keep the image sensor in a reset state, then release the reset, and wait for a third preset time T_sensor_stable. S5: Parameter configuration and video stream reconstruction. Perform parameter configuration on the remote serializer and image sensor. After the configuration is completed, the USB controller sends a ready notification to the host computer so that the host computer can rebuild the USB receiving pipe and restore the image preview.

2. The method according to claim 1, characterized in that, S1 was preceded by: The MCU turns off the PoC power switch by default in standby mode, so that the GMSL coaxial port is in a power-off state. The access signal is obtained through impedance detection. When the camera module is inserted, the characteristic impedance of the GMSL coaxial port changes abruptly, triggering a GPIO interrupt of the GMSL deserializer or a change in the level of the detection pin of the MCU. The access trigger signal is generated by the GPIO interrupt or the change in the level of the detection pin.

3. The method according to claim 1, characterized in that, In S2, the first preset duration T_poc_stable is 10ms to 20ms.

4. The method according to claim 1, characterized in that, In S3, the specific locking state of the MCU polling the GMSL deserializer is as follows: The MCU reads the LOCK register of the GMSL deserializer using a hardware timing method; If no valid lock signal is detected within the second preset duration T_lock, the MCU will turn off the PoC power switch and return to standby mode. The second preset duration T_lock is 50ms.

5. The method according to claim 1, characterized in that, S4 specifically includes: The MCU sends a command to the remote serializer via the I2C / control bus of the GMSL deserializer, controlling the GPIO pin of the remote serializer to output a low level. The GPIO pin is physically connected to the reset pin of the image sensor, so that the image sensor is kept in a reset state for a fourth preset time T_reset. The MCU then sends a command to the remote serializer to control the GPIO pin to output a high level, releasing the image sensor from its reset state. The MCU waits for the third preset duration T_sensor_stable; The fourth preset duration T_reset is 5ms, and the third preset duration T_sensor_stable is 15ms.

6. The method according to claim 1, characterized in that, In S5, the parameter configuration includes: The MCU or host computer sends out an initialization configuration sequence to configure the registers of the remote serializer and the image sensor; After configuration, the internal state machine of the GMSL deserializer is reconstructed, and the USB controller sends a control endpoint notification to the host computer. After the host computer captures the control endpoint notification, it rebuilds the USB receiving pipeline, which includes a UVC transmission pipeline or a bulk transmission pipeline.

7. The method according to claim 1, characterized in that, Following S5, S6 is also included: When the camera module is unplugged from the GMSL coaxial port, the GMSL deserializer detects the loss of the lock signal and sends an interrupt to the MCU; In response to the interrupt, the MCU forcibly shuts down the PoC power switch and sends a notification to the host computer so that the host computer can suspend the image acquisition thread.

8. The method according to claim 7, characterized in that, The MCU forcibly shuts down the PoC power switch within 20 microseconds.

9. The method according to any one of claims 1 to 8, characterized in that, The MCU is an STM32 series microcontroller, the USB controller is a CYPRESS FX3 series controller, the GMSL deserializer is a MAX96712 or MAX96724 series deserializer chip, the remote serializer is a MAX96717 or MAX96717F series serializer chip, and the image sensor is an AR0820 series image sensor.

10. The method according to claim 1, characterized in that, In S1-S5, the reverse control channel between the GMSL deserializer and the remote serializer is used to achieve coordinated closed-loop control between the image sensor reset timing and the PoC power switch switching timing. In S5, after the host computer rebuilds the video stream receiving pipeline, the video capture box automatically restores the image preview without having to unplug and replug the USB bus.