Radar driving method and device, equipment and storage medium
By using the interrupt callback function in ultrasonic radar drive, it continues to send serial interface communication data without waiting for feedback data, the problems of low radar driving efficiency and large memory usage are solved, and more efficient radar driving is achieved.
Patent Information
- Application Number
- CN202411543503.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-28
AI Technical Summary
Ultrasonic radar has low driving efficiency and occupies a large amount of domain controller memory, resulting in too long CPU execution time.
After sending the first serial interface communication data to the radar controller, there is no need to wait for feedback data, and only when the interrupt callback function of successfully sending the communication data is received, the second serial interface communication data must be continued until all data in the driver execution order are completed.
Improves the efficiency of radar drive, avoids the idle time of the domain controller when waiting for feedback data, and reduces memory usage.
Smart Images

Figure CN119537289A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of ultrasonic radar driving technology, and in particular to a radar driving method, device, equipment and storage medium. Background Art
[0002] In the automotive field, ultrasonic radar is particularly widely used. For example, in the reversing assistance system, ultrasonic radar can accurately measure the distance and position between the vehicle and surrounding objects. In addition, in autonomous driving technology, ultrasonic radar also plays an important role in helping vehicles perceive the surrounding environment and improve the accuracy and safety of autonomous driving.
[0003] Among them, the working process of ultrasonic radar is that the vehicle domain controller sends domain controller instructions or receives reply data to the main transceiver through SPI communication, and the main transceiver transmits domain controller instructions or uploads data collected by the radar through DSI communication. However, the SPI communication rate of the main transceiver supports a maximum of 2MHz, and the theoretical limit of 1ms can transmit 250 bytes. Taking ranging as an example, in radar ranging, it is assumed that 6 radars are read at a time, and a total of 72 bytes are read at a time. A measurement is about 30 readings, a total of 2160 bytes. In summary, a measurement takes 8.64ms. This measurement time is the limit time, and the actual test time should be about 10ms.
[0004] At the same time, from the time the vehicle domain controller issues a measurement command to the time the result is read back, other SPI commands are executed and read back, so a measurement reading time of radar ranging is often greater than 10ms. However, for the domain controller, a reading time exceeding 10ms is a relatively long execution time. Therefore, how to efficiently drive the ultrasonic radar and occupy less CPU is very important for the domain controller as a whole. Summary of the invention
[0005] In order to solve the technical problems that the driving efficiency of the above-mentioned ultrasonic radar is low and the driving of the ultrasonic radar occupies a large amount of domain controller memory, the embodiments of the present application provide a technical solution of a radar driving method, an apparatus, a computer device and a storage medium, that is, after sending the first serial interface communication data to the radar controller, the present application does not need to wait for receiving the feedback data corresponding to the first serial interface communication data. It only needs to send the second serial interface communication data after the first serial interface communication data to the radar controller when receiving the interrupt callback function indicating that the communication data is successfully sent, until all the multiple serial interface communication data corresponding to the driving execution sequence are executed, thereby ensuring that the domain controller will not waste the radar driving time waiting for feedback data, thereby improving the efficiency of the radar driving.
[0006] On the one hand, an embodiment of the present application provides a radar driving method, which is applied to a domain controller. The method includes:
[0007] Calling multiple radar driver interfaces, each radar driver interface is used to execute a serial interface communication data;
[0008] Determine the driving execution order corresponding to the multiple radar driving interfaces;
[0009] Based on the driving execution sequence, sending first serial interface communication data to the radar controller, the first serial interface communication data being first serial interface communication data among a plurality of serial interface communication data corresponding to the driving execution sequence;
[0010] When an interrupt callback function indicating successful transmission of communication data is received, second serial interface communication data is sent to the radar controller until all multiple serial interface communication data corresponding to the drive execution sequence are executed, and the second serial interface communication data is the next serial interface communication data of the first serial interface communication data.
[0011] Further, the interrupt callback function includes a serial interface interrupt callback function and an input / output interrupt callback function;
[0012] Correspondingly, in the case of receiving the interrupt callback function, sending the second serial interface communication data to the radar controller includes:
[0013] When the serial interface interrupt callback function is received, sending the second serial interface communication data to the radar controller in an asynchronous communication manner; or;
[0014] When the input / output interrupt callback function is received, the second serial interface communication data is sent to the radar controller in an asynchronous communication manner.
[0015] Furthermore, the method further comprises:
[0016] Acquire communication requirement data of a radar driving interface corresponding to target serial interface communication data, wherein the target serial interface communication data is any one of a plurality of serial interface communication data corresponding to the plurality of radar driving interfaces;
[0017] When the communication demand data indicates that radar data is ready to be received, determining whether an input / output interrupt callback function is received;
[0018] When the input / output interrupt callback function is received, third serial interface communication data is sent to the radar controller, where the third serial interface communication data is the next serial interface communication data of the target serial interface communication data.
[0019] Furthermore, the method further comprises:
[0020] Acquire communication requirement data of a radar driving interface corresponding to target serial interface communication data, wherein the target serial interface communication data is any one of a plurality of serial interface communication data corresponding to the plurality of radar driving interfaces;
[0021] When the communication demand data indicates that radar data needs to be received and is ready, obtaining level data corresponding to a data ready pin in the radar controller;
[0022] When the level data is low level data indicating that radar data is ready, fourth serial interface communication data is sent to the radar controller, where the fourth serial interface communication data is the next serial interface communication data of the target serial interface communication data.
[0023] Further, after sending the first serial interface communication data to the radar controller based on the driving execution sequence, the method further includes:
[0024] Determine interface status data of the radar driver interface corresponding to the first serial interface communication data;
[0025] In the case where the interface status data indicates an idle state, determining whether the serial interface interrupt callback function or the input / output interrupt callback function is received;
[0026] When receiving the serial interface interrupt callback function or the input / output interrupt callback function, sending the second serial interface communication data to the radar controller;
[0027] If the second serial interface communication data is the last serial interface communication data, radar driving is terminated.
[0028] Further, in the case of receiving the interrupt callback function indicating that the communication data is successfully sent, sending the second serial interface communication data to the radar controller until all the multiple serial interface communication data corresponding to the driving execution sequence are executed, including:
[0029] If the serial interface interrupt callback function or the input / output interrupt callback function is not received within a preset time threshold from sending the second serial interface communication data, communication interrupt information is generated, and the preset time threshold is the maximum communication duration corresponding to the second serial interface communication data.
[0030] Furthermore, the method further comprises:
[0031] Acquire the transmission byte length corresponding to the target serial interface communication data sent to the radar controller;
[0032] When the transmission byte length is less than the expected byte length information and the continuous sending time length corresponding to the target serial interface communication data is greater than the preset continuous time length threshold, communication interruption information is generated, and the expected byte length information is the actual byte length corresponding to the target serial interface communication data.
[0033] On the other hand, an embodiment of the present application provides a radar driving device, the device comprising:
[0034] A calling module, used for calling a plurality of radar driver interfaces, each radar driver interface is used for executing a serial interface communication data;
[0035] A drive execution sequence determination module, used to determine the drive execution sequence corresponding to the multiple radar drive interfaces;
[0036] A first sending module, configured to send first serial interface communication data to the radar controller based on the driving execution sequence, wherein the first serial interface communication data is the first serial interface communication data among a plurality of serial interface communication data corresponding to the driving execution sequence;
[0037] The second sending module is used to send second serial interface communication data to the radar controller when receiving an interrupt callback function indicating that the communication data is successfully sent, until all multiple serial interface communication data corresponding to the drive execution sequence are executed, and the second serial interface communication data is the next serial interface communication data of the first serial interface communication data.
[0038] On the other hand, a radar driving device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the radar driving method as described above.
[0039] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the radar driving method as described above.
[0040] Implementing this application has the following beneficial effects:
[0041] After sending the first serial interface communication data to the radar controller, the present application does not need to wait for receiving the feedback data corresponding to the first serial interface communication data. It only needs to send the second serial interface communication data after the first serial interface communication data to the radar controller when receiving the interrupt callback function indicating that the communication data is successfully sent, until all the multiple serial interface communication data corresponding to the driving execution sequence are executed, thereby ensuring that the domain controller will not waste the radar driving time waiting for feedback data, thereby improving the efficiency of the radar driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments 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 drawings can be obtained based on these drawings without creative work.
[0043] Figure 1 A schematic diagram of a radar driving method provided in an embodiment of the present application;
[0044] Figure 2 A flowchart of a method for triggering second serial interface communication data transmission provided in an embodiment of the present application;
[0045] Figure 3 A flowchart of a method for triggering third serial interface communication data transmission provided in an embodiment of the present application;
[0046] Figure 4 A flowchart of a method for triggering fourth serial interface communication data transmission provided in an embodiment of the present application;
[0047] Figure 5 A schematic diagram of the structure of a radar driving device provided in an embodiment of the present application;
[0048] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0051] See also Figure 1 , which is a schematic diagram of a radar driving method provided in an embodiment of the present application, and the following is combined with Figure 1 The technical solution of the present application is described in detail. It should be noted that this specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the steps among many, and does not represent the only execution order. The method is applied to a domain controller and specifically includes the following steps:
[0052] S101: Call multiple radar driver interfaces, each radar driver interface is used to execute a serial interface communication data.
[0053] In an embodiment of the present application, a radar driver interface is an interface provided by a radar driver to a radar application, wherein each of a plurality of radar driver interfaces is used to execute a serial interface communication data, and each of a plurality of radar driver interfaces is used to execute different serial interface communication data, that is, different radar driver interfaces send different serial interface communication data, and then, by calling a plurality of radar driver interfaces, the radar driver corresponding to the radar application is implemented.
[0054] It should be noted that multiple radar driver interfaces can be used as a set of driver interfaces corresponding to a radar application. It can be understood that when the serial interface communication data used to execute by each of the multiple radar driver interfaces are all executed, a certain radar application can be realized. Among them, different radar applications correspond to different multiple radar driver interfaces. Therefore, when a certain radar application needs to be executed, you can choose to call multiple radar driver interfaces corresponding to the radar application to realize the radar drive of any radar application. Specifically, radar applications include but are not limited to ranging, configuration and system initialization.
[0055] S102: Determine a driver execution order corresponding to a plurality of radar driver interfaces.
[0056] In a specific embodiment, the driving execution order corresponding to the multiple radar driving interfaces is the driving order for implementing the multiple radar driving interfaces corresponding to a certain radar application. It can be understood that, if the radar application needs to be implemented, the radar driving interface needs to be called according to the corresponding driving execution order. Furthermore, after determining the driving execution order corresponding to the multiple radar driving interfaces, serial interface communication data corresponding to the multiple radar driving interfaces can be sent to the radar controller based on the driving execution order, so as to achieve efficient radar driving.
[0057] S103: Based on the driving execution sequence, sending first serial interface communication data to the radar controller, where the first serial interface communication data is the first serial interface communication data among a plurality of serial interface communication data corresponding to the driving execution sequence.
[0058] In an embodiment of the present application, a radar controller is communicatively connected with a domain controller, wherein the radar controller acts as a slave device and the domain controller acts as a master device. Furthermore, the domain controller can control the initiation of communication and the transmission of data, and the radar controller communicates to the radar in response to the request of the domain controller, or feeds back the data collected by the radar to the domain controller, so as to realize the transmission of radar data.
[0059] In a specific embodiment, the serial interface communication data corresponding to each of the multiple radar driving interfaces are sorted according to the driving execution order, and then based on the driving execution order, the first serial interface communication data can be sent to the radar controller to trigger the communication process of subsequent serial interface communication data.
[0060] S104: When receiving an interrupt callback function indicating successful transmission of communication data, second serial interface communication data is transmitted to the radar controller until all the multiple serial interface communication data corresponding to the driving execution sequence are executed, and the second serial interface communication data is the next serial interface communication data of the first serial interface communication data.
[0061] In an embodiment of the present application, when the serial interface communication data is successfully transmitted, an interrupt callback function will be sent to the domain controller to inform the domain controller that the serial interface communication data is successfully transmitted, and then the transmission of the next serial interface communication data can be triggered by the interrupt callback function until multiple serial interface communication data are all executed. Therefore, during the entire radar driving process, the domain controller does not need to wait for the arrival of feedback data corresponding to the serial interface communication data, and can execute the transmission of the serial interface communication data corresponding to the next radar driving interface, thereby reducing the time from the successful transmission of the serial interface communication data to the receipt of feedback data corresponding to the serial interface communication number, thereby significantly improving the radar driving efficiency.
[0062] Specifically, after sending the first serial interface communication data to the radar controller, there is no need to wait for receiving the feedback data corresponding to the first serial interface communication data. Therefore, only when an interrupt callback function representing the successful sending of the communication data is received, the second serial interface communication data after the first serial interface communication data can be sent to the radar controller, and so on, until all the multiple serial interface communication data corresponding to the drive execution sequence are executed. Furthermore, the above-mentioned radar driving method can ensure that the domain controller will not waste the radar driving time waiting for feedback data, and after the previous serial interface communication data is successfully transmitted, the feedback data for the serial interface communication data will not affect the execution of other radar driving interfaces, thereby improving the efficiency of the radar driving while occupying the least domain controller memory.
[0063] It should be noted that multiple radar driver interfaces corresponding to the same radar application belong to the same communication channel, and thus, among the multiple radar driver interfaces corresponding to the same radar application, only one radar driver interface can be executed at a time. In other words, multiple radar driver interfaces cannot be executed at the same time. If the previous radar driver interface is in a data transmission state, it cannot trigger the next radar driver interface to send the corresponding serial interface communication data.
[0064] In an optional embodiment, if Figure 2 As shown, it is a flow chart of a method for triggering second serial interface communication data transmission provided by an embodiment of the present application. Specifically, after step S103, the method further includes:
[0065] S1031: Determine interface status data of the radar driving interface corresponding to the first serial interface communication data;
[0066] S1032: When the interface status data indicates that the interface is in an idle state, determining whether a serial interface interrupt callback function or an input / output interrupt callback function is received;
[0067] S1033: When receiving the serial interface interrupt callback function or the input / output interrupt callback function, sending the second serial interface communication data to the radar controller;
[0068] S1034: If the second serial interface communication data is the last serial interface communication data, terminate radar driving.
[0069] In an embodiment of the present application, the interrupt callback function includes a serial interface interrupt callback function and an input / output interrupt callback function, wherein the serial interface interrupt callback function is an interrupt callback function for an interrupt that does not require radar participation, and the input / output interrupt callback function is an interrupt callback function for an interrupt that requires radar participation, and the interface status data includes being in a sending state and being in an idle state, and then the interface status data of the radar driver interface corresponding to the first serial interface communication data can be monitored, so that when the interface status data of the radar driver interface corresponding to the first serial interface communication data indicates that it is in an idle state and the serial interface interrupt callback function or the input / output interrupt callback function is received, the transmission of the second serial interface communication data can be triggered, and so on, until all serial interface communication data are executed.
[0070] In an optional implementation, the interrupt callback function includes a serial interface interrupt callback function and an input / output interrupt callback function; accordingly, step S104 may include:
[0071] S1041: when receiving the serial interface interrupt callback function, sending second serial interface communication data to the radar controller in an asynchronous communication manner; or;
[0072] S1042: When the input / output interrupt callback function is received, the second serial interface communication data is sent to the radar controller in an asynchronous communication manner.
[0073] In an embodiment of the present application, the serial interface interrupt callback function is an interrupt callback function for an interrupt that does not require radar participation, and the input / output interrupt callback function is an interrupt callback function for an interrupt that requires radar participation. Therefore, regardless of whether the serial interface interrupt callback function or the input / output interrupt callback function is received, the second serial interface communication data can be sent to the radar controller in an asynchronous communication manner to improve the radar driving efficiency.
[0074] In a specific embodiment, the domain controller and the radar controller use asynchronous communication to transmit data, so that there is no need for strict synchronization between the domain controller and the radar controller. That is to say, the domain controller and the radar controller can independently execute their corresponding execution operations, and in the process of the domain controller executing radar data transmission, it will not hinder the domain controller from executing other tasks, thereby reducing the occupancy of the domain controller domain memory, thereby improving the processing efficiency of the domain controller.
[0075] In an optional embodiment, if Figure 3 As shown, it is a flow chart of a method for triggering third serial interface communication data transmission provided by an embodiment of the present application. Specifically, the method further includes:
[0076] S1051: Acquire communication requirement data of a radar driving interface corresponding to target serial interface communication data, where the target serial interface communication data is any one of a plurality of serial interface communication data corresponding to a plurality of radar driving interfaces;
[0077] S1052: When the communication demand data indicates that the radar data needs to be received and is ready, determine whether an input / output interrupt callback function is received;
[0078] S1053: When the input / output interrupt callback function is received, third serial interface communication data is sent to the radar controller, where the third serial interface communication data is the next serial interface communication data of the target serial interface communication data.
[0079] In an embodiment of the present application, communication demand data includes the need to receive radar data ready and the need not to receive radar data ready. Furthermore, if the radar driving interface corresponding to the target serial interface communication data has the need to receive radar data ready, it is necessary to receive the input and output interrupt callback function before the transmission of the next serial interface communication data of the target serial interface communication data can be triggered. Otherwise, the transmission of the next serial interface communication data cannot be triggered. Furthermore, if the radar driving interface corresponding to the target serial interface communication data does not have the need to receive radar data ready, receiving the serial interface interrupt callback function can trigger the transmission of the next serial interface communication data of the target serial interface communication data. Therefore, the radar driving method covers the needs of all driving interfaces, thereby improving the radar driving efficiency while also improving the compatibility and stability of the radar driving.
[0080] In another optional embodiment, Figure 4 As shown, it is a flow chart of a method for triggering fourth serial interface communication data transmission provided by an embodiment of the present application. Specifically, the method further includes:
[0081] S1054: Acquire communication requirement data of the radar driving interface corresponding to the target serial interface communication data, where the target serial interface communication data is any one of a plurality of serial interface communication data corresponding to a plurality of radar driving interfaces;
[0082] S1055: When the communication requirement data indicates that the radar data needs to be received and is ready, obtain level data corresponding to a data ready pin in the radar controller;
[0083] S1056: When the level data is low level data indicating that the radar data is ready, fourth serial interface communication data is sent to the radar controller, where the fourth serial interface communication data is the next serial interface communication data of the target serial interface communication data.
[0084] Specifically, a data ready pin is provided on the radar controller, and when the radar data is ready, the level of the data ready pin will be pulled low, and then the level data corresponding to the data ready pin in the radar controller can be monitored by the domain controller, so that when the level data is low level data, the transmission of the next serial interface communication data of the target serial interface communication data can be triggered, and then the transmission of the next serial interface communication data can be triggered by active monitoring, which helps to improve the accuracy and reliability of radar driving.
[0085] In an optional implementation, step S104 may further include:
[0086] S1043: Generate communication interruption information if no serial interface interruption callback function or input / output interruption callback function is received within a preset time threshold from sending the second serial interface communication data, wherein the preset time threshold is a maximum communication duration corresponding to the second serial interface communication data.
[0087] In an embodiment of the present application, if the serial interface interrupt callback function or the input / output interrupt callback function has not been received within the maximum communication time for sending the second serial interface communication data, it indicates that the serial interface interrupt callback function has not been triggered, or the input / output interrupt callback function has not been triggered. It can be understood that the radar controller has not received the second serial interface communication data, and then generates communication interruption information, wherein the communication interruption information includes the radar driver interface data corresponding to the serial interface communication data that has not yet communicated successfully, thereby accurately locating the radar driver interface with the communication problem, and realizing the diagnosis of radar driver abnormality, so as to facilitate subsequent maintenance.
[0088] In another optional embodiment, the method further comprises:
[0089] S1044: Acquire the transmission byte length corresponding to the target serial interface communication data sent to the radar controller;
[0090] S1045: When the transmission byte length is less than the expected byte length information and the continuous sending time length corresponding to the target serial interface communication data is greater than the preset continuous time length threshold, communication interruption information is generated, and the expected byte length information is the actual byte length corresponding to the target serial interface communication data.
[0091] In an embodiment of the present application, when the actual byte length corresponding to the target serial interface communication data is known, the transmission byte length corresponding to the target serial interface communication data can be actively monitored to see whether it is equal to the actual byte length. If it is less than the actual byte length, and the continuous sending duration corresponding to the target serial interface communication data is greater than the preset duration threshold, it indicates that the radar controller has not received the target serial interface communication data, and then generates communication interruption information, wherein the communication interruption information includes the radar drive interface data corresponding to the target serial interface communication data that has not yet communicated successfully, thereby accurately locating the radar drive interface with the communication problem, and realizing the diagnosis of radar drive abnormality, so as to facilitate subsequent maintenance.
[0092] In another optional embodiment, the method further comprises:
[0093] S1046: monitoring the data transmission status corresponding to the target serial interface communication data sent to the radar controller;
[0094] S1047: When the data transmission state corresponding to the target serial interface communication data is a sending state and the duration of the sending state is greater than a preset duration threshold, generate communication interruption information.
[0095] Specifically, if the duration of the sending state corresponding to the target serial interface communication data is greater than the preset duration threshold, it indicates that the target serial interface communication data transmission has failed, and then communication interruption information is generated, so that the radar drive interface with communication problems can be accurately located based on the communication interruption information, thereby realizing the diagnosis of radar drive abnormality.
[0096] It can be seen from the above technical solutions of the embodiments of the present application that the following technical effects are achieved:
[0097] After sending the first serial interface communication data to the radar controller, the present application does not need to wait for receiving the feedback data corresponding to the first serial interface communication data. It only needs to send the second serial interface communication data after the first serial interface communication data to the radar controller when receiving the interrupt callback function indicating that the communication data is successfully sent, until all the multiple serial interface communication data corresponding to the driving execution sequence are executed, thereby ensuring that the domain controller will not waste the radar driving time waiting for feedback data, thereby improving the efficiency of the radar driving.
[0098] The present application also provides a radar driving device in an embodiment, such as Figure 5 As shown, it is a schematic diagram of the structure of a radar driving device provided in an embodiment of the present application, and the radar driving device includes:
[0099] The calling module 10 is used to call multiple radar driving interfaces, each radar driving interface is used to execute a serial interface communication data.
[0100] The drive execution sequence determination module 20 is used to determine the drive execution sequence corresponding to multiple radar drive interfaces.
[0101] The first sending module 30 is used to send first serial interface communication data to the radar controller based on the driving execution sequence, where the first serial interface communication data is the first serial interface communication data among multiple serial interface communication data corresponding to the driving execution sequence.
[0102] The second sending module 40 is used to send second serial interface communication data to the radar controller when receiving an interrupt callback function indicating that the communication data is successfully sent, until all multiple serial interface communication data corresponding to the driving execution sequence are executed, and the second serial interface communication data is the next serial interface communication data of the first serial interface communication data.
[0103] Further, the interrupt callback function includes a serial interface interrupt callback function and an input / output interrupt callback function; accordingly, the second sending module 40 includes:
[0104] The first sending unit 401 is used to send the second serial interface communication data to the radar controller in an asynchronous communication manner when receiving the serial interface interrupt callback function.
[0105] The second sending unit 402 is used to send the second serial interface communication data to the radar controller in an asynchronous communication manner when receiving the input / output interrupt callback function.
[0106] Furthermore, the device also includes:
[0107] The first demand data acquisition module 501 is used to acquire the communication demand data of the radar driving interface corresponding to the target serial interface communication data, and the target serial interface communication data is any one of the multiple serial interface communication data corresponding to the multiple radar driving interfaces.
[0108] The judgment module 502 is used to judge whether an input / output interrupt callback function is received when the communication demand data indicates that the radar data needs to be received and is ready.
[0109] The third sending module 503 is used to send third serial interface communication data to the radar controller when receiving the input / output interrupt callback function, where the third serial interface communication data is the next serial interface communication data of the target serial interface communication data.
[0110] Furthermore, the device also includes:
[0111] The second demand data acquisition module 504 is used to obtain the communication demand data of the radar driving interface corresponding to the target serial interface communication data, and the target serial interface communication data is any one of the multiple serial interface communication data corresponding to the multiple radar driving interfaces.
[0112] The level data acquisition module 505 is used to acquire the level data corresponding to the data ready pin in the radar controller when the communication demand data indicates that the radar data needs to be received.
[0113] The fourth sending module 506 is used to send fourth serial interface communication data to the radar controller when the level data is low level data indicating that the radar data is ready, and the fourth serial interface communication data is the next serial interface communication data of the target serial interface communication data.
[0114] Furthermore, the device also includes:
[0115] The interface status data determination module 507 is used to determine the interface status data of the radar driving interface corresponding to the first serial interface communication data.
[0116] The receiving judgment module 508 is used to judge whether a serial interface interrupt callback function or an input / output interrupt callback function is received when the interface status data indicates that the interface is in an idle state.
[0117] The fifth sending module 509 is used to send the second serial interface communication data to the radar controller when receiving the serial interface interrupt callback function or the input / output interrupt callback function; if the second serial interface communication data is the last serial interface communication data, terminate the radar drive.
[0118] Further, the second sending module 40 includes:
[0119] The first communication interruption information generating unit 403 is used to generate communication interruption information when no serial interface interruption callback function or input / output interruption callback function is received within a preset time threshold from sending the second serial interface communication data. The preset time threshold is the maximum communication duration corresponding to the second serial interface communication data.
[0120] Furthermore, the device also includes:
[0121] The monitoring unit 404 is used to obtain the transmission byte length corresponding to the target serial interface communication data sent to the radar controller.
[0122] The second communication interruption information generating unit 405 is used to generate communication interruption information when the transmission byte length is less than the expected byte length information and the continuous sending time length corresponding to the target serial interface communication data is greater than the preset continuous time length threshold, and the expected byte length information is the actual byte length corresponding to the target serial interface communication data.
[0123] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0124] An embodiment of the present application provides a radar driving device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the radar driving method provided in the above method embodiment.
[0125] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0126] The radar driving device may be a server. The present application embodiment also provides a schematic diagram of the structure of a server. Figure 6, the server 600 is used to implement the data processing method provided in the above embodiment. The server 600 may have relatively large differences due to different configurations or performances, and may include one or more processors 610 (for example, one or more processors) and storage 630, one or more storage media 620 (for example, one or more mass storage devices) storing application programs 623 or data 622. Among them, the memory 630 and the storage medium 620 can be short-term storage or permanent storage. The program stored in the storage medium 620 may include one or more modules, each of which may include a series of instruction operations in the server. Further, the processor 610 may be configured to communicate with the storage medium 620 and execute a series of instruction operations in the storage medium 620 on the server 600. The server 600 may also include one or more power supplies 660, one or more wired or wireless network interfaces 650, one or more input and output interfaces 640, and / or, one or more operating systems 621, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0127] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction, at least one program, code set or instruction set related to a radar driving method in a method embodiment. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the radar driving method provided by the above method embodiment.
[0128] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0129] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0130] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A radar driving method, characterized in that: Applied to a domain controller, the method comprises: Calling multiple radar driver interfaces, each radar driver interface is used to execute a serial interface communication data; Determine a driver execution order corresponding to the multiple radar driver interfaces; Based on the driving execution sequence, sending first serial interface communication data to the radar controller, the first serial interface communication data being first serial interface communication data among a plurality of serial interface communication data corresponding to the driving execution sequence; When an interrupt callback function indicating successful transmission of communication data is received, second serial interface communication data is sent to the radar controller until all multiple serial interface communication data corresponding to the drive execution sequence are executed, and the second serial interface communication data is the next serial interface communication data of the first serial interface communication data.
2. The method according to claim 1, characterized in that The interrupt callback function includes a serial interface interrupt callback function and an input / output interrupt callback function; Accordingly, in the case of receiving the interrupt callback function, sending the second serial interface communication data to the radar controller includes: When the serial interface interrupt callback function is received, sending the second serial interface communication data to the radar controller in an asynchronous communication manner; or; When the input / output interrupt callback function is received, the second serial interface communication data is sent to the radar controller in an asynchronous communication manner.
3. The method according to claim 1, characterized in that The method further comprises: Acquire communication requirement data of a radar driving interface corresponding to target serial interface communication data, wherein the target serial interface communication data is any one of a plurality of serial interface communication data corresponding to the plurality of radar driving interfaces; When the communication demand data indicates that radar data is ready to be received, determining whether an input / output interrupt callback function is received; When the input / output interrupt callback function is received, third serial interface communication data is sent to the radar controller, where the third serial interface communication data is the next serial interface communication data of the target serial interface communication data.
4. The method according to claim 1, characterized in that: The method further comprises: Acquire communication requirement data of a radar driving interface corresponding to target serial interface communication data, wherein the target serial interface communication data is any one of a plurality of serial interface communication data corresponding to the plurality of radar driving interfaces; When the communication demand data indicates that radar data needs to be received and is ready, obtaining level data corresponding to a data ready pin in the radar controller; When the level data is low level data indicating that radar data is ready, fourth serial interface communication data is sent to the radar controller, where the fourth serial interface communication data is the next serial interface communication data of the target serial interface communication data.
5. The method according to claim 2, characterized in that: After sending the first serial interface communication data to the radar controller based on the driving execution sequence, the method further includes: Determine interface status data of the radar driver interface corresponding to the first serial interface communication data; In the case where the interface status data indicates an idle state, determining whether the serial interface interrupt callback function or the input / output interrupt callback function is received; When receiving the serial interface interrupt callback function or the input / output interrupt callback function, sending the second serial interface communication data to the radar controller; If the second serial interface communication data is the last serial interface communication data, radar driving is terminated.
6. The method according to claim 1, characterized in that In the case of receiving the interrupt callback function indicating that the communication data is successfully sent, sending the second serial interface communication data to the radar controller until all the serial interface communication data corresponding to the driving execution sequence are executed, including: If the serial interface interrupt callback function or the input / output interrupt callback function is not received within a preset time threshold from sending the second serial interface communication data, communication interrupt information is generated, and the preset time threshold is the maximum communication duration corresponding to the second serial interface communication data.
7. The method according to claim 1, characterized in that The method further comprises: Acquire the transmission byte length corresponding to the target serial interface communication data sent to the radar controller; When the transmission byte length is less than the expected byte length information and the continuous sending time length corresponding to the target serial interface communication data is greater than the preset continuous time length threshold, communication interruption information is generated, and the expected byte length information is the actual byte length corresponding to the target serial interface communication data.
8. A radar driving device, characterized in that: The device comprises: A calling module, used for calling a plurality of radar driver interfaces, each radar driver interface is used for executing a serial interface communication data; A drive execution sequence determination module, used to determine the drive execution sequence corresponding to the multiple radar drive interfaces; A first sending module, configured to send first serial interface communication data to the radar controller based on the driving execution sequence, wherein the first serial interface communication data is the first serial interface communication data among a plurality of serial interface communication data corresponding to the driving execution sequence; The second sending module is used to send second serial interface communication data to the radar controller when receiving an interrupt callback function indicating that the communication data is successfully sent, until all multiple serial interface communication data corresponding to the drive execution sequence are executed, and the second serial interface communication data is the next serial interface communication data of the first serial interface communication data.
9. A radar driving device, characterized in that: The radar driving device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the radar driving method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the radar driving method according to any one of claims 1 to 7.