Multi-sensor synchronous triggering method and device, electronic equipment, computer readable storage medium and computer program product
By dynamically adjusting the synchronization trigger signal of multi-sensors in system-level chips, the problem of insufficient flexibility of multi-sensor synchronous triggering in the prior art is solved, and multi-sensor synchronous operation with high accuracy and flexibility is achieved.
Patent Information
- Application Number
- CN202510054978.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-25
AI Technical Summary
The existing multi-sensor synchronization triggering methods are poor in flexibility and cannot dynamically adjust the working time of the sensor, resulting in insufficient synchronization accuracy and flexibility in applications such as autonomous driving and industrial control.
By deploying a hardware timer and a central processor in a system-level chip, the working start time and operating frequency of the first sensor are obtained, and the hardware timer is used to trigger the central processor to enter the interrupt service program, generate a synchronization trigger signal, and send the signal to the second sensor to realize the synchronous operation of multiple sensors. This method also supports adjusting the interrupt start time and interval, improving the flexibility of synchronous triggering.
It realizes flexible synchronization between multiple sensors, improves the accuracy and flexibility of synchronization triggering, and is suitable for the needs of multi-sensor collaborative work in different application scenarios.
Smart Images

Figure CN119872588A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial control technology, and in particular to a multi-sensor synchronous triggering method, device, electronic device, computer-readable storage medium and computer program product. Background Art
[0002] In the fields of autonomous driving and industrial control, the application of multi-sensor collaboration is becoming more and more widespread. For example, in the application scenario of using multiple image sensors, multiple image sensors need to be exposed at the same time to synchronously collect images. Or, in the application scenario of using image sensors and laser sensors at the same time, the image sensors and laser sensors need to start working at the same time to collect image data and radar data at the same time.
[0003] At present, it is common to add a timer and a synchronization hardware unit to the system-level chip of the image sensor. The timer is used to count, and the synchronization hardware unit is used to generate a trigger signal of the image sensor according to the fixed frequency of the timer to trigger the image sensor to work synchronously with other sensors. However, since the signal generation frequency of the synchronization hardware unit is fixed and cannot be adjusted and modified, the existing triggering method has poor flexibility. Summary of the invention
[0004] Based on this, it is necessary to provide a more flexible multi-sensor synchronous triggering method, device, electronic device, computer-readable storage medium and computer program product to address the above technical problems.
[0005] In a first aspect, the present application provides a multi-sensor synchronous triggering method, which is applied to a system-level chip deployed with a central processing unit and a hardware timer, comprising:
[0006] Obtaining the working start time and working frequency of the first sensor;
[0007] Using the hardware timer to trigger the central processing unit to enter an interrupt service program based on the working start time and the working frequency, the interrupt service program is used to generate a synchronous trigger signal;
[0008] The synchronization trigger signal is sent to the second sensor, where the synchronization trigger signal is used to trigger the second sensor to work synchronously with the first sensor.
[0009] In one embodiment, the using of the hardware timer to trigger the central processing unit to enter an interrupt service routine based on the working start time and the working frequency includes:
[0010] Determine the interrupt start time of the hardware timer according to the work start time;
[0011] Determine an interrupt time interval of the hardware timer according to the operating frequency;
[0012] The hardware timer is triggered to send an interrupt signal to the central processing unit at the interrupt start time, and the hardware timer is controlled to repeat the operation of sending the interrupt signal every interrupt time interval, and the interrupt signal is used to trigger the central processing unit to enter the interrupt service program.
[0013] In one embodiment, the method further comprises:
[0014] In response to the adjustment operation on the interruption start time, receiving an adjusted interruption start time;
[0015] The hardware timer is updated with the adjusted interrupt start time, so that the hardware timer subsequently starts to send the interrupt signal to the central processing unit at the adjusted interrupt start time.
[0016] In one embodiment, the method further comprises:
[0017] In response to the adjustment operation on the interruption time interval, receiving an adjusted interruption time interval;
[0018] The hardware timer is updated with the adjusted interrupt time interval, so that the hardware timer subsequently repeats the operation of sending an interrupt signal at intervals of the adjusted interrupt time interval.
[0019] In one embodiment, the system-level chip includes a plurality of general purpose input and output interfaces, each of which is connected to a plurality of the second sensors;
[0020] The sending the synchronization trigger signal to the second sensor includes:
[0021] The synchronization trigger signal is sent to each connected second sensor through each general input and output interface.
[0022] In one embodiment, before obtaining the working start time and working frequency of the first sensor, the method further includes:
[0023] Acquire the timing source data of the first sensor;
[0024] The hardware timer is configured to count synchronously with the first sensor according to the timing source data.
[0025] In a second aspect, the present application further provides a multi-sensor synchronization triggering device, which is applied to a system-level chip deployed with a central processing unit and a hardware timer, comprising:
[0026] A data acquisition module, used to acquire the working start time and working frequency of the first sensor;
[0027] A timing interrupt module, used to trigger the central processing unit to enter an interrupt service program based on the working start time and the working frequency by using the hardware timer, and the interrupt service program is used to generate a synchronous trigger signal;
[0028] The synchronous trigger module is used to send the synchronous trigger signal to the second sensor, and the synchronous trigger signal is used to trigger the second sensor to work synchronously with the first sensor.
[0029] In a third aspect, the present application further provides an electronic device, wherein the electronic device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the multi-sensor synchronous triggering method described in any one of the embodiments of the first aspect is implemented.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the multi-sensor synchronous triggering method described in any one of the embodiments of the first aspect is implemented.
[0031] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the multi-sensor synchronous triggering method described in any one of the embodiments of the first aspect is implemented.
[0032] The above-mentioned multi-sensor synchronous triggering method, device, electronic device, computer-readable storage medium and computer program product obtain the working start time and working frequency of the first sensor in the multi-sensors, use the hardware timer of the system-level chip based on the working start time and working frequency of the first sensor, trigger the central processor of the system-level chip to generate a synchronous trigger signal each time the first sensor starts working, and send a synchronous trigger signal to the second sensor other than the first sensor to achieve synchronous operation of the second sensor and the first sensor. The working start time and working frequency of the first sensor can be used to dynamically adjust the working time of the second sensor, thereby improving the flexibility of multi-sensor synchronous triggering. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A diagram showing an application environment of a multi-sensor synchronous triggering method in one embodiment;
[0035] Figure 2 A schematic diagram of a flow chart of a multi-sensor synchronous triggering method in one embodiment;
[0036] Figure 3 A schematic diagram of a flow chart of an interrupt signal triggering step in an embodiment;
[0037] Figure 4 is an application environment diagram of a multi-sensor synchronous triggering method in another embodiment;
[0038] Figure 5 A schematic diagram of a flow chart of a multi-sensor synchronous triggering method in another embodiment;
[0039] Figure 6 A schematic diagram of the triggering time of an interrupt service program in one embodiment;
[0040] Figure 7 FIG. 7 is a structural block diagram of a multi-sensor synchronous triggering device 700 in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0043] The multi-sensor synchronous triggering method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown in the figure, the system-on-chip (SOC) 120 is electrically connected to the first sensor 100 and the second sensor 140 respectively. The system-on-chip 120 is equipped with a hardware timer 122 (TIM) and a central processing unit 124 (CPU).
[0044] Specifically, the system-level chip 120 can obtain the working start time and working frequency of the first sensor 100. The system-level chip 120 can use the hardware timer 122 to trigger the central processor 124 to enter the interrupt service program based on the working start time and working frequency, and the interrupt service program is used to generate a synchronization trigger signal. The system-level chip 120 can send a synchronization trigger signal to the second sensor 140, and the synchronization trigger signal is used to trigger the second sensor 140 to work synchronously with the first sensor 100. In some embodiments, the synchronization trigger signal can be a File Synchronize signal, referred to as an FSYNC signal.
[0045] Compared with the traditional technical means that requires additional deployment of synchronization hardware units in the system-level chip to realize the synchronous triggering of the first sensor and the second sensor, in this embodiment, the hardware timer of the system-level chip is used to trigger the central processing unit to enter the interrupt service program to generate a synchronization trigger signal based on the working start time and working frequency of the first sensor, and send the synchronization trigger signal to the second sensor to realize the synchronous operation of the first sensor and the second sensor. In the case of deploying only the hardware timer and the central processing unit, the synchronous triggering of multiple sensors can be realized by combining software and hardware, thereby reducing the hardware deployment cost of the system-level chip.
[0046] In an exemplary embodiment, Figure 2 As shown, a multi-sensor synchronous triggering method is provided, which is applied to Figure 1 The system-on-chip 120 in the embodiment is taken as an example to illustrate, and the method includes the following steps S202 to S206. Among them:
[0047] Step S202, obtaining the working start time and working frequency of the first sensor.
[0048] Among them, the first sensor may include but is not limited to one or more sensors such as laser sensors, millimeter wave radars, cameras, and cameras.
[0049] Optionally, in some embodiments, the system-level chip can determine the working start time and working frequency of the first sensor by detecting an external trigger signal of the first sensor. Alternatively, in other embodiments, the system-level chip can also obtain the working start time and working frequency of the first sensor from the timing source of the first sensor.
[0050] Step S204, using the hardware timer to trigger the central processing unit to enter the interrupt service program based on the working start time and the working frequency, and the interrupt service program is used to generate a synchronous trigger signal.
[0051] Among them, the hardware timer can be used for timing.
[0052] Optionally, in some embodiments, the system-level chip can use a hardware timer to initialize the count value based on the working start time of the first sensor, so that the hardware timer starts counting from zero at the working start time of the first sensor. When the count value of the hardware timer matches the working frequency of the first sensor, the hardware timer is used to send an interrupt signal to the central processing unit to instruct the central processing unit to enter the interrupt service program after receiving the interrupt signal and generate a synchronization trigger signal corresponding to the first sensor.
[0053] Alternatively, in some other embodiments, the system-level chip can use the hardware timer to use the working start time and working frequency of the first sensor to determine the starting time of each operation of the first sensor. The hardware timer is used to trigger the central processor to enter the interrupt service program at each starting time of the first sensor, so that the central processor enters the interrupt service program and generates a synchronous trigger signal corresponding to the first sensor each time the first sensor starts working.
[0054] Step S206: Send a synchronization trigger signal to the second sensor, where the synchronization trigger signal is used to trigger the second sensor to work synchronously with the first sensor.
[0055] The second sensor may be used to represent a sensor of a different type from the first sensor. For example, when the first sensor is a laser sensor, the second sensor may be a camera or a video camera. When the first sensor is a camera or a video camera, the second sensor may be a laser sensor.
[0056] Exemplarily, the system-level chip may include a communication interface for data transmission with the second sensor. The system-level chip may use the corresponding communication interface to send the synchronization trigger signal generated in step S204 to the second sensor, so as to trigger the second sensor to start working after receiving the synchronization trigger signal, thereby achieving synchronous operation of the second sensor and the first sensor.
[0057] Optionally, in some embodiments, since the second sensor works synchronously with the first sensor, the data collected by the second sensor and the data collected by the first sensor can be regarded as data at the same time, which is conducive to the subsequent fusion of the data collected by the first sensor and the second sensor.
[0058] In the above-mentioned multi-sensor synchronous triggering method, by acquiring the working start time and working frequency of the first sensor in the multi-sensors, the hardware timer of the system-level chip is used to trigger the central processor of the system-level chip to generate a synchronous trigger signal each time the first sensor starts working based on the working start time and working frequency of the first sensor, and send a synchronous trigger signal to the second sensor other than the first sensor to achieve synchronous operation of the second sensor and the first sensor. The working start time and working frequency of the first sensor can be used to dynamically adjust the working time of the second sensor, thereby improving the flexibility of multi-sensor synchronous triggering.
[0059] In an exemplary embodiment, Figure 3 As shown, step S204 includes steps S302 to S306. Among them:
[0060] Step S302, determining the interrupt start time of the hardware timer according to the work start time.
[0061] Optionally, in some embodiments, the system-level chip can directly use the working start time of the first sensor as the interrupt start time of the hardware timer. Or, in other embodiments, when there is a delay in the process of the hardware timer triggering the central processor to enter the interrupt service program, the delay and the working start time can be used for calculation processing to obtain the interrupt start time of the hardware timer.
[0062] Step S304, determining the interrupt time interval of the hardware timer according to the operating frequency.
[0063] Exemplarily, the system-level chip can perform operation processing on the operating frequency of the first sensor to obtain a time period value corresponding to the operating frequency. The time period value is used as the interrupt time interval of the hardware timer. For example, when the operating frequency is 10 Hz, the time period value corresponding to the operating frequency can be calculated to be 100 milliseconds. Then, the interrupt time interval of the hardware timer can be set to 100 milliseconds.
[0064] Step S306, triggering the hardware timer to send an interrupt signal to the central processor at the interrupt start time, and controlling the hardware timer to repeat the operation of sending the interrupt signal at every interrupt time interval, and the interrupt signal is used to trigger the central processor to enter the interrupt service program.
[0065] For example, when the interrupt start time is T and the interrupt time interval is D, the system-level chip can trigger the hardware timer to send an interrupt signal to the central processor at T, T+D, T+2D, T+nD (n is a positive integer), etc., starting from T, so that the central processor enters the interrupt service program to generate a synchronous trigger signal after receiving the interrupt signal. At this time, since the first sensor also works at T, T+D, T+2D, T+nD (n is a positive integer), etc., the second sensor can work synchronously with the first sensor.
[0066] In this embodiment, by determining the interrupt start time of the hardware timer according to the work start time, determining the interrupt time interval of the hardware timer according to the working frequency, triggering the hardware timer to send an interrupt signal to the central processing unit at the interrupt start time, and controlling the hardware timer to repeat the operation of sending the interrupt signal every interrupt time interval, the accuracy of multi-sensor synchronous triggering can be improved.
[0067] For example, in some actual application scenarios, there may be a delay between the data collected by the first sensor and the second sensor due to factors such as the different time required for the first sensor and the second sensor to collect data, or the time required for the central processing unit to enter the interrupt service program, or the time required for the central processing unit to generate a synchronization trigger signal.
[0068] In order to further improve the accuracy of multi-sensor synchronization, the present application also provides a technical means for customizing the interruption start time. In an exemplary embodiment, the multi-sensor synchronization triggering method provided by the present application may also include: in response to the adjustment operation for the interruption start time, receiving the adjusted interruption start time; using the adjusted interruption start time to update the hardware timer so that the subsequent hardware timer starts working at the adjusted interruption start time.
[0069] Exemplarily, the system-level chip can respond to the user-triggered adjustment operation for the interrupt start time of the hardware timer and receive the adjusted interrupt start time input by the user. Alternatively, it can also respond to the adjustment operation for the interrupt start time and receive the time adjustment parameter for the original interrupt start time input by the user, and use the time adjustment parameter to perform calculation processing on the original interrupt start time, so as to obtain the adjusted interrupt start time. The system-level chip can use the adjusted interrupt start time to update the hardware timer, and control the hardware timer to subsequently send an interrupt signal to the central processing unit from the adjusted interrupt start time. For example, when the adjusted interrupt start time is T', the hardware timer can be triggered to send an interrupt signal to the central processing unit at times such as T', T'+D, T'+2D, T'+nD (n is a positive integer), etc.
[0070] In this embodiment, by supporting the user to customize the interrupt start time of the hardware timer, the flexibility of multi-sensor synchronous triggering can be improved, which is suitable for use requirements in different application scenarios.
[0071] In order to further improve the accuracy of multi-sensor synchronization, the present application also provides a technical means for customizing the interrupt time interval. In an exemplary embodiment, the multi-sensor synchronization triggering method provided by the present application may also include: in response to the adjustment operation for the interrupt time interval, receiving the adjusted interrupt time interval; using the adjusted interrupt time interval to update the hardware timer, so that the subsequent hardware timer repeats the operation of sending the interrupt signal every time the adjusted interrupt time interval is reached.
[0072] Exemplarily, the system-level chip can receive the adjusted interrupt time interval input by the user in response to the user's adjustment operation for the interrupt time interval. Alternatively, it can also receive the interval adjustment parameter for the interrupt time interval input by the user in response to the adjustment parameter for the interrupt time interval. The interval adjustment parameter is used to perform calculation processing with the original interrupt time interval to obtain the adjusted interrupt time interval. The system-level chip can use the adjusted interrupt time interval to update the hardware timer, and control the hardware timer to repeat the operation of sending an interrupt signal to the central processing unit at every adjusted interrupt time interval after the interrupt start time. For example, when the adjusted interrupt time interval is D', the hardware timer can be triggered to send an interrupt signal to the central processing unit at times such as T, T+D', T+2D', T+nD' (n is a positive integer).
[0073] In this embodiment, by supporting the user to customize the interrupt time interval of the hardware timer, the flexibility of multi-sensor synchronous triggering can be improved, which is suitable for use requirements in different application scenarios.
[0074] Optionally, in some embodiments, the multi-sensor synchronous triggering method provided by the present application may further include: in response to an adjustment operation for the interrupt start time and the interrupt time interval, receiving an adjusted interrupt start time and an adjusted interrupt time interval. Initializing a hardware timer using the adjusted interrupt start time and the adjusted interrupt time interval, and controlling the hardware timer to send an interrupt signal to a central processor every time the adjusted interrupt time interval starts from the adjusted interrupt start time.
[0075] In this embodiment, by supporting the user to customize the interrupt start time and interrupt time interval of the hardware timer, the flexibility of multi-sensor synchronous triggering can be improved.
[0076] In an exemplary embodiment, the system-on-chip may further include several universal input / output interfaces, each of which may be connected to multiple second sensors. The above step S206 may include: sending a synchronization trigger signal to each connected second sensor via each universal input / output interface.
[0077] Among them, the general purpose input / output ports (GPIO) can be configured as input or output to meet different application requirements.
[0078] For example, Figure 4 As shown, the system-on-chip 120 may further include a general purpose input / output interface 126 , and each general purpose input / output interface 126 may be connected to a plurality of second sensors 140 .
[0079] Although Figure 4 Only the hardware structure of deploying two universal input and output interfaces 126 in the system-level chip 120 and each universal input and output interface 126 connecting two second sensors 140 is shown. However, those skilled in the art can understand that, based on the inventive concept of the present application, the number of universal input and output interfaces 126 and the number of second sensors 140 connected to the universal input and output interfaces 126 can be flexibly adjusted according to the usage requirements in different application scenarios.
[0080] The system-on-chip can simultaneously use each universal input / output interface 126 to send the same synchronization trigger signal to each second sensor 140 connected thereto, so that each second sensor 140 that receives the synchronization trigger signal can simultaneously work synchronously with the first sensor 100 .
[0081] Optionally, in some embodiments, since the number of second sensors that can be connected to a universal input / output interface is limited, the upper limit is usually four. Therefore, when the number of second sensors is more than four, multiple universal input / output interfaces need to be deployed. In addition, each universal input / output interface is also synchronized.
[0082] In this embodiment, by connecting a plurality of second sensors using a universal input / output interface, not only can the second sensors work synchronously with each other, but also each second sensor can work synchronously with the first sensor.
[0083] In an exemplary embodiment, before step S202, the method may further include: acquiring timing source data of the first sensor; and configuring a hardware timer to count synchronously with the first sensor according to the timing source data.
[0084] Among them, the timing source data may include but is not limited to time data from timing sources such as network timing (a timing method based on the Network Time Protocol, referred to as NTP timing), local network timing (a timing method based on the Precision Time Protocol, referred to as PTP timing) or the Global Navigation Satellite System (GNSS).
[0085] Optionally, in some embodiments, the system-level chip can obtain the time data of the network timing through the NTP protocol. Alternatively, in other embodiments, the system-level chip can also obtain the time data of the local network timing through the PTP protocol. Alternatively, in other embodiments, the system-level chip can also obtain the time data of the global navigation satellite system through the global positioning system.
[0086] Exemplarily, since the first sensor performs timing and time synchronization based on the timing source data, the system-level chip uses the timing source data of the first sensor to initialize and configure the hardware timer so that the hardware timer can count synchronously with the first sensor.
[0087] In this embodiment, by acquiring the timing source data of the first sensor and configuring the hardware timer to count synchronously with the first sensor according to the timing source data, the time synchronization accuracy between the hardware timer and the first sensor can be improved, which helps to improve the accuracy of multi-sensor synchronous triggering.
[0088] In an exemplary embodiment, Figure 5 As shown, a multi-sensor synchronous triggering method is also provided, including the following steps S502 to S510. Among them:
[0089] Step S502: Acquire the timing source data of the first sensor, and configure the hardware timer to count synchronously with the first sensor according to the timing source data.
[0090] Exemplarily, the first sensor may be a laser sensor. The system-on-chip may obtain the timing source data of the laser sensor, and use the timing source data to initialize its own hardware timer to configure the hardware timer to count synchronously with the first sensor.
[0091] Step S504, obtaining the working start time and working frequency of the first sensor.
[0092] Step S506, determining the interruption start time according to the working start time, and determining the interruption time interval according to the working frequency.
[0093] Step S508, triggering the hardware timer to send an interrupt signal to the central processing unit at the interrupt start time, and controlling the hardware timer to repeatedly execute the operation of sending the interrupt signal at every interrupt time interval.
[0094] Exemplarily, the system-level chip can obtain the working start time and working frequency of the first sensor. The working start time of the first sensor is used as the interruption start time of the hardware timer. The interruption time interval of the hardware timer is determined by using the working frequency of the first sensor. The hardware timer is triggered to send an interrupt signal to the central processing unit at the interruption start time, and the hardware timer is controlled to repeat the operation of sending the interrupt signal every interruption time interval.
[0095] Step S510: using the interrupt signal to trigger the central processor to enter the interrupt service program to generate a synchronous trigger signal, and sending the synchronous trigger signal to each second sensor through each general input and output interface.
[0096] Exemplarily, the second sensor may be an image sensor. The system-level chip may use the interrupt signal to trigger the central processor to enter the interrupt service routine to generate high and low levels to form a synchronous trigger signal, and send the same synchronous trigger signal to each corresponding image sensor through each general input and output interface to trigger each image sensor to be synchronously exposed with the laser sensor.
[0097] Optionally, in some embodiments, Figure 6 As shown, the working start time of the laser sensor can be T0, and the working frequency of the first sensor can be 10 Hz. Then the laser sensor can collect data every 100 milliseconds starting from T0. Therefore, the system-level chip can set the interrupt start time of the hardware timer to T0 and the interrupt time interval of the hardware timer to 100 milliseconds. The hardware timer is controlled to trigger the central processor to enter the interrupt service program at T0, T0+100 milliseconds, T0+200 milliseconds, etc., so that the image sensor can work synchronously with the laser sensor at T0, T0+100 milliseconds, and T0+200 milliseconds.
[0098] Optionally, in some embodiments, the user can also be supported to customize the interruption time interval and the interruption start time of the hardware timer to change the triggering accuracy of the laser sensor and the image sensor. In other embodiments, since the interruption time interval of the hardware timer can be adjusted, the output frequency of the synchronous trigger signal can also be changed to obtain multiple signals with different output frequencies.
[0099] In this embodiment, by combining software control logic with a hardware timer and a central processing unit, a synchronization trigger signal corresponding to the first sensor is provided to the second sensor. This not only enables synchronous triggering of multiple sensors, but also facilitates adjustment of the periodic frequency of the synchronization trigger signal through software control logic to meet different usage requirements and obtain multiple groups of synchronization trigger signals with different frequencies.
[0100] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0101] Based on the same inventive concept, the embodiment of the present application also provides a multi-sensor synchronous triggering device for implementing the multi-sensor synchronous triggering method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more multi-sensor synchronous triggering device embodiments provided below can refer to the limitations of the multi-sensor synchronous triggering method above, and will not be repeated here.
[0102] In an exemplary embodiment, Figure 7 As shown, a multi-sensor synchronization triggering device 700 is provided, which is applied to a system-level chip with a central processing unit and a hardware timer, including: an M module, an N module and an L module, wherein:
[0103] A data acquisition module 702 is used to acquire the working start time and working frequency of the first sensor;
[0104] The timing interrupt module 704 is used to use the hardware timer to trigger the central processor to enter the interrupt service program based on the working start time and the working frequency, and the interrupt service program is used to generate a synchronous trigger signal;
[0105] The synchronous trigger module 706 is used to send a synchronous trigger signal to the second sensor, where the synchronous trigger signal is used to trigger the second sensor to work synchronously with the first sensor.
[0106] In an exemplary embodiment, the timing interrupt module 704 is also used to determine the interrupt start time of the hardware timer according to the work start time; determine the interrupt time interval of the hardware timer according to the working frequency; trigger the hardware timer to send an interrupt signal to the central processing unit at the interrupt start time, and control the hardware timer to repeat the operation of sending the interrupt signal every interrupt time interval, and the interrupt signal is used to trigger the central processing unit to enter the interrupt service program.
[0107] In an exemplary embodiment, the multi-sensor synchronization trigger device 700 also includes a time adjustment module for receiving an adjusted interrupt start time in response to an adjustment operation for the interrupt start time; and using the adjusted interrupt start time to update the hardware timer so that subsequent hardware timers start sending interrupt signals to the central processing unit at the adjusted interrupt start time.
[0108] In an exemplary embodiment, the multi-sensor synchronization trigger device 700 also includes an interval adjustment module for receiving an adjusted interrupt time interval in response to an adjustment operation on the interrupt time interval; and using the adjusted interrupt time interval to update the hardware timer so that subsequent hardware timers repeat the operation of sending an interrupt signal every adjusted interrupt time interval.
[0109] In an exemplary embodiment, the system-level chip includes several universal input and output interfaces, each of which is connected to multiple second sensors. The synchronous trigger module 706 is further configured to send a synchronous trigger signal to each connected second sensor through each universal input and output interface.
[0110] In an exemplary embodiment, the multi-sensor synchronization triggering device 700 further includes a timing synchronization module, which is used to obtain the timing source data of the first sensor; and configure the hardware timer to count synchronously with the first sensor according to the timing source data.
[0111] Each module in the multi-sensor synchronous triggering device 700 can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in the electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0112] Those skilled in the art will understand that the structures shown in the drawings in the above specification are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the drawings, or combine certain components, or have a different arrangement of components.
[0113] In an exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0114] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0115] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0116] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0117] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0118] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A multi-sensor synchronous triggering method, characterized in that: Applied to a system-on-chip equipped with a central processing unit and a hardware timer, the method comprises: Obtaining the working start time and working frequency of the first sensor; Using the hardware timer to trigger the central processing unit to enter an interrupt service program based on the working start time and the working frequency, the interrupt service program is used to generate a synchronous trigger signal; The synchronization trigger signal is sent to the second sensor, where the synchronization trigger signal is used to trigger the second sensor to work synchronously with the first sensor.
2. The method according to claim 1, characterized in that The method of using the hardware timer to trigger the central processing unit to enter an interrupt service routine based on the working start time and the working frequency includes: Determine the interrupt start time of the hardware timer according to the work start time; Determine an interrupt time interval of the hardware timer according to the operating frequency; The hardware timer is triggered to send an interrupt signal to the central processing unit at the interrupt start time, and the hardware timer is controlled to repeat the operation of sending the interrupt signal every interrupt time interval, and the interrupt signal is used to trigger the central processing unit to enter the interrupt service program.
3. The method according to claim 2, characterized in that The method further comprises: In response to the adjustment operation on the interruption start time, receiving an adjusted interruption start time; The hardware timer is updated with the adjusted interrupt start time, so that the hardware timer subsequently starts to send the interrupt signal to the central processing unit at the adjusted interrupt start time.
4. The method according to claim 2, characterized in that: The method further comprises: In response to the adjustment operation on the interruption time interval, receiving an adjusted interruption time interval; The hardware timer is updated with the adjusted interrupt time interval, so that the hardware timer subsequently repeats the operation of sending an interrupt signal at intervals of the adjusted interrupt time interval.
5. The method according to claim 1, characterized in that The system-level chip includes a plurality of general input and output interfaces, each of which is connected to a plurality of the second sensors; The sending the synchronization trigger signal to the second sensor includes: The synchronization trigger signal is sent to each connected second sensor through each general input and output interface.
6. The method according to claim 1, characterized in that Before obtaining the working start time and working frequency of the first sensor, the method further includes: Acquire the timing source data of the first sensor; The hardware timer is configured to count synchronously with the first sensor according to the timing source data.
7. A multi-sensor synchronous triggering device, characterized in that: Applied to a system-level chip equipped with a central processing unit and a hardware timer, the device comprises: A data acquisition module, used to acquire the working start time and working frequency of the first sensor; A timing interrupt module, used to use the hardware timer to trigger the central processing unit to enter an interrupt service program based on the working start time and the working frequency, and the interrupt service program is used to generate a synchronous trigger signal; The synchronous trigger module is used to send the synchronous trigger signal to the second sensor, and the synchronous trigger signal is used to trigger the second sensor to work synchronously with the first sensor.
8. An electronic device, characterized in that: The electronic device comprises a laser sensor, an image sensor and a system-level chip electrically connected to the laser sensor and the image sensor respectively, wherein a central processing unit and a hardware timer are deployed in the system-level chip; The system-on-chip is used for: Obtaining the working start time and working frequency of the laser sensor; Using the hardware timer to trigger the central processing unit to enter an interrupt service program based on the working start time and the working frequency, the interrupt service program is used to generate a synchronous trigger signal; The synchronous trigger signal is sent to the image sensor, where the synchronous trigger signal is used to control the image sensor to work synchronously with the laser sensor.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.