Signal generation method, system and intelligent driving controller for triggering a camera
Patent Information
- Application Number
- CN202311324261.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-10-12
AI Technical Summary
[0005]本申请提供一种触发相机的信号生成方法、系统和智能驾驶控制器,用以解决现有技术中产生触发相机的信号时的时延较大的问题
[0037]本申请提供的触发相机的信号生成方法、系统和智能驾驶控制器,智能驾驶控制器在接收到信号定时器产生的第一硬件中断信号之后,调用相应的中断处理函数并生成软件中断指令来执行该中断处理函数,从而生成触发相机的信号,实现减少线程负载对触发相机的信号的生成过程的影响,减小相机时延。
Smart Images

Figure CN117440239B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicles, and more particularly to a method, system, and intelligent driving controller for generating signals to trigger a camera. Background Technology
[0002] Intelligent driving, or driver assistance, is a crucial component of future automotive driving systems. Currently, for intelligent vehicles, capturing real-time scene footage via cameras is a common and practical method for obtaining real-time traffic information.
[0003] Because vehicles and obstacles move at a certain speed, any time difference between cameras can create significant driving hazards. Currently, the signal to trigger the camera is typically generated within a thread. Specifically, this is achieved through program control, which outputs high and low levels from general purpose input / output ports (GPIOs) to trigger the camera, causing it to perform actions such as taking photos or recording videos according to the program.
[0004] However, the above-mentioned method of generating signals to trigger the camera is subject to delays due to system scheduling. When the system load is high, the camera delay will be even longer. Summary of the Invention
[0005] This application provides a method, system, and intelligent driving controller for generating signals to trigger a camera, in order to solve the problem of large time delay when generating signals to trigger a camera in the prior art.
[0006] In a first aspect, this application provides a signal generation method for triggering a camera, applied to an intelligent driving controller. The output of the intelligent driving controller is connected to a camera, which is used to collect environmental information around the vehicle. The intelligent driving controller includes a signal timer and a general-purpose input / output module. The method includes:
[0007] The control signal timer generates the first hardware interrupt signal after the timing period ends;
[0008] The interrupt handler function corresponding to the first hardware interrupt signal is invoked, and a software interrupt instruction is generated based on the interrupt handler function. The software interrupt instruction is used to instruct the execution of the interrupt handler function, which includes parameters of multiple pulse signals to be output.
[0009] The first pulse signal is output according to the software interrupt instruction. The first pulse signal is one of a plurality of pulse signals to be output. The first pulse signal is used to trigger the camera.
[0010] Optionally, the input terminal of the intelligent driving controller is connected to the positioning and timing module;
[0011] Before the control signal timer generates the first hardware interrupt signal after the timing period ends, it also includes:
[0012] Receive the second hardware interrupt signal sent by the positioning and timing module at a fixed period.
[0013] Optionally, after outputting the first pulse signal according to the software interrupt instruction, the method further includes:
[0014] When the output pulse signal meets the preset termination condition, a timeout timer is configured. The timeout timer is used to monitor the second hardware interrupt signal.
[0015] If the next second hardware interrupt signal sent by the positioning and timing module according to a fixed period is not received after the timeout timer expires, the timeout timer is controlled to trigger the signal timer, so that the signal timer generates the first hardware interrupt signal after the timeout expires.
[0016] Optionally, after receiving the second hardware interrupt signal sent by the positioning and timing module at a fixed period, the method further includes:
[0017] Cancel any timeout timers that have not yet been executed.
[0018] Optionally, the output pulse signal is determined to meet a preset termination condition, specifically including:
[0019] Determine whether the first pulse signal is the last pulse signal among multiple pulse signals to be output;
[0020] If so, then the output pulse signal is determined to meet the preset termination condition.
[0021] Optionally, the method further includes:
[0022] If it is determined that the first pulse signal is not the last pulse signal among multiple pulse signals to be output, perform the following steps:
[0023] Step a: The control signal timer generates the first hardware interrupt signal again after the timing period ends;
[0024] Step b: Call the interrupt handler function corresponding to the first hardware interrupt signal again and generate the software interrupt instruction again based on the interrupt handler function;
[0025] Step c: Output the second pulse signal according to the software interrupt instruction; the second pulse signal is the pulse signal that follows the first pulse signal among multiple pulse signals to be output;
[0026] Step d: Determine whether the second pulse signal is the last pulse signal among multiple pulse signals to be output;
[0027] If yes in step e, then the output pulse signal is determined to meet the preset termination condition; otherwise, steps a-d are repeated until the second pulse signal is the last pulse signal among multiple pulse signals to be output, at which point the output pulse signal is determined to meet the preset termination condition.
[0028] Secondly, this application provides an intelligent driving controller, the output of which is connected to a camera used to collect environmental information around the vehicle; the intelligent driving controller includes a signal timer and a general-purpose input / output module; the intelligent driving controller is used for...
[0029] The control signal timer generates the first hardware interrupt signal after the timing period ends;
[0030] The interrupt handler function corresponding to the first hardware interrupt signal is invoked, and a software interrupt instruction is generated based on the interrupt handler function. The software interrupt instruction is used to instruct the execution of the interrupt handler function, which includes parameters of multiple pulse signals to be output.
[0031] The first pulse signal is output according to the software interrupt instruction and sent to the camera. The first pulse signal is one of a plurality of pulse signals to be output; the first pulse signal is used to trigger the camera.
[0032] Optionally, the input terminal of the intelligent driving controller is connected to the positioning and timing module;
[0033] The intelligent driving controller is also used to receive a second hardware interrupt signal sent by the positioning and timing module at a fixed period before the control signal timer generates a first hardware interrupt signal after the timer expires.
[0034] Optionally, the intelligent driving controller is also used to configure a timeout timer after determining that the output pulse signal meets the preset termination condition. The timeout timer is used to monitor the second hardware interrupt signal.
[0035] If the next second hardware interrupt signal sent by the positioning and timing module according to a fixed period is not received after the timeout timer expires, the timeout timer is controlled to trigger the signal timer, so that the signal timer generates the first hardware interrupt signal after the timeout expires.
[0036] Thirdly, this application provides a signal generation system for triggering a camera, including: a positioning and timing module, an intelligent driving controller as described in the second aspect and any embodiment of the second aspect, and at least one camera.
[0037] The signal generation method, system, and intelligent driving controller for triggering the camera provided in this application, after receiving the first hardware interrupt signal generated by the signal timer, call the corresponding interrupt handling function and generate a software interrupt instruction to execute the interrupt handling function, thereby generating the signal to trigger the camera, thereby reducing the impact of thread load on the signal generation process for triggering the camera and reducing camera latency. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This application provides a schematic diagram illustrating the execution order of threads and interrupts according to an embodiment of the present application.
[0040] Figure 2 This is a schematic diagram of the structure of an intelligent driving controller provided in one embodiment of this application;
[0041] Figure 3 A signal interaction diagram of a method for generating a signal to trigger a camera, provided in an embodiment of this application;
[0042] Figure 4 A flowchart illustrating a method for generating a signal to trigger a camera, as provided in an embodiment of this application;
[0043] Figure 5 This is a schematic diagram of a signal generation system for triggering a camera, provided in one embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate. For example, without departing from the scope of this document, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.
[0046] The terms “comprising” or “including” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups.
[0047] Currently, for intelligent vehicles, capturing real-time scene footage via cameras is a common and practical method for obtaining real-time road condition information. However, because vehicles and obstacles move at certain speeds, any time lag between cameras can create significant driving hazards.
[0048] Typically, cameras in autonomous driving systems are triggered by GPIO or pulse width modulation (PWM).
[0049] The PWM triggering scheme requires the system to have a PWM module that generates high-precision pulses and timestamps each pulse. Specifically, using a PWM module for triggering requires periodic time alignment of the PWM module; otherwise, the PWM module's output waveform will drift with time, temperature, and the reference clock. However, PWM modules typically lack pulse counting capabilities, making it impossible to obtain the number of pulses output in real time. Furthermore, enabling and disabling the PWM module introduces a delay, and traditional PWM modules also lack the ability to timestamp each pulse. This poses a significant challenge to aligning sensor data timing in autonomous driving systems.
[0050] In other words, when using a traditional PWM module to generate a signal to trigger the camera, the PWM module needs to be able to receive Pulse Per Second (PPS) signals or support receiving Precision Time Protocol (PTP) timestamp alignment time and provide a timestamp for each pulse. However, many systems' PWM modules do not have the ability to receive PPS signals or support receiving PTP time, nor do they provide the function of timestamping each pulse.
[0051] In GPIO solutions, the pulse that triggers the camera is typically generated by a thread. However, generating signals within a thread is easily affected by system scheduling, resulting in unpredictable delays. For example, in Linux systems, waking a thread from sleep and then running again can cause uncertain delays, typically exceeding 10 milliseconds, and even longer delays can occur under heavy system load.
[0052] To address the aforementioned problems, this application proposes a method, system, and intelligent driving controller for generating signals to trigger a camera. In this application, the response to interrupt signals takes precedence over the response of threads or processes. An interrupt signal is used to trigger the intelligent controller to generate a signal to trigger the camera, thereby reducing the impact of thread load on the generation of the camera trigger signal.
[0053] Figure 1 This is a schematic diagram illustrating the execution order of threads and interrupts according to an embodiment of this application. Figure 1 As shown, when an interrupt signal is received during the execution of a thread or process, the interrupt signal takes precedence over the thread or process. It should be understood that interrupted execution will only be interrupted by higher-priority interrupts.
[0054] The technical solutions of this application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0055] Figure 2 This is a schematic diagram of the structure of an intelligent driving controller provided in one embodiment of this application. Figure 2 As shown, the intelligent driving controller 100 includes a signal timer 110, a processor 120, and a GPIO 130.
[0056] The signal timer 110 is used to monitor the received hardware interrupt signals and generate hardware interrupt signals according to a fixed period. GPIO 130 is used to output high-level and / or low-level pulse signals according to the processor's instructions.
[0057] In some embodiments, the intelligent driving controller may further include a timeout timer 140 for triggering the signal timer 110 to generate a hardware interrupt signal. The specific functions of each part of the structure are described in conjunction with the following method embodiments.
[0058] Figure 3 This is a signaling interaction diagram of a signal generation method for triggering a camera, provided as an embodiment of this application. For example... Figure 3 As shown, the method in this embodiment may include the following steps:
[0059] S101, The signal timer generates the first hardware interrupt signal after the timing period ends.
[0060] In this embodiment, the first hardware interrupt signal generated by the signal timer takes precedence over the execution of the thread or process. The signal timer can be a high-precision timer.
[0061] S102, the signal timer sends the first hardware interrupt signal to the processor.
[0062] S103. The processor calls the interrupt handling function corresponding to the first hardware interrupt signal and generates a software interrupt instruction based on the interrupt handling function.
[0063] In this embodiment, the first hardware interrupt signal is used to trigger the processor to generate a software interrupt instruction. The software interrupt instruction is the instruction of the first hardware interrupt signal, which is executed first according to the parameters in the interrupt handling function.
[0064] The interrupt handler function corresponding to the first hardware interrupt signal can include parameters for multiple pulse signals to be output. For example, the interrupt handler function may include parameters for ten pulse signals, specifically the duration of the high level and the duration of the low level for each pulse signal.
[0065] S104. The processor generates and sends a pulse signal generation instruction to GPIO based on the software interrupt instruction.
[0066] Specifically, the pulse signal generation instruction generated by the software interrupt instruction is generated by calling the interrupt handling function according to the software interrupt instruction.
[0067] S105 and GPIO output the first pulse signal according to the pulse signal generation instruction and send it to the camera.
[0068] In this embodiment, the first pulse signal is one of a plurality of pulse signals to be output. That is, a first hardware interrupt signal only triggers one software interrupt. The first pulse signal is used to trigger the intelligent driving controller to control the general input / output module to generate a signal to trigger the camera.
[0069] Specifically, the first pulse signal is a signal that triggers the camera to collect environmental information around the vehicle.
[0070] The output of the intelligent driving controller is connected to the camera, specifically via GPIO. The camera is used to collect environmental information about the vehicle's surroundings after receiving a trigger signal.
[0071] The signal generation method for triggering the camera provided in this embodiment involves the intelligent driving controller generating a first hardware interrupt signal after the control signal timer expires. The first hardware interrupt signal triggers the processor to call the corresponding interrupt handling function and generate a software interrupt instruction. Then, the GPIO is controlled to output the multiple output pulse signals according to the parameters of the multiple output pulse signals in the interrupt handling function according to the software interrupt instruction, and finally, a signal to trigger the camera is generated. This method ensures that the generation of the camera trigger signal is not affected by the load of threads or processes, and the signal to trigger the camera is generated in a timely manner, reducing latency and improving the safety of autonomous driving.
[0072] In some embodiments, the input terminal of the intelligent driving controller is connected to the positioning and timing module. The positioning and timing module is used to send a second hardware interrupt signal to the signal timer.
[0073] Figure 4 This is a flowchart illustrating a signal generation method for triggering a camera, as provided in one embodiment of this application. Figure 4 As shown, with the intelligent driving controller as the executing entity, the method in this embodiment may include the following steps:
[0074] S201, Receive the second hardware interrupt signal generated by the positioning and timing module.
[0075] In this embodiment, the second hardware interrupt signal can be a PPS hardware interrupt signal. That is, the positioning and timing module generates the second hardware interrupt signal at a fixed frequency.
[0076] The positioning and timing module can also generate positioning information and reference time information. A second hardware interrupt signal generated by the positioning and timing module can improve the accuracy of camera triggering in terms of time and position, and reduce triggering latency.
[0077] S202, The control signal timer generates the first hardware interrupt signal after the timing period ends.
[0078] In this embodiment, the signal timer starts timing after receiving the second hardware interrupt signal, and generates the first hardware interrupt signal after the timing ends. The signal timer can be a high-precision timer.
[0079] S203, The control processor generates a software interrupt instruction in response to the first hardware interrupt signal.
[0080] S204 controls GPIO to output pulse signals according to software interrupt instructions.
[0081] In this embodiment, the software interrupt instruction is an instruction for GPIO to execute a pre-set camera trigger instruction.
[0082] Specifically, GPIO outputs multiple pulse signals according to the parameters of multiple pulse signals to be output in the interrupt handling function.
[0083] After the GPIO outputs the first pulse signal, it can send the first pulse signal to the camera, enabling the camera to capture the environment around the vehicle. Simultaneously, the GPIO can also synchronize the information from the output first pulse signal to the processor, allowing the processor to execute the judgment process in step S205.
[0084] S205. The control processor determines whether the output pulse signal has reached the termination condition.
[0085] When the processor determines whether the output pulse signal meets the preset end condition, it checks whether the GPIO outputs all pulse signals according to the interrupt handling function. If all pulse signals are output, the preset end condition is met; if not all pulse signals are output, the preset end condition is not met.
[0086] When the processor determines whether the output pulse signal meets the preset termination condition, it only needs to check whether the GPIO outputs all pulse signals according to the software interrupt handling function. When all pulse signals are output, the preset termination condition is met.
[0087] It is understandable that different hardware interrupt signals correspond to different interrupt handling functions, and the interrupt handling function corresponding to the first hardware interrupt signal is uniquely determined.
[0088] In some embodiments, the processor determines that the output pulse signal meets the preset termination condition in the following ways: determining whether the first pulse signal is the last pulse signal among a plurality of pulse signals to be output; if so, determining that the output pulse signal meets the preset termination condition.
[0089] It is understandable that the parameters of multiple pulse signals to be output in the interrupt handler are executed sequentially, and the interrupt handler ends a trigger cycle only after the parameters of the last pulse signal have been executed.
[0090] In this embodiment, by determining whether the first pulse signal is the last pulse signal among multiple pulse signals to be output, without needing a counter to determine how many pulse signals have been output, it is possible to effectively determine whether the output pulse signal meets the preset termination condition. At the same time, it has lower structural requirements for the intelligent driving controller and is more practical.
[0091] S2061. If the condition is met, then configure a second hardware interrupt signal timeout timer.
[0092] In this embodiment, the second hardware interrupt signal is generated at a fixed frequency, that is, the second hardware interrupt signal is transmitted to the signal timer at a fixed frequency.
[0093] After the previous second hardware interrupt signal is generated, the GPIO outputs a pulse signal and meets the preset termination condition. Then, it is necessary to monitor whether the next second hardware interrupt signal is transmitted to the signal timer at the fixed frequency. At this time, a timeout timer is needed to complete the monitoring process.
[0094] If the signal timer does not receive the next second hardware interrupt signal sent by the positioning and timing module according to a fixed period after the timeout timer expires, the processor will control the timeout timer to trigger the signal timer, so that the signal timer generates the first hardware interrupt signal after the timeout expires.
[0095] Specifically, the duration of the timeout timer can be set to be greater than the fixed frequency of the second hardware interrupt signal. For example, if the fixed frequency of the second hardware interrupt signal is 1 second, the duration of the timeout timer can be set to 1.005 seconds. If the signal timer still does not receive the next second hardware interrupt signal after 1.005 seconds, the processor will control the timeout timer to trigger the signal timer, causing the signal timer to generate the first hardware interrupt signal after the timer expires. In other words, the timeout timer can replace the second hardware interrupt signal generated by the positioning and timing module to trigger the signal timer to generate the first hardware interrupt signal, but this will introduce a certain delay, such as 0.005 seconds in this example.
[0096] In this embodiment, by configuring a timeout timer, when the second hardware interrupt signal generated by the positioning and timing module is not received on time or the second hardware interrupt signal is lost, the timeout timer will trigger the signal timer to generate the first hardware interrupt signal instead, thereby limiting the upper limit of the signal delay for generating the trigger camera and avoiding excessive delay.
[0097] Optionally, if the signal timer receives a second hardware interrupt signal sent by the positioning and timing module at a fixed period, the processor will cancel the unexecuted timeout timer, thereby avoiding repeated triggering of the signal timer to generate the first hardware interrupt signal.
[0098] S2062. If the condition is not met, the control signal timer will generate the first hardware interrupt signal again.
[0099] In some embodiments, step S2062 may be implemented in the following ways:
[0100] Step a: The control signal timer generates the first hardware interrupt signal again after the timing period ends.
[0101] It should be noted that after the signal timer receives a second hardware interrupt signal, it may need to generate multiple first hardware interrupt signals, each of which corresponds to one of the multiple pulse signals in the interrupt handling function.
[0102] If the preset termination condition is not met, that is, if the GPIO does not output all the pulse signals involved in the interrupt handling function, then the signal timer needs to compensate to generate the first hardware interrupt signal.
[0103] Step b: Call the interrupt handler function corresponding to the first hardware interrupt signal again and generate the software interrupt instruction again based on the interrupt handler function.
[0104] It is understandable that the interrupt handler function corresponding to the first hardware interrupt signal is uniquely determined, and each time the interrupt handler function corresponding to the first hardware interrupt signal is called, the same interrupt handler function is called.
[0105] Step c: Control the GPIO to output the second pulse signal according to the software interrupt instruction.
[0106] Specifically, the progress of GPIO sequentially outputting multiple pulse signals according to the interrupt handling function can be recorded. The second pulse signal is the pulse signal that follows the first pulse signal among the multiple pulse signals to be output.
[0107] For example, if the first pulse signal output in the previous operation was the third pulse signal among multiple pulse signals, then calling the interrupt handler function again and generating a software interrupt instruction based on the interrupt handler function will instruct the GPIO to output the fourth pulse signal among multiple pulse signals, which is the second pulse signal.
[0108] Step d: Determine whether the second pulse signal is the last pulse signal among multiple pulse signals to be output.
[0109] If yes in step e, then the output pulse signal is determined to meet the preset termination condition; otherwise, steps a-d are repeated until the second pulse signal is the last pulse signal among multiple pulse signals to be output, at which point the output pulse signal is determined to meet the preset termination condition.
[0110] In this embodiment, when the second pulse signal is the last pulse signal among multiple pulse signals to be output, it indicates that GPIO has output all pulse signals according to the interrupt handling function.
[0111] The signal generation method for triggering the camera provided in this embodiment uses software in conjunction with a high-precision signal timer to generate a high-precision signal for triggering the camera. Since high-precision signal timers are available in many system-on-chip (SoC) hardware and software systems, no additional high-precision signal generation hardware is required. The method in this embodiment has the advantages of wide applicability and reduced hardware costs.
[0112] Figure 5 This application provides a signal generation system for triggering a camera, as one embodiment of the present application. Figure 5 As shown, the signal generation system 10 that triggers the camera includes a positioning and timing module 200, an intelligent driving controller 100, and at least one camera 300.
[0113] The input terminal of the intelligent driving controller 100 is connected to the positioning and timing module 200, and the output terminal of the intelligent driving controller 100 is connected to the camera 300, which is used to collect environmental information around the vehicle.
[0114] The signal generation system 10 for triggering the camera provided in this embodiment has similar functions and implementation methods for each part of the structure to the above method embodiment, and will not be described again in this embodiment.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the intelligent driving controller embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0116] The modules can be physically separate, for example, installed in different locations within a single device, installed on different devices, distributed across multiple network units, or distributed across multiple processors. Alternatively, the modules can be integrated, for example, installed in the same device, or integrated into a single codebase. The modules can exist in hardware form, software form, or a combination of both. This application can select some or all of the modules to achieve the objectives of this embodiment based on actual needs.
[0117] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application 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. 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 this application.
Claims
1. A method for generating a signal to trigger a camera, characterized in that, The method is applied to an intelligent driving controller, the output of which is connected to a camera used to collect environmental information around the vehicle; the intelligent driving controller includes a signal timer and a general input / output module, and the method includes: The signal timer is controlled to generate a first hardware interrupt signal after the timing period ends; The interrupt handling function corresponding to the first hardware interrupt signal is invoked, and a software interrupt instruction is generated according to the interrupt handling function. The software interrupt instruction is used to instruct the execution of the interrupt handling function, and the interrupt handling function includes parameters of multiple pulse signals to be output. The first pulse signal is output according to the software interrupt instruction and sent to the camera. The first pulse signal is one of the plurality of pulse signals to be output. The first pulse signal is used to trigger the camera. The input terminal of the intelligent driving controller is connected to the positioning and timing module; Before the signal timer generates the first hardware interrupt signal after the timing period ends, the following steps are also included: Receive the second hardware interrupt signal sent by the positioning and timing module at a fixed period; After outputting the first pulse signal according to the software interrupt instruction, the method further includes: When the output pulse signal is determined to meet the preset termination condition, a timeout timer is configured, and the timeout timer is used to monitor the second hardware interrupt signal; If the next second hardware interrupt signal sent by the positioning and timing module according to a fixed period is not received after the timeout timer expires, the timeout timer is controlled to trigger the signal timer, so that the signal timer generates a first hardware interrupt signal after the timeout expires.
2. The signal generation method for triggering a camera according to claim 1, characterized in that, After receiving the second hardware interrupt signal sent by the positioning and timing module at a fixed period, the method further includes: Cancel any timeout timers that have not yet been executed.
3. The signal generation method for triggering a camera according to claim 1, characterized in that, The output pulse signal is determined to meet the preset termination conditions, specifically including: Determine whether the first pulse signal is the last pulse signal among the plurality of pulse signals to be output; If so, then the output pulse signal is determined to meet the preset termination condition.
4. The signal generation method for triggering a camera according to claim 3, characterized in that, The method further includes: If it is determined that the first pulse signal is not the last pulse signal among the plurality of pulse signals to be output, the following steps are performed: Step a: Control the signal timer to generate the first hardware interrupt signal again after the timer expires; Step b: Call the interrupt handling function corresponding to the first hardware interrupt signal again and generate a software interrupt instruction again according to the interrupt handling function; Step c: Output a second pulse signal according to the software interrupt instruction; the second pulse signal is the pulse signal located after the first pulse signal among the plurality of pulse signals to be output; Step d: Determine whether the second pulse signal is the last pulse signal among the plurality of pulse signals to be output; If yes, then the output pulse signal is determined to meet the preset end condition; if no, then steps a-d are repeated until the second pulse signal is the last pulse signal among the plurality of pulse signals to be output, at which point the output pulse signal is determined to meet the preset end condition.
5. An intelligent driving controller, characterized in that, The output of the intelligent driving controller is connected to a camera, which is used to collect environmental information around the vehicle; the intelligent driving controller includes a signal timer and a general input / output module; the intelligent driving controller is used for The signal timer is controlled to generate a first hardware interrupt signal after the timing period ends; The interrupt handling function corresponding to the first hardware interrupt signal is invoked, and a software interrupt instruction is generated according to the interrupt handling function. The software interrupt instruction is used to instruct the execution of the interrupt handling function, and the interrupt handling function includes parameters of multiple pulse signals to be output. The first pulse signal is output according to the software interrupt instruction and sent to the camera. The first pulse signal is one of the plurality of pulse signals to be output. The first pulse signal is used to trigger the camera. The input terminal of the intelligent driving controller is connected to the positioning and timing module; The intelligent driving controller is also used to receive a second hardware interrupt signal sent by the positioning and timing module at a fixed period before the signal timer generates a first hardware interrupt signal after the timing period ends. The intelligent driving controller is also used to configure a timeout timer after determining that the output pulse signal meets the preset end condition. The timeout timer is used to monitor the second hardware interrupt signal. If the next second hardware interrupt signal sent by the positioning and timing module according to a fixed period is not received after the timeout timer expires, the timeout timer is controlled to trigger the signal timer, so that the signal timer generates a first hardware interrupt signal after the timeout expires.
6. A signal generation system for triggering a camera, characterized in that, The system includes: a positioning and timing module, the intelligent driving controller as described in claim 5, and at least one camera.
Citation Information
Patent Citations
Apparatus and method of using hardware logic to inspect portable terminal taking module
CN1812494A