Pin configuration error determination method and pin configuration error determination device
By acquiring and judging the pin drive status of the electronic control unit, the problem of mismatch between pin types and actuator types is solved, rapid detection and correction of pin configuration errors is achieved, and the reliability of the electronic control unit is improved.
Patent Information
- Application Number
- CN202410597657.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
AI Technical Summary
During the software development process of the electronic control unit, the pin type does not match the actual driven actuator type, leading to problems such as control logic errors, false alarms, or burned pins.
By obtaining the target pin of the electronic control unit and its configuration type, the driving status of the pin is judged to determine the configuration error, and the driving status of the opposite configuration type is used for quick judgment to ensure that the pin configuration is correct.
It achieves rapid detection and correction of pin configuration errors, avoids control logic errors and failures, and improves the reliability of the electronic control unit.
Smart Images

Figure CN118534878A
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic control units, and in particular to a method for determining a pin configuration error, a device for determining a pin configuration error, a computer-readable storage medium, and a computer program product. Background Art
[0002] The Electronic Control Unit (ECU) is a key component in the car, responsible for managing and controlling many electronic systems of the vehicle. ECU achieves the above goals by monitoring and processing data from various sensors and actuators. In the process of ECU software development, it is often encountered that the same ECU is used in different projects, and the controller pin names are the same but the output types of the pin channels are different. For the same pin, the software needs to switch the output type of the pin according to the actual configured actuator type. When the pin type switched in the software does not match the actual driven actuator type, it will cause control logic errors, false alarm faults or pin burnout problems.
[0003] Therefore, a method is urgently needed to solve the problem of quickly detecting the mismatch between the switching pin type in the software and the actuator type actually driven. Summary of the invention
[0004] The main purpose of the present application is to provide a method for determining a pin configuration error, a device for determining a pin configuration error, a computer-readable storage medium, and a computer program product, so as to at least solve the problem in the prior art that the switching pin type in the software does not match the actual driven actuator type, causing control logic errors, false alarm faults, or pin burning.
[0005] According to one aspect of the present application, a method for determining a pin configuration error is provided, which is applied to an electronic control system, wherein the electronic control system includes an electronic control unit and an actuator that are electrically connected, wherein the method includes: obtaining a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit that is pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; obtaining a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; and determining a pin configuration error of the electronic control unit at least based on the driving state.
[0006] Optionally, obtaining the target pin, target configuration type and non-target configuration type of the electronic control unit includes: controlling the operation of the actuator; determining whether the configuration type of the target pin is a predetermined type, wherein the predetermined type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel; and when the configuration type is the predetermined type, obtaining the target configuration type and the non-target configuration type of the target pin.
[0007] Optionally, determining that the pin configuration of the electronic control unit is wrong at least based on the driving state includes one of the following: determining whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven, and when the driving state indicates that the target pin corresponding to the non-target configuration type is driven, determining that the corresponding target pin configuration is wrong; determining whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven, and when the driving state indicates that the target pin corresponding to the non-target configuration type is driven and lasts for a predetermined period of time, determining that the corresponding target pin configuration is wrong.
[0008] Optionally, the non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel, and obtaining the driving state of the target pin corresponding to the non-target configuration type includes one of the following: when the non-target configuration type is the pulse width modulation channel, obtaining the driving duty cycle value of the driving function of the target pin of the non-target configuration type to obtain the driving state; when the non-target configuration type is the H-bridge control channel, obtaining the driving duty cycle value of the driving function of the target pin of the non-target configuration type to obtain the driving state; when the non-target configuration type is the digital output channel, obtaining the driving function value of the driving function of the target pin of the non-target configuration type to obtain the driving state.
[0009] Optionally, the non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel, and determining whether the driving state represents that the target pin corresponding to the non-target configuration type is driven includes one of the following: when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0, determining that the driving state represents that the target pin corresponding to the non-target configuration type is driven; when the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0, determining that the driving state represents that the target pin corresponding to the non-target configuration type is driven; when the non-target configuration type is a digital output channel and the driving function value is not 0, determining that the driving state represents that the target pin corresponding to the non-target configuration type is driven.
[0010] Optionally, obtaining the driving state of the target pin corresponding to the non-target configuration type includes: determining whether the electronic control unit is powered on; and when the electronic control unit is powered on, obtaining the driving state of the target pin corresponding to the non-target configuration type of the electronic control unit at the moment of power-on.
[0011] Optionally, after determining that the pin configuration of the electronic control unit is incorrect, the method further comprises: displaying an incorrect pin on a display interface, wherein the incorrect pin is a target pin corresponding to the case where the pin configuration of the electronic control unit is determined to be incorrect.
[0012] According to another aspect of the present application, there is provided a device for determining a pin configuration error, which is applied to an electronic control system, wherein the electronic control system includes an electronic control unit and an actuator that are electrically connected, wherein the device includes: a first acquisition unit, used to acquire a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit that is pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; a second acquisition unit, used to acquire a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; and a determination unit, used to determine that a pin configuration error of the electronic control unit is present based at least on the driving state.
[0013] Applying the technical solution of the present application, first, the target pin, target configuration type and non-target configuration type of the electronic control unit are obtained, the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is the configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; then the driving state of the target pin corresponding to the non-target configuration type is obtained, and the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; finally, at least according to the driving state, the pin configuration error of the electronic control unit is determined. Since the configuration pin of the electronic control unit can only be configured with two configuration types, it can be determined whether the configuration pin has a configuration error by judging the driving state of the opposite configuration type corresponding to the target configuration type of the pin. If the configuration pin corresponding to the opposite configuration type is driven, it indicates that the configuration pin is not configured with the correct configuration type, so the rapid judgment of the pin configuration error can be achieved. In addition, if it is not possible to detect whether a fault occurs in time only by judging the driving state of the target configuration type, judging by the driving state of the opposite configuration type is more accurate than the driving state of the target configuration type. The invention solves the problem in the prior art that the switching pin type in the software does not match the actuator type actually driven, causing control logic errors, false faults or pin burning. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0015] Figure 1 A hardware structure block diagram of a mobile terminal for performing a method for determining a pin configuration error provided in an embodiment of the present application is shown;
[0016] Figure 2 A schematic flow chart of a method for determining a pin configuration error provided in accordance with an embodiment of the present application is shown;
[0017] Figure 3 A specific flow chart of a method for determining a pin configuration error provided in an embodiment of the present application is shown;
[0018] Figure 4 A structural block diagram of a device for determining a pin configuration error provided according to an embodiment of the present application is shown.
[0019] The above drawings include the following reference numerals:
[0020] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0021] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 creative work should fall within the scope of protection of the present application.
[0023] 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 sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. 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 device comprising 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.
[0024] As introduced in the background technology, in the prior art, the mismatch between the switching pin type in the software and the actual driven actuator type causes control logic errors, false alarm faults or pin burning. To solve the above problems, the embodiments of the present application provide a method for determining a pin configuration error, a device for determining a pin configuration error, a computer-readable storage medium and a computer program product.
[0025] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for determining a pin configuration error according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the pin configuration error in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0028] In this embodiment, a method for determining a pin configuration error running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] Figure 2It is a flow chart of a method for determining a pin configuration error according to an embodiment of the present application. The method for determining a pin configuration error is applied to an electronic control system, and the electronic control system includes an electronic control unit and an actuator that are electrically connected.
[0030] like Figure 2 As shown, the method comprises the following steps:
[0031] Step S201, obtaining a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type;
[0032] Specifically, there are multiple ECU pins on the ECU, and each pin can be configured with different functions to achieve vehicle control. The number and type of configurable pins of the ECU vary depending on the specific ECU and the system controlled, but the following are some common types of configurable pins, such as: input pins, output pins, communication pins, power pins, ground pins, diagnostic pins, and programmable pins, among which input pins are used to receive signals from sensors or other sources, output pins are used to send signals to actuators or other components, communication pins are used to communicate with other ECUs or vehicle network systems, power pins provide power to the ECU, ground pins provide grounding for the ECU, diagnostic pins are used for diagnosis and troubleshooting, and programmable pins are used to customize the functions or behaviors of the ECU. In order to facilitate the calibration personnel to use each ECU pin, the pins in the ECU are currently divided into three types according to the hardware resources: analog-to-digital conversion AD type channels, switch input type channels, and low-side driver type channels.
[0033] Step S202, obtaining a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven;
[0034] Specifically, in a digital circuit, the driving state of a pin can be the level state of a pin of a connector or integrated circuit in an electronic device at a specific moment, that is, logic 1 (high level) or logic 0 (low level). In addition, electromagnetic interference, noise environment, temperature and humidity changes may also affect the driving state of the pin.
[0035] Step S203: determining that the pin configuration of the electronic control unit is wrong at least according to the driving state.
[0036] Specifically, when the target pin corresponding to the non-target configuration type represented by the driving state is driven, it indicates that the switching pin type in the software does not match the actuator type actually driven, and it is determined that the pin configuration of the above-mentioned electronic control unit is wrong. When the target pin corresponding to the non-target configuration type represented by the driving state is not driven, it indicates that the switching pin type in the software matches the actuator type actually driven, and it is determined that there is no error in the pin configuration of the above-mentioned electronic control unit.
[0037] Through this embodiment, first, the target pin, target configuration type and non-target configuration type of the electronic control unit are obtained, the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is the configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; then the driving state of the target pin corresponding to the non-target configuration type is obtained, and the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; finally, at least according to the driving state, the pin configuration error of the electronic control unit is determined. Since the configuration pin of the electronic control unit can only be configured with two configuration types, it can be determined whether the configuration pin has a configuration error by judging the driving state of the opposite configuration type corresponding to the target configuration type of the pin. If the configuration pin corresponding to the opposite configuration type is driven, it indicates that the configuration pin is not configured with the correct configuration type, so the rapid judgment of the pin configuration error can be achieved. In addition, if it is not possible to detect whether a fault occurs in time only by judging the driving state of the target configuration type, judging by the driving state of the opposite configuration type is more accurate than the driving state of the target configuration type. The invention solves the problem in the prior art that the switching pin type in the software does not match the actuator type actually driven, causing control logic errors, false faults or pin burning.
[0038] In the specific implementation process, the above step S201 can be implemented by the following steps: step S2011, controlling the actuator to work; step S2012, determining whether the configuration type of the above target pin is a predetermined type, wherein the predetermined type is one of a digital output channel, an H-bridge control channel, and a pulse width modulation channel; step S2013, when the configuration type is the predetermined type, obtaining the above target configuration type and the above non-target configuration type of the above target pin. This method can further quickly obtain the above target pin, the target configuration type, and the non-target configuration type.
[0039] Specifically, before obtaining the above-mentioned target configuration type and non-target configuration type, the ECU configuration software will be used to configure the ECU pins and the corresponding actuators, that is, the signals transmitted by the ECU pins will be associated with the signals of the actuators at the data level, so that the signals transmitted by the ECU pins can be converted into the signals of the actuators through preset conversion rules. The above-mentioned preset conversion rules are designed and analyzed based on the actual actuators, and this application does not impose any specific restrictions.
[0040] In order to further improve the accuracy of determining the pin configuration error of the above-mentioned electronic control unit, the above-mentioned step S203 of the present application can be implemented by one of the following steps: step S2031, determining whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, determining that the corresponding above-mentioned target pin configuration is wrong; step S2032, determining whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven and lasts for a predetermined period of time, determining that the corresponding above-mentioned target pin configuration is wrong.
[0041] Specifically, in the ECU, digital output channels, H-bridge control channels, and pulse width modulation channels are different types of signal output methods used to control various on-board devices and sensors. Digital output channels are usually used to control switch-type loads, such as relays, solenoid valves, indicator lights, etc. These channels can output high levels (usually 12V) or low levels (0V) to achieve switch control. For example: ignition coil control, fuel injection control, starter control, and light control. The H-bridge control channel is a bipolar drive circuit for controlling DC motors. It includes two bridge transistors for generating positive and negative currents to achieve forward and reverse control of the motor. Typical applications of the H-bridge control channel include: electric power steering systems, electric brake systems, traction motor control of electric vehicles, and fan drives. The pulse width modulation channel controls the average power of the load by adjusting the duty cycle of the signal (i.e., the time ratio of the high level to the low level). This control method can be used to achieve precise control of devices such as motors and LED lights. Typical applications of PWM channels include: motor speed control, LED brightness adjustment, temperature control, and servo control.
[0042] The above-mentioned non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel. The above-mentioned step S202 can also be implemented in other ways, for example: step S2021, when the above-mentioned non-target configuration type is the above-mentioned pulse width modulation channel, obtain the driving duty cycle value of the driving function of the target pin of the above-mentioned non-target configuration type to obtain the above-mentioned driving state; step S2022, when the above-mentioned non-target configuration type is the above-mentioned H-bridge control channel, obtain the driving duty cycle value of the driving function of the target pin of the above-mentioned non-target configuration type to obtain the above-mentioned driving state; step S2023, when the above-mentioned non-target configuration type is the above-mentioned digital output channel, obtain the driving function value of the driving function of the target pin of the above-mentioned non-target configuration type to obtain the above-mentioned driving state. This method can further quickly obtain the above-mentioned driving state.
[0043] Specifically, the drive state of the target pin corresponding to the non-target configuration type can be obtained in the following way: first, the function of the pin in the ECU needs to be known, and then the pin to be checked can be connected to observe its level change in real time, or the signal waveform of the pin can be observed on the screen of a logic analyzer or oscilloscope. If the waveform shows a high level, the drive state of the pin is logic 1; if the waveform shows a low level, the drive state of the pin is logic 0.
[0044] In some embodiments, the non-target configuration type is one of a digital output channel, an H-bridge control channel, and a pulse width modulation channel. The step S2031 can be implemented by the following steps: step S20311, when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0, determine that the driving state characterizes that the target pin corresponding to the non-target configuration type is driven; step S20312, when the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0, determine that the driving state characterizes that the target pin corresponding to the non-target configuration type is driven; step S20313, when the non-target configuration type is a digital output channel and the driving function value is not 0, determine that the driving state characterizes that the target pin corresponding to the non-target configuration type is driven. This method can further quickly determine that the pin configuration of the electronic control unit is wrong through the driving state.
[0045] Specifically, when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0, it indicates that the pulse width modulation channel is at a high level, and the target pin corresponding to the non-target configuration type is driven. When the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0, it indicates that the H-bridge control channel is at a high level, and the target pin corresponding to the non-target configuration type is driven. When the non-target configuration type is a digital output channel and the driving function value is not 0, it indicates that the digital output channel is at a high level, and the target pin corresponding to the non-target configuration type is driven.
[0046] The above step S202 can also be implemented by the following steps: step S2024, determining whether the above electronic control unit is powered on; step S2025, when the above electronic control unit is powered on, obtaining the driving state of the target pin corresponding to the above non-target configuration type of the above electronic control unit at the time of power-on. This method can further detect in time that the switching pin type in the software does not match the actuator type actually driven.
[0047] Specifically, the pin configuration data of the ECU is generally implemented through data flashing, so during the data flashing process, the ECU is powered off and then powered on, which can easily lead to the problem of incorrect ECU pin configuration, resulting in the ECU pins being unable to be used normally, printing control logic errors, false faults, or pin burnout. Therefore, obtaining the driving status of the ECU at the time of power-on can detect the problem of incorrect ECU pin configuration in a timely manner.
[0048] After step S203, the method further includes: step S204: displaying the error pin on the display interface, wherein the error pin is the target pin corresponding to the case where the pin configuration of the electronic control unit is determined to be wrong. The method can further promptly remind the technical staff to solve the problem that the switching pin type does not match the actual driven actuator type.
[0049] Specifically, in actual applications, in addition to displaying the above-mentioned error pins on the display interface, the error pins can also be sent to technicians, or a buzzer alarm can be used to remind technicians to perform a secondary check, thereby further improving the judgment accuracy of the method.
[0050] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for determining a pin configuration error of the present application will be described in detail below in conjunction with specific embodiments.
[0051] This embodiment relates to a specific method for determining a pin configuration error, such as Figure 3 As shown, the following steps are included:
[0052] Step S1: Get the pin configured by the actuator, assuming it is pin M, and drive the actuator to determine whether the pin M configured by the actuator is configurable for PWM and digital output. If so, get the type of pin M configured in the software. If the type of pin M configured in the software is PWM, get whether the driving state of the digital driving function of pin M is not equal to 0. If the driving state of the digital driving function of pin M is not equal to 0, and after accumulating for more than a certain time, report a configurable pin configuration error fault; if the driving state of the digital driving function of pin M is equal to 0, there is no fault. If the type of pin M configured in the software is digital, get whether the driving duty cycle value of the PWM driving function of pin M is not equal to 0. If the driving duty cycle value of the PWM driving function of pin M is not equal to 0, and after accumulating for more than a certain time, report a configurable pin configuration error fault; if the driving duty cycle value of the PWM driving function of pin M is equal to 0, there is no fault.
[0053] Step S2: First, obtain the pin configured by the actuator, assuming it is pin N, and drive the actuator to determine whether the pin N configured by the actuator is configurable for H-bridge and digital output. If so, obtain the type of pin N configuration in the software. If the type of pin N configuration in the software is H-bridge type, obtain whether the driving state of the digital driving function of pin N is not equal to 0. If the driving state of the digital driving function of pin N is not equal to 0, and after accumulating for more than a certain time, report a configurable pin configuration error fault; if the driving state of the digital driving function of pin N is equal to 0, there is no fault. If the type of pin N configuration in the software is digital type, obtain whether the duty cycle value of the H-bridge driving function of pin N is not equal to 0. If the duty cycle value of the H-bridge driving function of pin N is not equal to 0, and after accumulating for more than a certain time, report a configurable pin configuration error fault; if the duty cycle value of the H-bridge driving function of pin N is equal to 0, there is no fault.
[0054] The present application embodiment also provides a device for determining a pin configuration error. It should be noted that the device for determining a pin configuration error in the present application embodiment can be used to execute the method for determining a pin configuration error provided in the present application embodiment. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0055] The following is an introduction to a device for determining a pin configuration error provided in an embodiment of the present application.
[0056] Figure 42 is a schematic diagram of a device for determining a pin configuration error according to an embodiment of the present application. The device for determining a pin configuration error is applied to an electronic control system, and the electronic control system includes an electronic control unit and an actuator that are electrically connected.
[0057] like Figure 4 As shown, the device comprises:
[0058] A first acquisition unit 10 is used to acquire a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type;
[0059] Specifically, there are multiple ECU pins on the ECU, and each pin can be configured with different functions to achieve vehicle control. The number and type of configurable pins of the ECU vary depending on the specific ECU and the system controlled, but the following are some common types of configurable pins, such as: input pins, output pins, communication pins, power pins, ground pins, diagnostic pins, and programmable pins, among which input pins are used to receive signals from sensors or other sources, output pins are used to send signals to actuators or other components, communication pins are used to communicate with other ECUs or vehicle network systems, power pins provide power to the ECU, ground pins provide grounding for the ECU, diagnostic pins are used for diagnosis and troubleshooting, and programmable pins are used to customize the functions or behaviors of the ECU. In order to facilitate the calibration personnel to use each ECU pin, the pins in the ECU are currently divided into three types according to the hardware resources: analog-to-digital conversion AD type channels, switch input type channels, and low-side driver type channels.
[0060] A second acquisition unit 20 is used to acquire a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven;
[0061] Specifically, in a digital circuit, the driving state of a pin can be the level state of a pin of a connector or integrated circuit in an electronic device at a specific moment, that is, logic 1 (high level) or logic 0 (low level). In addition, electromagnetic interference, noise environment, temperature and humidity changes may also affect the driving state of the pin.
[0062] The determination unit 30 is used to determine that the pin configuration of the electronic control unit is wrong at least according to the driving state.
[0063] Specifically, when the target pin corresponding to the non-target configuration type represented by the driving state is driven, it indicates that the switching pin type in the software does not match the actuator type actually driven, and it is determined that the pin configuration of the above-mentioned electronic control unit is wrong. When the target pin corresponding to the non-target configuration type represented by the driving state is not driven, it indicates that the switching pin type in the software matches the actuator type actually driven, and it is determined that there is no error in the pin configuration of the above-mentioned electronic control unit.
[0064] Through this embodiment, the first acquisition unit acquires the target pin, target configuration type and non-target configuration type of the electronic control unit, the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is the configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; the second acquisition unit acquires the driving state of the target pin corresponding to the non-target configuration type, and the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; the determination unit determines the pin configuration error of the electronic control unit at least according to the driving state. Since the configuration pin of the electronic control unit can only be configured with two configuration types, it can be determined whether the configuration pin has a configuration error by judging the driving state of the opposite configuration type corresponding to the target configuration type of the pin. If the configuration pin corresponding to the opposite configuration type is driven, it indicates that the configuration pin is not configured with the correct configuration type, so the rapid judgment of the pin configuration error can be achieved. In addition, if it is not possible to detect whether a fault occurs in time only by judging the driving state of the target configuration type, judging by the driving state of the opposite configuration type is more accurate than the driving state of the target configuration type. The invention solves the problem in the prior art that the switching pin type in the software does not match the actuator type actually driven, causing control logic errors, false faults or pin burning.
[0065] In the specific implementation process, the first acquisition unit includes a control module, a first determination module and a first acquisition module, wherein the control module is used to control the operation of the actuator; the first determination module is used to determine whether the configuration type of the target pin is a predetermined type, wherein the predetermined type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel; the first acquisition module is used to acquire the target configuration type and the non-target configuration type of the target pin when the configuration type is the predetermined type. The device can further quickly acquire the target pin, the target configuration type and the non-target configuration type.
[0066] Specifically, before obtaining the above-mentioned target configuration type and non-target configuration type, the ECU configuration software will be used to configure the ECU pins and the corresponding actuators, that is, the signals transmitted by the ECU pins will be associated with the signals of the actuators at the data level, so that the signals transmitted by the ECU pins can be converted into the signals of the actuators through preset conversion rules. The above-mentioned preset conversion rules are designed and analyzed based on the actual actuators, and this application does not impose any specific restrictions.
[0067] In order to further improve the accuracy of determining the pin configuration error of the above-mentioned electronic control unit, the above-mentioned determination unit of the present application includes a second determination module and a third determination module, wherein the second determination module is used to determine whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, it is determined that the corresponding above-mentioned target pin configuration is wrong; the third determination module is used to determine whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven and lasts for a predetermined period of time, it is determined that the corresponding above-mentioned target pin configuration is wrong.
[0068] Specifically, in the ECU, digital output channels, H-bridge control channels, and pulse width modulation channels are different types of signal output methods used to control various on-board devices and sensors. Digital output channels are usually used to control switch-type loads, such as relays, solenoid valves, indicator lights, etc. These channels can output high levels (usually 12V) or low levels (0V) to achieve switch control. For example: ignition coil control, fuel injection control, starter control, and light control. The H-bridge control channel is a bipolar drive circuit for controlling DC motors. It includes two bridge transistors for generating positive and negative currents to achieve forward and reverse control of the motor. Typical applications of the H-bridge control channel include: electric power steering systems, electric brake systems, traction motor control of electric vehicles, and fan drives. The pulse width modulation channel controls the average power of the load by adjusting the duty cycle of the signal (i.e., the time ratio of the high level to the low level). This control method can be used to achieve precise control of devices such as motors and LED lights. Typical applications of PWM channels include: motor speed control, LED brightness adjustment, temperature control, and servo control.
[0069] The non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel. The second acquisition unit includes a second acquisition module, a third acquisition module and a fourth acquisition module, wherein the second acquisition module is used to obtain the driving duty cycle value of the driving function of the target pin of the non-target configuration type when the non-target configuration type is the pulse width modulation channel to obtain the driving state; the third acquisition module is used to obtain the driving duty cycle value of the driving function of the target pin of the non-target configuration type when the non-target configuration type is the H-bridge control channel to obtain the driving state; the fourth acquisition module is used to obtain the driving function value of the driving function of the target pin of the non-target configuration type when the non-target configuration type is the digital output channel to obtain the driving state. The device can further quickly obtain the driving state.
[0070] Specifically, the drive state of the target pin corresponding to the non-target configuration type can be obtained in the following way: first, the function of the pin in the ECU needs to be known, and then the pin to be checked can be connected to observe its level change in real time, or the signal waveform of the pin can be observed on the screen of a logic analyzer or oscilloscope. If the waveform shows a high level, the drive state of the pin is logic 1; if the waveform shows a low level, the drive state of the pin is logic 0.
[0071] In some embodiments, the non-target configuration type is one of a digital output channel, an H-bridge control channel, and a pulse width modulation channel, and the second determination module includes a first determination submodule, a second determination submodule, and a third determination submodule, wherein the first determination submodule is used to determine that the target pin corresponding to the non-target configuration type represented by the driving state is driven when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0; the second determination submodule is used to determine that the target pin corresponding to the non-target configuration type represented by the driving state is driven when the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0; the third determination submodule is used to determine that the target pin corresponding to the non-target configuration type represented by the driving state is driven when the non-target configuration type is a digital output channel and the driving function value is not 0. The device can further quickly determine that the pin configuration of the electronic control unit is wrong through the driving state.
[0072] Specifically, when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0, it indicates that the pulse width modulation channel is at a high level, and the target pin corresponding to the non-target configuration type is driven. When the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0, it indicates that the H-bridge control channel is at a high level, and the target pin corresponding to the non-target configuration type is driven. When the non-target configuration type is a digital output channel and the driving function value is not 0, it indicates that the digital output channel is at a high level, and the target pin corresponding to the non-target configuration type is driven.
[0073] The second acquisition unit further includes a fourth determination module and a fifth acquisition module, wherein the fourth determination module is used to determine whether the electronic control unit is powered on; the fifth acquisition module is used to acquire the driving state of the target pin corresponding to the non-target configuration type of the electronic control unit at the power-on moment when the electronic control unit is powered on. The device can further detect in time that the switching pin type in the software does not match the actuator type actually driven.
[0074] Specifically, the pin configuration data of the ECU is generally implemented through data flashing, so during the data flashing process, the ECU is powered off and then powered on, which can easily lead to the problem of incorrect ECU pin configuration, resulting in the ECU pins being unable to be used normally, printing control logic errors, false faults, or pin burnout. Therefore, obtaining the driving status of the ECU at the time of power-on can detect the problem of incorrect ECU pin configuration in a timely manner.
[0075] The device also includes a display unit for displaying the error pin on a display interface, wherein the error pin is a target pin corresponding to the case where the pin configuration of the electronic control unit is determined to be wrong. The device can further promptly remind the technical staff to solve the problem that the switching pin type does not match the actual driven actuator type.
[0076] Specifically, in actual applications, in addition to displaying the above-mentioned error pins on the display interface, the error pins can also be sent to technicians, or a buzzer alarm can be used to remind technicians to perform a secondary check, thereby further improving the judgment accuracy of the method.
[0077] The pin configuration error determination device includes a processor and a memory, and the first acquisition unit, the second acquisition unit, and the determination unit are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0078] The processor includes a kernel, which calls the corresponding program unit from the memory. The kernel can be set to one or more, and the pin configuration error can be determined by adjusting the kernel parameters.
[0079] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0080] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for determining a pin configuration error.
[0081] Specifically, the method for determining a pin configuration error includes:
[0082] Step S201, obtaining a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type;
[0083] Specifically, there are multiple ECU pins on the ECU, and each pin can be configured with different functions to achieve vehicle control. The number and type of configurable pins of the ECU vary depending on the specific ECU and the system controlled, but the following are some common types of configurable pins, such as: input pins, output pins, communication pins, power pins, ground pins, diagnostic pins, and programmable pins, among which input pins are used to receive signals from sensors or other sources, output pins are used to send signals to actuators or other components, communication pins are used to communicate with other ECUs or vehicle network systems, power pins provide power to the ECU, ground pins provide grounding for the ECU, diagnostic pins are used for diagnosis and troubleshooting, and programmable pins are used to customize the functions or behaviors of the ECU. In order to facilitate the calibration personnel to use each ECU pin, the pins in the ECU are currently divided into three types according to the hardware resources: analog-to-digital conversion AD type channels, switch input type channels, and low-side driver type channels.
[0084] Step S202, obtaining a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven;
[0085] Specifically, in a digital circuit, the driving state of a pin can be the level state of a pin of a connector or integrated circuit in an electronic device at a specific moment, that is, logic 1 (high level) or logic 0 (low level). In addition, electromagnetic interference, noise environment, temperature and humidity changes may also affect the driving state of the pin.
[0086] Step S203: determining that the pin configuration of the electronic control unit is wrong at least according to the driving state.
[0087] Specifically, when the target pin corresponding to the non-target configuration type represented by the driving state is driven, it indicates that the switching pin type in the software does not match the actuator type actually driven, and it is determined that the pin configuration of the above-mentioned electronic control unit is wrong. When the target pin corresponding to the non-target configuration type represented by the driving state is not driven, it indicates that the switching pin type in the software matches the actuator type actually driven, and it is determined that there is no error in the pin configuration of the above-mentioned electronic control unit.
[0088] Optionally, obtaining the target pin, target configuration type and non-target configuration type of the electronic control unit includes: controlling the operation of the actuator; determining whether the configuration type of the target pin is a predetermined type, wherein the predetermined type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel; when the configuration type is the predetermined type, obtaining the target configuration type and the non-target configuration type of the target pin.
[0089] Optionally, determining that the pin configuration of the electronic control unit is wrong at least based on the above-mentioned driving state includes one of the following: determining whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, determining that the corresponding target pin configuration is wrong; determining whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven and lasts for a predetermined period of time, determining that the corresponding target pin configuration is wrong.
[0090] Optionally, the non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel, and obtaining the driving state of the target pin corresponding to the non-target configuration type includes one of the following: when the non-target configuration type is the pulse width modulation channel, obtaining the driving duty cycle value of the driving function of the target pin of the non-target configuration type to obtain the driving state; when the non-target configuration type is the H-bridge control channel, obtaining the driving duty cycle value of the driving function of the target pin of the non-target configuration type to obtain the driving state; when the non-target configuration type is the digital output channel, obtaining the driving function value of the driving function of the target pin of the non-target configuration type to obtain the driving state.
[0091] Optionally, the non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel, and determining whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven includes one of the following: when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0, determining that the driving state indicates that the target pin corresponding to the non-target configuration type is driven; when the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0, determining that the driving state indicates that the target pin corresponding to the non-target configuration type is driven; when the non-target configuration type is a digital output channel and the driving function value is not 0, determining that the driving state indicates that the target pin corresponding to the non-target configuration type is driven.
[0092] Optionally, obtaining the driving state of the target pin corresponding to the above-mentioned non-target configuration type includes: determining whether the above-mentioned electronic control unit is powered on; when the above-mentioned electronic control unit is powered on, obtaining the driving state of the target pin corresponding to the above-mentioned non-target configuration type of the above-mentioned electronic control unit at the power-on moment.
[0093] Optionally, after determining that the pin configuration of the electronic control unit is wrong, the method further comprises: displaying the wrong pin on a display interface, wherein the wrong pin is a target pin corresponding to the case where the pin configuration of the electronic control unit is determined to be wrong.
[0094] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the method for determining a pin configuration error is executed when the program is run.
[0095] Specifically, the method for determining a pin configuration error includes:
[0096] Step S201, obtaining a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type;
[0097] Specifically, there are multiple ECU pins on the ECU, and each pin can be configured with different functions to achieve vehicle control. The number and type of configurable pins of the ECU vary depending on the specific ECU and the system controlled, but the following are some common types of configurable pins, such as: input pins, output pins, communication pins, power pins, ground pins, diagnostic pins, and programmable pins, among which input pins are used to receive signals from sensors or other sources, output pins are used to send signals to actuators or other components, communication pins are used to communicate with other ECUs or vehicle network systems, power pins provide power to the ECU, ground pins provide grounding for the ECU, diagnostic pins are used for diagnosis and troubleshooting, and programmable pins are used to customize the functions or behaviors of the ECU. In order to facilitate the calibration personnel to use each ECU pin, the pins in the ECU are currently divided into three types according to the hardware resources: analog-to-digital conversion AD type channels, switch input type channels, and low-side driver type channels.
[0098] Step S202, obtaining a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven;
[0099] Specifically, in a digital circuit, the driving state of a pin can be the level state of a pin of a connector or integrated circuit in an electronic device at a specific moment, that is, logic 1 (high level) or logic 0 (low level). In addition, electromagnetic interference, noise environment, temperature and humidity changes may also affect the driving state of the pin.
[0100] Step S203: determining that the pin configuration of the electronic control unit is wrong at least according to the driving state.
[0101] Specifically, when the target pin corresponding to the non-target configuration type represented by the driving state is driven, it indicates that the switching pin type in the software does not match the actuator type actually driven, and it is determined that the pin configuration of the above-mentioned electronic control unit is wrong. When the target pin corresponding to the non-target configuration type represented by the driving state is not driven, it indicates that the switching pin type in the software matches the actuator type actually driven, and it is determined that there is no error in the pin configuration of the above-mentioned electronic control unit.
[0102] Optionally, obtaining the target pin, target configuration type and non-target configuration type of the electronic control unit includes: controlling the operation of the actuator; determining whether the configuration type of the target pin is a predetermined type, wherein the predetermined type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel; when the configuration type is the predetermined type, obtaining the target configuration type and the non-target configuration type of the target pin.
[0103] Optionally, determining that the pin configuration of the electronic control unit is wrong at least based on the above-mentioned driving state includes one of the following: determining whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, determining that the corresponding target pin configuration is wrong; determining whether the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven, and when the above-mentioned driving state indicates that the target pin corresponding to the above-mentioned non-target configuration type is driven and lasts for a predetermined period of time, determining that the corresponding target pin configuration is wrong.
[0104] Optionally, the non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel, and obtaining the driving state of the target pin corresponding to the non-target configuration type includes one of the following: when the non-target configuration type is the pulse width modulation channel, obtaining the driving duty cycle value of the driving function of the target pin of the non-target configuration type to obtain the driving state; when the non-target configuration type is the H-bridge control channel, obtaining the driving duty cycle value of the driving function of the target pin of the non-target configuration type to obtain the driving state; when the non-target configuration type is the digital output channel, obtaining the driving function value of the driving function of the target pin of the non-target configuration type to obtain the driving state.
[0105] Optionally, the non-target configuration type is one of a digital output channel, an H-bridge control channel and a pulse width modulation channel, and determining whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven includes one of the following: when the non-target configuration type is a pulse width modulation channel and the driving duty cycle value is not 0, determining that the driving state indicates that the target pin corresponding to the non-target configuration type is driven; when the non-target configuration type is an H-bridge control channel and the driving duty cycle value is not 0, determining that the driving state indicates that the target pin corresponding to the non-target configuration type is driven; when the non-target configuration type is a digital output channel and the driving function value is not 0, determining that the driving state indicates that the target pin corresponding to the non-target configuration type is driven.
[0106] Optionally, obtaining the driving state of the target pin corresponding to the above-mentioned non-target configuration type includes: determining whether the above-mentioned electronic control unit is powered on; when the above-mentioned electronic control unit is powered on, obtaining the driving state of the target pin corresponding to the above-mentioned non-target configuration type of the above-mentioned electronic control unit at the power-on moment.
[0107] Optionally, after determining that the pin configuration of the electronic control unit is wrong, the method further comprises: displaying the wrong pin on a display interface, wherein the wrong pin is a target pin corresponding to the case where the pin configuration of the electronic control unit is determined to be wrong.
[0108] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0109] Step S201, obtaining a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type;
[0110] Step S202, obtaining a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven;
[0111] Step S203: determining that the pin configuration of the electronic control unit is wrong at least according to the driving state.
[0112] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0113] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0114] Step S201, obtaining a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type;
[0115] Step S202, obtaining a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven;
[0116] Step S203: determining that the pin configuration of the electronic control unit is wrong at least according to the driving state.
[0117] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0118] 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 in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0119] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0122] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0123] The memory may include non-permanent memory 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.
[0124] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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, compact disk read-only memory (CD-ROM), digital 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. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0125] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0126] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0127] 1) The method for determining pin configuration error of the present application, first, obtain the target pin, target configuration type and non-target configuration type of the electronic control unit, the target pin is the configurable pin of the electronic control unit pre-configured by the actuator to connect with the electronic control unit, the target configuration type is the configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; then obtain the driving state of the target pin corresponding to the non-target configuration type, the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; finally, at least according to the driving state, determine the pin configuration error of the electronic control unit. Since the configuration pin of the electronic control unit can only be configured with two configuration types, it can be determined whether the configuration pin has a configuration error by judging the driving state of the opposite configuration type corresponding to the target configuration type of the pin. If the configuration pin corresponding to the opposite configuration type is driven, it indicates that the configuration pin is not configured with the correct configuration type, so the rapid judgment of the pin configuration error can be achieved. In addition, if it is not possible to detect whether a fault occurs in time only by judging the driving state of the target configuration type, judging by the driving state of the opposite configuration type is more accurate than the driving state of the target configuration type. The invention solves the problem in the prior art that the switching pin type in the software does not match the actuator type actually driven, causing control logic errors, false faults or pin burning.
[0128] 2) The pin configuration error determination device of the present application, the first acquisition unit acquires the target pin, target configuration type and non-target configuration type of the electronic control unit, the target pin is the configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is the configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; the second acquisition unit acquires the driving state of the target pin corresponding to the non-target configuration type, and the driving state is used to characterize whether the target pin corresponding to the non-target configuration type is driven; the determination unit determines the pin configuration error of the electronic control unit at least according to the driving state. Since the configuration pin of the electronic control unit can only be configured with two configuration types, it can be determined whether the configuration pin has a configuration error by judging the driving state of the opposite configuration type corresponding to the target configuration type of the pin. If the configuration pin corresponding to the opposite configuration type is driven, it indicates that the configuration pin is not configured with the correct configuration type, so the rapid judgment of the pin configuration error can be achieved. In addition, if it is not possible to detect whether a fault occurs in time only by judging the driving state of the target configuration type, judging by the driving state of the opposite configuration type is more accurate than the driving state of the target configuration type. The invention solves the problem in the prior art that the switching pin type in the software does not match the actuator type actually driven, causing control logic errors, false faults or pin burning.
[0129] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a pin configuration error, characterized in that: Applied to an electronic control system, the electronic control system includes an electronic control unit and an actuator electrically connected, wherein the method includes: Acquire a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; Acquire a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven; At least according to the driving state, it is determined that the pin configuration of the electronic control unit is wrong.
2. The method according to claim 1, characterized in that Obtaining the target pin, target configuration type, and non-target configuration type of the electronic control unit, including: Controlling the actuator to work; Determining whether the configuration type of the target pin is a predetermined type, wherein the predetermined type is one of a digital output channel, an H-bridge control channel, and a pulse width modulation channel; When the configuration type is the predetermined type, the target configuration type and the non-target configuration type of the target pin are acquired.
3. The method according to claim 1, characterized in that At least according to the driving state, determining that the pin configuration of the electronic control unit is wrong includes one of the following: Determining whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven, and if the driving state indicates that the target pin corresponding to the non-target configuration type is driven, determining that the corresponding target pin is incorrectly configured; It is determined whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven. If the driving state indicates that the target pin corresponding to the non-target configuration type is driven and lasts for a predetermined time, it is determined that the corresponding target pin configuration is wrong.
4. The method according to claim 3, characterized in that The non-target configuration type is one of a digital output channel, an H-bridge control channel, and a pulse width modulation channel, and obtaining the driving state of the target pin corresponding to the non-target configuration type includes one of the following: In a case where the non-target configuration type is the pulse width modulation channel, acquiring a driving duty cycle value of a driving function of a target pin of the non-target configuration type to obtain the driving state; In the case where the non-target configuration type is the H-bridge control channel, acquiring a driving duty cycle value of a driving function of a target pin of the non-target configuration type to obtain the driving state; In a case where the non-target configuration type is the digital output channel, a driving function value of a driving function of a target pin of the non-target configuration type is acquired to obtain the driving state.
5. The method according to claim 4, characterized in that The non-target configuration type is one of a digital output channel, an H-bridge control channel, and a pulse width modulation channel, and determining whether the driving state indicates that the target pin corresponding to the non-target configuration type is driven includes one of the following: When the non-target configuration type is the pulse width modulation channel and the driving duty cycle value is not 0, determining that the driving state represents that the target pin corresponding to the non-target configuration type is driven; When the non-target configuration type is the H-bridge control channel and the driving duty cycle value is not 0, determining that the driving state represents that the target pin corresponding to the non-target configuration type is driven; When the non-target configuration type is the digital output channel and the driving function value is not 0, determining that the driving state represents that the target pin corresponding to the non-target configuration type is driven.
6. The method according to claim 1, characterized in that Obtaining the driving state of the target pin corresponding to the non-target configuration type includes: determining whether the electronic control unit is powered on; When the electronic control unit is powered on, the driving state of the target pin corresponding to the non-target configuration type of the electronic control unit at the power-on time is obtained.
7. The method according to claim 1, characterized in that After determining that the pin configuration of the electronic control unit is wrong, the method further includes: The error pin is displayed on the display interface, wherein the error pin is a target pin corresponding to a case where it is determined that the pin configuration of the electronic control unit is wrong.
8. A device for determining pin configuration error, characterized in that: Applied to an electronic control system, the electronic control system includes an electronic control unit and an actuator electrically connected, wherein the device includes: A first acquisition unit is used to acquire a target pin, a target configuration type, and a non-target configuration type of the electronic control unit, wherein the target pin is a configurable pin of the electronic control unit pre-configured by the actuator to be connected to the electronic control unit, the target configuration type is a configuration type corresponding to the actuator, and the target pin is configured as the target configuration type or the non-target configuration type; a second acquisition unit, configured to acquire a driving state of a target pin corresponding to the non-target configuration type, wherein the driving state is used to indicate whether the target pin corresponding to the non-target configuration type is driven; A determination unit is used to determine that the pin configuration of the electronic control unit is wrong at least according to the driving state.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
