A method and device for initializing peripheral chips with complex drivers under AUTOSAR architecture
By performing parameter configuration and data verification of peripheral chips and peripheral devices under the AUTOSAR architecture, the problem of low standardization of complex driver modules is solved, the initialization and error handling of peripheral chips are realized, and the reusability of code is improved. Maintenance.
Patent Information
- Application Number
- CN202210469956.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-04-28
AI Technical Summary
Under the AUTOSAR architecture, the degree of standardization of complex driver modules is low, resulting in complex initialization configurations of peripheral chips and difficult to reuse, increasing development and maintenance costs, and lacking a unified initialization method.
Provide a method of initializing peripheral chips with complex drivers under AUTOSAR architecture, including parameter configuration of peripheral chips and peripheral devices, obtaining and verifying data, determining whether there is a fault, and completing initialization in the main control chip, providing error codes and Error status interface.
It improves the standardization of complex driver codes, facilitates maintenance and error handling, simplifies the code reuse of new peripheral chips under the same master chip, and monitors the status of peripheral chips and peripherals.
Smart Images

Figure CN114816547B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automotive AUTOSAR technology, and specifically to a method for initializing a peripheral chip for a complex driver under an AUTOSAR architecture, a device for initializing a peripheral chip for a complex driver under an AUTOSAR architecture, a method for standardizing initialization of a complex driver, and a device for standardizing initialization of a complex driver. Background Art
[0002] In the automotive electronic controllers currently used, in addition to the MCU main control chip, there are also multiple peripheral chips, such as dedicated watchdog chips, PSI5 transceiver chips, inertial navigation sensor chips, etc. Compared with the main control chip, the functions of peripheral chips are mostly determined by the manufacturer, and developers need to configure the peripheral chips specifically according to the information provided by the manufacturer. In order to meet the demand for perfect functions of the electronic control system, the number of peripheral chips is large, covering a wide range of manufacturers, and there are large differences in the configuration items of different chips. There may be special timing requirements, completely different requirements for the main control chip interface, and other problems, which cannot be configured through MCAL. Therefore, in the actual configuration, in order to meet the AUTOSAR architecture, the driver implementation of the peripheral chip is included in the part of the complex driver.
[0003] Complex drivers are special modules that span the entire BSW layer. They are used to process complex sensors, actuators, etc. They directly access the microcontroller through specific interrupts or peripherals to achieve processing and monitoring of the microcontroller. Their code mainly includes two parts: chip initialization and chip function. Due to the large differences in peripheral chips and their peripherals in the same system, their configuration implementation is often independent of each other and lacks unified standards. There are problems such as large differences in register configuration, interfaces and buses used by different peripheral chips, which makes it difficult to reuse the code of complex driver modules, bringing obstacles to both basic software developers and application software developers. This requires a certain degree of standardization of complex drivers, which not only facilitates the processing and control of peripheral chips by the main control chip, but also improves the reusability and maintainability of the code.
[0004] Under the AUTOSAR architecture, although each module has been standardized, the complex driver module has always been the least standardized part of the entire AUTOSAR architecture because it is responsible for processing special actuators and controllers. As the electronic control system becomes increasingly complex, there may be several peripheral chips under the main control chip of a system. These peripheral chips have different functions, configuration items, and special requirements. Each chip requires a separate driver to process. In the current situation where the functions of a single ECU are becoming more and more powerful, it is even necessary to maintain dozens of peripheral chips and their peripherals at the same time. This part of the configuration implementation is included in the scope of complex drivers, which further reduces the code reusability of complex driver modules, increases development and maintenance costs, and increases the difficulty of error monitoring. The code structure of complex drivers mainly includes two parts: peripheral chip initialization and chip function. Therefore, the initialization method of peripheral chips can be standardized to improve code reusability.
[0005] In the prior art, there is no method for initializing peripheral chips.
[0006] Therefore, it is hoped that a technical solution can be provided to solve or at least alleviate the above-mentioned deficiencies of the prior art. Summary of the invention
[0007] The object of the present invention is to provide a method for initializing a peripheral chip for a complex driver under an AUTOSAR architecture to solve at least one of the above technical problems.
[0008] One aspect of the present invention provides a method for initializing a peripheral chip by a complex driver under an AUTOSAR architecture, wherein the method for initializing a peripheral chip by a complex driver under an AUTOSAR architecture comprises:
[0009] respectively configuring parameters of the peripheral chip and the peripheral devices connected to the peripheral chip;
[0010] Obtain peripheral chip data transmitted by the peripheral chip after parameter configuration;
[0011] Acquire the peripheral device data transmitted by the peripheral device transmitted by the peripheral chip after parameter configuration;
[0012] The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip and the peripheral device have faults. If not, the initialization is completed.
[0013] Optionally, before the main control chip judges the peripheral chip parameters and the peripheral device parameters respectively, the method for initializing the peripheral chip by complex driving under the AUTOSAR architecture further includes:
[0014] Perform data verification on the peripheral chip data and the peripheral device data respectively. If the verification is successful,
[0015] The peripheral chip data and the peripheral device data are judged separately.
[0016] Optionally, the main control chip judges the peripheral chip data and the peripheral device data respectively, including:
[0017] The peripheral chip is judged, and if it is judged that there is no fault, then
[0018] The peripheral device is judged, and if it is judged that there is no fault, the initialization is completed.
[0019] Optionally, the judging of the peripheral chip includes:
[0020] Extracting peripheral chip related information from the peripheral chip data that has passed data verification;
[0021] Determine the peripheral chip related information;
[0022] The judging of the peripheral device comprises:
[0023] Extracting peripheral device related information from the peripheral device data that has passed data verification;
[0024] The peripheral device related information is judged.
[0025] Optionally, the method for initializing a peripheral chip for a complex driver under the AUTOSAR architecture further comprises:
[0026] The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip data and the peripheral device data have faults. If so,
[0027] Get the error code and pass it to the error handling unit.
[0028] Optionally, the peripheral chip data includes register address data, register configuration data, check bit data, and peripheral chip related information;
[0029] The peripheral device data includes peripheral configuration data and peripheral related information.
[0030] Optionally, the peripheral chip related information may include chip version number, chip serial number, chip status, chip communication data, and chip error code;
[0031] The peripheral related information may include a peripheral version number, a peripheral serial number, a peripheral status, a peripheral communication data, and a peripheral error code.
[0032] The present application also provides a device for initializing a peripheral chip with a complex driver under an AUTOSAR architecture, and the device for initializing a peripheral chip with a complex driver under an AUTOSAR architecture includes:
[0033] A parameter configuration module, the parameter configuration module is used to perform parameter configuration on the peripheral chip and the peripheral device connected to the peripheral chip respectively;
[0034] A peripheral chip data acquisition module, the peripheral chip data acquisition module is used to acquire the peripheral chip data transmitted by the peripheral chip after parameter configuration;
[0035] A peripheral device data acquisition module, the peripheral device data acquisition module is used to acquire the peripheral device data transmitted by the peripheral chip after the peripheral device is configured with parameters;
[0036] The judgment module is used to judge the peripheral chip data and the peripheral device data respectively to judge whether the peripheral chip and the peripheral device have faults. If not, the initialization is completed.
[0037] The present application also provides a complex drive standardization initialization method, the complex drive standardization initialization method comprising:
[0038] Acquire a peripheral chip configuration table, wherein the peripheral chip configuration table includes at least one peripheral chip and peripheral device connection information of each peripheral chip;
[0039] Each peripheral chip in the peripheral chip configuration table is initialized according to the peripheral chip configuration table, wherein when the peripheral chip to be initialized is connected to a peripheral device, the method for initializing the peripheral chip by complex driving under the AUTOSAR architecture as described above is used to initialize the peripheral chip to be initialized.
[0040] The present application also provides a complex drive standardization initial device, the complex drive standardization initial device comprising:
[0041] A peripheral chip configuration table acquisition module, the peripheral chip configuration table acquisition module is used to acquire a peripheral chip configuration table, the peripheral chip configuration table includes at least one peripheral chip and peripheral device connection information of each peripheral chip;
[0042] An initialization module, wherein the initialization module is used to initialize each peripheral chip in the peripheral chip configuration table according to the peripheral chip configuration table, wherein when the peripheral chip to be initialized is connected to a peripheral device, the method for initializing the peripheral chip by complex drive under the AUTOSAR architecture as described above is used to initialize the peripheral chip to be initialized.
[0043] Beneficial Effects
[0044] The present application provides an initialization method for a peripheral chip, which can simultaneously inspect the peripheral chip and the peripheral device connected to the chip, thereby monitoring the status of the peripheral chip and its peripherals, providing an error code and an error status interface to facilitate subsequent error handling. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flowchart of a method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture according to an embodiment of the present application.
[0046] Figure 2 It is used to realize Figure 1 The system equipment diagram of the method for complex driver initialization of peripheral chips under the AUTOSAR architecture is shown.
[0047] Figure 3 It is a structural diagram of a method for initializing peripheral chips with a complex driver under the AUTOSAR architecture according to an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the embodiment of this application will be described in more detail below in conjunction with the drawings in the embodiment of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of this application, not all of them. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain this application, and should not be construed as limitations on this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The embodiments of this application are described in detail below in conjunction with the drawings.
[0049] Figure 1 It is a flowchart of a method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture according to an embodiment of the present application.
[0050] like Figure 1 The method of initializing peripheral chips with complex drivers under the AUTOSAR architecture shown includes:
[0051] Step 1: respectively configure parameters of the peripheral chip and the peripheral device connected to the peripheral chip;
[0052] Step 2: Obtain the peripheral chip data transmitted by the peripheral chip after parameter configuration;
[0053] Step 3: Acquire the peripheral device data transmitted by the peripheral device after parameter configuration by the peripheral chip;
[0054] Step 4: respectively judge the peripheral chip data and the peripheral device data to determine whether the peripheral chip and the peripheral device have any faults. If not, complete the initialization.
[0055] The present application provides an initialization method for a peripheral chip, which can simultaneously inspect the peripheral chip and the peripheral device connected to the chip, thereby monitoring the status of the peripheral chip and its peripherals, providing an error code and an error status interface to facilitate subsequent error handling.
[0056] In this embodiment, before the main control chip judges the peripheral chip data and the peripheral device data respectively, the method for initializing the peripheral chip by complex driving under the AUTOSAR architecture further includes:
[0057] The peripheral chip data and the peripheral device data are respectively subjected to CRC check. If the check succeeds, the peripheral chip data and the peripheral device data are respectively judged.
[0058] In this embodiment, the main control chip determines the peripheral chips and peripheral devices respectively, including:
[0059] According to the peripheral chip data, the peripheral chip is judged. If it is judged that there is no fault, then
[0060] The peripheral device is judged according to the peripheral device data, and if it is judged that there is no fault, the initialization is completed.
[0061] In this embodiment, judging the peripheral chip includes:
[0062] Extracting peripheral chip related information from the peripheral chip data that has passed data verification;
[0063] Determine the relevant information of the peripheral chip;
[0064] Judging the peripheral device includes:
[0065] Extracting peripheral related information from peripheral device data that has passed data verification;
[0066] Determine the peripheral related information.
[0067] In this embodiment, the data check may include CRC check, parity check, and checksum check.
[0068] In this embodiment, the method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture further includes:
[0069] The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip data and the peripheral device data have faults. If so,
[0070] Get the error code and pass it to the error handling unit.
[0071] In this embodiment, the peripheral chip data includes register address data, register configuration data, check bit data, peripheral chip related information, etc.
[0072] The peripheral device data includes peripheral configuration data and peripheral related information.
[0073] In this embodiment, the peripheral chip related information may include chip version number, chip serial number, chip status, chip communication data, chip error code and other peripheral chip information involved in the initialization process;
[0074] The peripheral related information may include a peripheral version number, a peripheral serial number, a peripheral status, peripheral communication data, a peripheral error code and other peripheral information involved in the initialization process.
[0075] The present application is further described in detail below by way of examples. It should be understood that the examples do not constitute any limitation to the present application.
[0076] See also Figure 3 , take a certain ECU electronic control system as an example, in which the main control chip is TC297, the peripheral chip is a PSI5 transceiver chip, and is connected to a height sensor. The main control chip and the peripheral chip communicate using SPI, and the peripheral chip and the peripheral use PSI5 to communicate. The height sensor will automatically write its initialization data into a buffer area of the PSI5 transceiver through the PSI5 frame during initialization.
[0077] Step 1: respectively configure parameters of the peripheral chip and the peripheral device connected to the peripheral chip;
[0078] Step 2: Obtain the peripheral chip data transmitted by the peripheral chip after parameter configuration;
[0079] Step 3: Acquire the peripheral device data transmitted by the peripheral device after parameter configuration by the peripheral chip;
[0080] Specifically, based on the register value and register address of the PSI5 transceiver chip preset in the code, a MOSI SPI write command to the internal register of the transceiver chip is sent to modify the register value of the transceiver chip, and the MISO SPI frame returned is received. Here, the MISO SPI frame sequence is recorded as the peripheral chip data. At the same time, according to the address of the peripheral initialization information buffer area of the PSI5 transceiver chip, a MOSI SPI read command to the buffer area is sent, and the MISOSPI frame returned is received. Here, the MISO SPI frame sequence is recorded as the peripheral device data.
[0081] The peripheral chip data and the peripheral device data are respectively subjected to CRC check. Specifically, the received peripheral chip data and the peripheral device data are subjected to CRC check. If both pass the check, the next step is entered.
[0082] The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip and the peripheral device have faults. In this embodiment, the peripheral chip is judged first. If it is determined that there is no fault, the peripheral device is judged again. If it is determined that there is no fault, the initialization is completed.
[0083] More specifically, the judgment of peripheral chip data includes:
[0084] Extracting peripheral chip related information from peripheral chip data that passes CRC verification;
[0085] Determine the relevant information of the peripheral chip;
[0086] More specifically, judging the peripheral device data includes:
[0087] Extracting peripheral related information from peripheral device data that passes CRC verification;
[0088] Determine the peripheral related information.
[0089] For example, parse the peripheral chip parameters after CRC verification and separate the required peripheral chip related information. Analyze the peripheral chip related information, such as the PSI5 transceiver chip status, etc. If all data is normal, proceed to the next step.
[0090] Determine the connection relationship between the peripheral chip and the peripheral device. The PSI5 transceiver chip in this system needs to be connected to a height sensor, and then proceed to the next step.
[0091] Extracting peripheral related information from peripheral device data;
[0092] Analyze the data in the peripheral related information, such as the height sensor serial number, version number, status, etc. If all the data is normal, the PSI5 transceiver chip initialization is completed and TC297 controls the transfer to other processes.
[0093] The present application also provides a device for initializing a peripheral chip with a complex driver under an AUTOSAR architecture. The device for initializing a peripheral chip with a complex driver under an AUTOSAR architecture includes a parameter configuration module, a peripheral chip data acquisition module, a peripheral device data acquisition module, and a judgment module. The parameter configuration module is used to respectively perform parameter configuration on the peripheral chip and the peripheral device connected to the peripheral chip; the peripheral chip data acquisition module is used to obtain the peripheral chip data transmitted by the peripheral chip after the parameter configuration; the peripheral device data acquisition module is used to obtain the peripheral device data transmitted by the peripheral chip after the parameter configuration; the judgment module is used to respectively judge the peripheral chip parameters and the peripheral device parameters to determine whether the peripheral chip and the peripheral device are faulty. If not, the initialization is completed.
[0094] The present application also provides a complex drive standardization initialization method, the complex drive standardization initialization method comprising:
[0095] Acquire a peripheral chip configuration table, the peripheral chip configuration table including at least one peripheral chip and peripheral device connection information of each peripheral chip;
[0096] Each peripheral chip in the peripheral chip configuration table is initialized according to the peripheral chip configuration table, wherein when the peripheral chip to be initialized is connected to a peripheral device, the method for initializing the peripheral chip by complex driving under the AUTOSAR architecture as described above is used to initialize the peripheral chip to be initialized.
[0097] Compared with the prior art, the present invention has the following beneficial effects: first, a unified initialization process for drivers of different peripheral chips is proposed, so as to improve the standardization of complex driver codes, facilitate maintenance, and make code reuse simpler when adding new peripheral chips under the same main control chip; second, a peripheral chip configuration table is added to record the peripheral chips that need to be initialized by the main control chip, so as to control the usage of the peripheral chips and facilitate modification of the scope and version of the peripheral chip drivers in the system; third, multiple rounds of verification are adopted during configuration to monitor the status of the peripheral chips and their peripherals, and provide error codes and error status interfaces to facilitate subsequent error handling.
[0098] The present application also provides a complex drive standardized initialization device, which includes a peripheral chip configuration table acquisition module and an initialization module. The peripheral chip configuration table acquisition module is used to acquire a peripheral chip configuration table, and the peripheral chip configuration table includes at least one peripheral chip and peripheral device connection information of each peripheral chip; the initialization module is used to initialize each peripheral chip in the peripheral chip configuration table according to the peripheral chip configuration table, wherein, when the peripheral chip to be initialized is connected to a peripheral device, the method for initializing the peripheral chip for complex drive under the AUTOSAR architecture as described above is used to initialize the peripheral chip to be initialized.
[0099] In this embodiment, the method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture further includes, before configuring parameters of the peripheral chip and a peripheral device connected to the peripheral chip:
[0100] The system is powered on, MCAL configuration is loaded, and the main control chip loads the initialization program of the peripheral chip.
[0101] In this embodiment, there is no direct path between the main control chip and any peripheral device, but it needs to be realized indirectly by reading or writing peripheral chips, that is, the peripheral device communicates with the corresponding peripheral chip instead of directly communicating with the main control chip.
[0102] In one embodiment, an external variable needs to be maintained to store the fault code. If no exception occurs during the initialization process, it is configured as a default value; otherwise, this variable needs to be configured as the fault code that occurs during the process. The fault code can be preset by the chip manufacturer or abstracted by the developer, so that the error processing unit can perform subsequent processing based on the fault code data.
[0103] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture as described above.
[0104] Figure 2 It is an exemplary structural diagram of an electronic device capable of implementing the method for initializing a peripheral chip for a complex driver under an AUTOSAR architecture provided in accordance with an embodiment of the present application.
[0105] like Figure 2As shown, the electronic device includes an input device 501, an input interface 502, a central processor 503, a memory 504, an output interface 505, and an output device 506. The input interface 502, the central processor 503, the memory 504, and the output interface 505 are interconnected through a bus 507, and the input device 501 and the output device 506 are connected to the bus 507 through the input interface 502 and the output interface 505, respectively, and then connected to other components of the electronic device. Specifically, the input device 504 receives input information from the outside, and transmits the input information to the central processor 503 through the input interface 502; the central processor 503 processes the input information based on the computer executable instructions stored in the memory 504 to generate output information, temporarily or permanently stores the output information in the memory 504, and then transmits the output information to the output device 506 through the output interface 505; the output device 506 outputs the output information to the outside of the electronic device for use by the user.
[0106] That is to say, Figure 2 The electronic device shown can also be implemented as comprising: a memory storing computer executable instructions; and one or more processors, which can implement the combination when executing the computer executable instructions. Figure 1 Describes the method of initializing peripheral chips for complex drivers under the AUTOSAR architecture.
[0107] In one embodiment, Figure 2 The electronic device shown can be implemented to include: a memory 504 configured to store executable program code; one or more processors 503 configured to run the executable program code stored in the memory 504 to execute the method for initializing a peripheral chip for a complex driver under the AUTOSAR architecture in the above embodiment.
[0108] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0109] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0110] Computer readable media include permanent and non-permanent, removable and non-removable, and the media can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), data versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0111] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0112] In addition, it is obvious that the word "comprising" does not exclude other units or steps. Multiple units, modules or devices stated in the device claim can also be implemented by one unit or the overall device through software or hardware.
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes identified in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or the total flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The processor referred to in this embodiment may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0115] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the device / terminal equipment by running or executing the computer programs and / or modules stored in the memory and calling the data 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, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0116] In this embodiment, if the module / unit integrated in the device / terminal equipment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. Although the present application is disclosed as above in terms of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0117] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0118] In addition, it is obvious that the word "comprising" does not exclude other units or steps. Multiple units, modules or devices stated in the device claim can also be implemented by one unit or the overall device through software or hardware.
[0119] Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements may be made thereto based on the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.
Claims
1. A method for initializing a peripheral chip for complex driving under the AUTOSAR architecture, characterized in that: The method for initializing peripheral chips with complex drivers under the AUTOSAR architecture includes: respectively configuring parameters of the peripheral chip and the peripheral devices connected to the peripheral chip; Obtain peripheral chip data transmitted by the peripheral chip after parameter configuration; Acquire the peripheral device data transmitted by the peripheral device transmitted by the peripheral chip after parameter configuration; The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip and the peripheral device have faults, and if not, the initialization is completed; Before the main control chip judges the peripheral chip data and the peripheral device data respectively, the method for initializing the peripheral chip with complex driving under the AUTOSAR architecture further includes: Perform data verification on the peripheral chip data and the peripheral device data respectively. If the verification is successful, The peripheral chip data and the peripheral device data are judged respectively; The main control chip judges the peripheral chip data and the peripheral device data respectively, including: The peripheral chip is judged, and if it is judged that there is no fault, then The peripheral device is judged, and if it is judged that there is no fault, initialization is completed; The judging of the peripheral chip data includes: Extracting peripheral chip related information from the peripheral chip data that has passed data verification; Determine the peripheral chip related information; The determining of the peripheral device data includes: Extracting peripheral device related information from the peripheral device data that has passed data verification; Determine the peripheral related information; The method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture further comprises: The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip and the peripheral device have faults. If so, Get the error code and pass it to the error handling unit.
2. The method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture as claimed in claim 1, characterized in that: The peripheral chip data includes register address data, register configuration data, check bit data, and peripheral chip related information; The peripheral device data includes peripheral configuration data and peripheral related information.
3. The method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture as claimed in claim 2, characterized in that: The peripheral chip related information includes chip version number, chip serial number, chip status, chip communication data, and chip error code; The peripheral related information includes a peripheral version number, a peripheral serial number, a peripheral status, a peripheral communication data, and a peripheral error code.
4. A device for initializing a peripheral chip with complex drivers under the AUTOSAR architecture, characterized in that: The device for initializing a peripheral chip with complex driving under the AUTOSAR architecture includes: A parameter configuration module, the parameter configuration module is used to perform parameter configuration on the peripheral chip and the peripheral device connected to the peripheral chip respectively; A peripheral chip data acquisition module, the peripheral chip data acquisition module is used to acquire the peripheral chip data transmitted by the peripheral chip after parameter configuration; A peripheral device data acquisition module, the peripheral device data acquisition module is used to acquire the peripheral device data transmitted by the peripheral chip after the peripheral device is configured with parameters; A judgment module, the judgment module is used to judge the peripheral chip parameters and the peripheral device parameters respectively, to judge whether the peripheral chip and the peripheral device have faults, and if not, to complete the initialization; Before the main control chip judges the peripheral chip data and the peripheral device data respectively, it further includes: Perform data verification on the peripheral chip data and the peripheral device data respectively. If the verification is successful, The peripheral chip data and the peripheral device data are judged respectively; The main control chip judges the peripheral chip data and the peripheral device data respectively, including: The peripheral chip is judged, and if it is judged that there is no fault, then The peripheral device is judged, and if it is judged that there is no fault, initialization is completed; The judging of the peripheral chip data includes: Extracting peripheral chip related information from the peripheral chip data that has passed data verification; Determine the peripheral chip related information; The determining of the peripheral device data includes: Extracting peripheral device related information from the peripheral device data that has passed data verification; Determine the peripheral related information; The method for initializing a peripheral chip with a complex driver under the AUTOSAR architecture further comprises: The peripheral chip data and the peripheral device data are judged respectively to determine whether the peripheral chip and the peripheral device have faults. If so, Get the error code and pass it to the error handling unit.
5. A complex drive standardization initialization method, characterized in that, The complex drive standardization initial method includes: Acquire a peripheral chip configuration table, wherein the peripheral chip configuration table includes at least one peripheral chip and peripheral device connection information of each peripheral chip; Each peripheral chip in the peripheral chip configuration table is initialized according to the peripheral chip configuration table, wherein, when the peripheral chip to be initialized is connected to a peripheral device, the method for initializing a peripheral chip by a complex driver under the AUTOSAR architecture as described in any one of claims 1 to 3 is used to initialize the peripheral chip to be initialized.
6. A complex drive standardized initial device, characterized in that, The complex drive standardized initial device includes: A peripheral chip configuration table acquisition module, the peripheral chip configuration table acquisition module is used to acquire a peripheral chip configuration table, the peripheral chip configuration table includes at least one peripheral chip and peripheral device connection information of each peripheral chip; An initialization module, wherein the initialization module is used to initialize each peripheral chip in the peripheral chip configuration table according to the peripheral chip configuration table, wherein when the peripheral chip to be initialized is connected to a peripheral device, the method for initializing a peripheral chip by a complex driver under the AUTOSAR architecture as described in any one of claims 1 to 3 is used to initialize the peripheral chip to be initialized.
Citation Information
Patent Citations
General car code conversion method
CN102622470A
Data processing method and system on chip
CN104219573A
Coprocessor firmware dynamic loading method, system and device and storage medium
CN110377358A
Product peripheral compatibility method and system
CN110502283A
Electric energy meter software reliability detection method and device, computer equipment and medium
CN113010423A
