Electronic Control Unit

By setting the bit rate and transmission register of the serial communication function in the microcontroller of the electronic control device and outputting the PWM signal, the problem of errors in the PWM signal period and pulse width ratio caused by high priority interrupt processing is solved, and the accuracy and stability of the signal are achieved.

JP7675311B2Active Publication Date: 2025-05-14ASTEMO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021192644
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-05-14
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

In electronic control devices, when high priority interrupt processing is performed, the regular processing delay provided by the timer function can cause errors in the period and pulse width ratio of the PWM signal.

Method used

The bit rate of the serial communication function is set in the microcontroller to match the specified period of the PWM signal, and the corresponding PWM signal data is set in the transmission register of the serial communication function to output the PWM signal, and the self-diagnosis function is also provided to deal with instructions from external devices.

Benefits of technology

Even in the high priority interrupt processing, the electronic control device can effectively suppress the period and pulse width ratio of the PWM signal to ensure the accuracy and stability of the signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007675311000001
    Figure 0007675311000001
  • Figure 0007675311000002
    Figure 0007675311000002
  • Figure 0007675311000003
    Figure 0007675311000003
Patent Text Reader

Abstract

To prevent the cycle and duty ratio of a PWM signal from being affected even if interrupt processing with a high priority is performed in an electronic control device that outputs the PWM signal.SOLUTION: A VVT controller 250 outputs a PWM signal at each predetermined cycle by a microcomputer 260 having a serial communication function. At this time, the microcomputer 260 of the VVT controller 250 is configured to set the bit rate of the serial communication function according to the predetermined cycle and set data corresponding to the PWM signal to a transmission data buffer register 260A of the serial communication function and output the data.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an electronic control device that outputs a pulse width modulation (PWM) signal using a serial communication function. [Background technology]

[0002] In an electronic control device mounted on a vehicle, a technology has been proposed in which a timer function is used to output a PWM signal, as described in JP 2012-4815 A (Patent Document 1). Here, the PWM signal is a pulse signal in which the pulse duty ratio is changed while the signal strength is kept constant. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2012-4815 A Summary of the Invention [Problem to be solved by the invention]

[0004] Incidentally, when a PWM signal is output as a scheduled process using a timer function provided in a microcomputer of an electronic control device, if an interrupt process with a high priority is executed first, the start of execution of the scheduled process will be delayed, resulting in an error in the period and duty ratio of the PWM signal.

[0005] SUMMARY OF THE PRESENT DISCLOSURE An object of the present invention is to provide an electronic control device that is less likely to affect the period and duty ratio of a PWM signal even if a high-priority interrupt process is executed preferentially. [Means for solving the problem]

[0006] The electronic control device outputs a PWM signal at a predetermined cycle by a microcomputer equipped with a serial communication function. At this time, the microcomputer sets a bit rate of the serial communication function according to the predetermined cycle, and writes data corresponding to the PWM signal to a transmission register of the serial communication function. set and output At the same time, when a fault is diagnosed by the self-diagnosis function or when an instruction is received from an external device, the output of the PWM signal using the serial communication function is switched to the output of the PWM signal using the timer function. It is structured as follows. Effect of the Invention

[0007] According to the present invention, even if a high-priority interrupt process is executed in an electronic control device that outputs a PWM signal, the period and duty ratio of the PWM signal can be prevented from being affected. [Brief description of the drawings]

[0008] [Figure 1] 1 is a schematic diagram showing an example of an engine system mounted on a vehicle. [Diagram 2] FIG. 2 is a perspective view showing an example of a variable valve timing mechanism. [Diagram 3] FIG. 4 is an explanatory diagram showing an example of information transmitted and received between a controller of a variable valve timing mechanism and an engine control module. [Figure 4] FIG. 2 is an explanatory diagram showing an example of a structure of transmission data; [Diagram 5] FIG. 11 is an explanatory diagram showing specific transmission data. [Figure 6] 13 is a flowchart illustrating an example of an initialization process. [Figure 7] 11 is a flowchart showing an example of a first signal output process. [Figure 8] 13 is a flowchart illustrating an example of an output switching process. [Figure 9] FIG. 4 is an explanatory diagram of a map for determining an output method of a PWM signal. [Figure 10] 10 is a flowchart showing an example of a second signal output process. [Figure 11] 11 is an explanatory diagram of an output of a PWM signal by the second signal output processing. FIG. [Figure 12]FIG. 11 is an explanatory diagram of a method for making data stored in a volatile memory accessible; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. FIG. 1 shows an example of an engine system mounted on a vehicle to which an electronic control device according to this embodiment can be applied.

[0010] An engine 10 mounted on a vehicle such as an automobile is, for example, an in-line four-cylinder gasoline engine. An intake air flow sensor 14 for detecting an intake air flow rate Q, which is one example of the load of the engine 10, is attached to a predetermined location of an intake pipe 12 that introduces intake air (intake air) into each cylinder. As the intake air flow rate sensor 14, for example, a hot wire flow meter such as an air flow meter can be used. Note that the load of the engine 10 is not limited to the intake air flow rate Q, and for example, a state quantity closely related to torque, such as intake negative pressure, supercharging pressure, throttle opening, and accelerator opening, can be used.

[0011] An intake port 18 that introduces intake air into the combustion chamber 16 of each cylinder is provided with an intake valve 20 that opens and closes an end opening facing the combustion chamber 16. A fuel injection valve 22 that injects fuel toward the back surface of the umbrella part of the intake valve 20 is attached to a predetermined position of the intake port 18 located upstream of the intake valve 20. When a magnetic attraction force is generated by energizing an electromagnetic coil, the valve body of the fuel injection valve 22 that is biased in the valve closing direction by a spring lifts, and the nozzle hole at the tip opens and injects fuel. Fuel adjusted to a predetermined pressure is supplied to the fuel injection valve 22 so that the fuel is injected in proportion to the opening time of the nozzle hole. Note that the fuel injection valve 22 is not limited to a configuration that injects fuel toward the back surface of the umbrella part of the intake valve 20, but may be a configuration that directly injects fuel into the combustion chamber 16, or a configuration that has both of these.

[0012] Fuel injected from the nozzle hole of the fuel injection valve 22 passes through the gap between the end opening of the intake port 18 and the intake valve 20 and is introduced into the combustion chamber 16 together with the intake air, and is ignited and burned by spark ignition from an ignition plug 24. As a result, the combustion pressure pushes a piston 26 down toward a crankshaft (not shown), thereby driving the crankshaft to rotate.

[0013] An exhaust port 28 that leads out exhaust gas from the combustion chamber 16 is provided with an exhaust valve 30 that opens and closes an end opening facing the combustion chamber 16. When the end opening of the exhaust port 28 is opened by the exhaust valve 30, the exhaust gas is discharged into an exhaust pipe 32 through a gap between the end opening of the exhaust port 28 and the exhaust valve 30. A catalytic converter 34 is attached to a predetermined position of the exhaust pipe 32. Harmful substances contained in the exhaust gas are purified into harmless components by the catalytic converter 34, and then released into the atmosphere from the end opening of the exhaust pipe 32. Here, as the catalytic converter 34, for example, a three-way catalyst that simultaneously purifies CO (carbon monoxide), HC (hydrocarbon), and NOx (nitrogen oxides) contained in the exhaust gas can be used.

[0014] 2, an electric variable valve timing mechanism (hereinafter abbreviated as "VVT (Variable Valve Timing) mechanism") 100 is attached to the end of the intake camshaft 36 that drives the intake valve 20 to open and close, thereby changing the rotational phase of the intake camshaft 36 relative to the crankshaft. Here, the VVT ​​mechanism 100 is not limited to being disposed on the intake valve 20, and may be disposed on at least one of the intake valve 20 and the exhaust valve 30.

[0015] The VVT ​​mechanism 100 is integrated with a cam sprocket 110 around which a cam chain that transmits the rotational driving force of the crankshaft is wound. In the VVT ​​mechanism 100, an electric motor 120 with a built-in speed reducer rotates the intake camshaft 36 relative to the cam sprocket 110, thereby advancing or retarding the valve timing. Here, what is indicated by the reference numeral 130 in Fig. 2 is a connector for detachably connecting a harness that supplies power (current) to the electric motor 120.

[0016] In addition to the intake air flow rate sensor 14 described above, a water temperature sensor 38, an engine speed sensor 40, a crank angle sensor 42, and a cam angle sensor 44 are attached to predetermined locations in the engine system. The water temperature sensor 38 detects the coolant temperature (water temperature) Tw of the engine 10, and outputs a signal corresponding to the water temperature Tw. The engine speed sensor 40 detects the rotation speed Ne of the engine 10, and outputs a signal corresponding to the rotation speed Ne. The crank angle sensor 42 detects the rotation angle θ of the crankshaft from a reference position. CRK Detect the rotation angle θ CRK The cam angle sensor 44 detects the rotation angle θ of the intake camshaft 36 from a reference position. CAM Detect the rotation angle θ CAM The controller 10 outputs a signal according to the received signal.

[0017] The output signals of the intake air flow rate sensor 14, the water temperature sensor 38, the engine speed sensor 40, the crank angle sensor 42, and the cam angle sensor 44 are input to an engine control module (ECM) 200 incorporating a microcomputer. The engine control module 200 reads the intake air flow rate Q and the engine speed Ne from the intake air flow rate sensor 14 and the engine speed sensor 40, respectively, and calculates a basic fuel injection amount according to the engine operating state based on these. The engine control module 200 also reads the water temperature Tw from the water temperature sensor 38, and calculates a fuel injection amount obtained by correcting the basic fuel injection amount with the water temperature Tw, etc. The engine control module 200 then reads the rotation angle θ from the crank angle sensor 42 and the cam angle sensor 44. CRK and the rotation angle θ CAMand outputs operation signals to the fuel injector 22 and the spark plug 24 at timings corresponding to the engine operating state determined from these. As a result, fuel corresponding to the fuel injection amount is injected from the nozzle hole of the fuel injector 22, and the fuel-air mixture is spark-ignited by the spark plug 24, and the resulting combustion pressure drives the crankshaft to rotate. At this time, the engine control module 200 reads the air-fuel ratio in the exhaust gas from an air-fuel ratio sensor (not shown), and feedback-controls the fuel injector 22 so that the air-fuel ratio in the exhaust gas approaches the target air-fuel ratio.

[0018] In addition to controlling the fuel injection valve 22 and the spark plug 24, the engine control module 200 reads the intake flow rate Q and the rotation speed Ne from the intake flow rate sensor 14 and the engine rotation speed sensor 40, respectively, and calculates the target phase of the VVT ​​mechanism 100 according to the engine operating state. Then, the engine control module 200 transmits the target phase of the VVT ​​mechanism 100 to a VVT controller 250 incorporating a microcomputer. On the other hand, the VVT ​​controller 250, which has received the target phase, feedback controls the electric motor 120 of the VVT ​​mechanism 100 so that the rotation phase of the intake camshaft 36 relative to the crankshaft approaches the target phase, and transmits the actual phase of the VVT ​​mechanism 100 to the engine control module 200. The VVT ​​controller 250 may be integrated with the VVT ​​mechanism 100. Here, the VVT ​​controller 250 is given as an example of an electronic control device.

[0019] 3, the VVT ​​controller 250 includes a microcomputer 260, an input circuit 270 of a PWM signal using a timer function, an output circuit 280 of a PWM signal using a timer function, and an output circuit 290 of a PWM signal using a serial communication function. The microcomputer 260 inputs a target phase from the engine control module 200 via the input circuit 270 of the PWM signal using the timer function, and outputs an actual phase to the engine control module 200 via the output circuit 280 of the PWM signal using the timer function. Here, the target phase and the actual phase are represented by the duty ratio of the PWM signal.

[0020] Furthermore, the microcomputer 260 of the VVT ​​controller 250 is provided with a well-known self-diagnosis function (not shown) for diagnosing whether or not a failure has occurred in the VVT ​​mechanism 100 and the VVT ​​controller 250. The microcomputer 260 outputs diagnostic information by the self-diagnosis function to the engine control module 200 via a PWM signal output circuit 290 using a serial communication function. Here, the diagnostic information is represented by the duty ratio of the PWM signal, similar to the target phase and actual phase.

[0021] Furthermore, the microcomputer 260 includes a transmission data buffer register 260A for outputting any data using a serial communication function. When transmission data is set in the transmission data buffer register 260A, the data set in the transmission data buffer register 260A is automatically transmitted at a period corresponding to a preset bit rate by a well-known serial communication function. Therefore, the microcomputer 260 generates transmission data corresponding to the diagnosis result by the self-diagnosis function and sets this in the transmission data buffer register 260A, thereby being able to output diagnostic information to the engine control module 200 without performing a special transmission process. Here, the transmission data buffer register 260A is given as an example of a transmission register of the serial communication function.

[0022] Meanwhile, during control of the VVT ​​mechanism 100 by the VVT ​​controller 250, the diagnostic information by the self-diagnosis function is sufficient if it can at least identify the presence or absence of a fault and the location of the fault. Therefore, the types of diagnostic information are relatively few, and problems are unlikely to occur even if the resolution is somewhat lower than that of the target phase transmitted from the engine control module 200 to the VVT ​​controller 250. Therefore, instead of using a timer function with limited resources, the diagnostic information is transmitted from the VVT ​​controller 250 to the engine control module 200 using a serial communication function with relatively limited resources. In this way, even if the timer function provided in the microcomputer 260 of the VVT ​​controller 250 does not have sufficient capacity, the diagnostic information can be output from the VVT ​​controller 250 to the engine control module 200. A method for outputting diagnostic information will be described in detail below.

[0023] As shown in FIG. 4, the transmission data TXD of serial communication is composed of 10 bits including 1 start bit, 8 data bits D0 to D7, and 1 stop bit when there is no parity. The 1 start bit is information for identifying the start of the transmission data, and is, for example, LOW (0). The 8 data bits D0 to D7 are an area in which the actual data bytes are stored, and each bit is stored from the least significant bit (LSB) to the most significant bit (MSB) of the data byte. The 1 stop bit is information for identifying the end of the transmission data, and is, for example, HIGH (1). Therefore, the transmission data TXD can express nine pieces of information, 0xFF, 0x03, 0x7F, 0x7F, 0xFH, 0x1F, 0x3F, 0x7F, and 0xFF, as a pseudo PWM signal by the 8 data bits D0 to D7. Therefore, the transmission data TXD can express a pseudo PWM signal with a duty ratio resolution of 10%. In addition, when the transmission data TXD has, for example, 1-bit parity, it includes 7 data bits D0 to D6.

[0024] When the bit rate of the serial communication function is set to 1000 bps, the VVT ​​controller 250 can output a pseudo PWM signal with a period of 100 Hz and a duty ratio resolution of 10%. Therefore, the waveform of the signal output from the output port for serial communication becomes equivalent to a PWM waveform with a period of 100 Hz and a resolution of 10%. In short, in this embodiment, the serial communication function is used to match the signal waveform of the serial communication to the waveform of the PWM signal.

[0025] Here, the transmission data TXD will be described using a specific example. As shown in FIG. 5, when transmitting transmission data 0xFH (30%) in a fixed-time process of 1 ms, first, the bit rate of the serial communication function is set (changed) to 1000 bps. Then, the transmission data TXD with a start bit of 0, data bits D0 to D7 of 00111111, and a stop bit of 1 is generated and set in the transmission data buffer register 260A for serial communication. When the communication timing of the serial communication according to the bit rate arrives, the transmission data TXD set in the transmission data buffer register 260A is sequentially output from the output port for serial communication in the order of 0, 0, 0, 1, 1, 1, 1, 1, 1 every 1 ms. Therefore, when viewed from the outside of the VVT ​​controller 250, it can be recognized that a PWM signal that is LOW (0) for the first 3 ms and HIGH (1) for the following 7 ms, that is, a PWM signal with a duty ratio of 30% is being output. From this, it can be understood that the PWM signal using the serial communication function has a resolution according to the transmission data buffer register 260A.

[0026] 6 shows an example of initialization processing executed by microcomputer 260 when VVT controller 250 is started. Note that microcomputer 260 of VVT controller 250 executes initialization processing according to an application program stored in advance in a non-volatile memory such as a flash ROM (Read Only Memory).

[0027] In step 10 (abbreviated as "S10" in FIG. 6, and the same applies below), microcomputer 260 of VVT controller 250 sets (changes) the bit rate of the serial communication function to a value corresponding to the transmission period of the PWM signal. By setting the bit rate of the serial communication, the transmission period of the PWM signal can be changed arbitrarily. Thereafter, microcomputer 260 of VVT controller 250 ends the initialization process.

[0028] 7 shows an example of a first signal output process that the microcomputer 260 executes at a PWM signal output period corresponding to the bit rate of the serial communication function after the VVT ​​controller 250 is started and initialization process is executed. The microcomputer 260 of the VVT ​​controller 250 executes the first signal output process according to an application program stored in advance in a non-volatile memory such as a flash ROM.

[0029] In step 20, the microcomputer 260 of the VVT ​​controller 250 obtains the diagnosis results from the self-diagnosis function. In step 21, microcomputer 260 of VVT controller 250 refers to a map (not shown) in which the diagnosis results correspond to the duty ratio, for example, and determines the duty ratio according to the diagnosis result.

[0030] In step 22, the microcomputer 260 of the VVT ​​controller 250 generates transmission data TXD including one stop bit, eight data bits D0 to D7 corresponding to the duty ratio, and one stop bit. For the method of generating the transmission data TXD, please refer to the above description.

[0031] In step 23, the microcomputer 260 of the VVT ​​controller 250 sets the transmission data TXD generated in step 22 in the transmission data buffer register 260A. Thereafter, the microcomputer 260 of the VVT ​​controller 250 ends the first signal output process in the current control cycle.

[0032] According to the initialization process and the first signal output process, the microcomputer 260 of the VVT ​​controller 250 sets the bit rate of the serial communication function, and then generates transmission data TXD from the diagnosis result of the self-diagnosis function for each output period of the PWM signal. Then, the microcomputer 260 of the VVT ​​controller 250 sets the generated transmission data TXD in the transmission data buffer register 260A for serial communication. The transmission data TXD set in the transmission data buffer register 260A is automatically transmitted bit by bit from the output port using the basic function of the serial communication function at a transmission timing according to the bit rate.

[0033] Since the output of the PWM signal using the serial communication function is not performed by a fixed-time process using the timer function of the microcomputer 260, for example, even if a high-priority interrupt process is executed preferentially, there is no delay, and the precision of the period can be kept constant. Although there is a restriction that the resolution of the duty ratio is limited, there is no influence of the high-priority interrupt process, and the precision can be kept constant. Furthermore, since the output of the PWM signal according to this embodiment uses the serial communication function inherent to the microcomputer 260, for example, even if the communication method is changed from a PWM signal to a serial communication signal, it can be handled without changing the hardware.

[0034] It is desirable to be able to output detailed failure information when the VVT ​​mechanism 100 or the VVT ​​controller 250 fails. For this reason, when a failure occurs, the microcomputer 260 of the VVT ​​controller 250 switches from outputting a PWM signal using the serial communication function to outputting a PWM signal for fixed-time processing using a timer function with high resolution, so that detailed failure information can be output. Note that when a failure occurs in the VVT ​​mechanism 100 or the VVT ​​controller 250, if a PWM signal is output with an output period that does not cause a problematic error in the duty ratio of the PWM signal, no serious problems will occur even if detailed failure information is output by fixed-time processing using the timer function.

[0035] 8 shows an example of an output switching process that switches the output method of the PWM signal, which is repeatedly executed by the microcomputer 260 at predetermined time intervals when the VVT ​​controller 250 is started. Note that, as a prerequisite for the output switching process, it is assumed that the microcomputer 260 of the VVT ​​controller 250 outputs a PWM signal using a serial communication function. Also, the microcomputer 260 of the VVT ​​controller 250 executes the output switching process according to an application program previously stored in a non-volatile memory such as a flash ROM.

[0036] In step 30, the microcomputer 260 of the VVT ​​controller 250 obtains the diagnosis results from the self-diagnosis function. In step 31, the microcomputer 260 of the VVT ​​controller 250 analyzes the diagnosis results obtained from the self-diagnosis function and diagnoses whether or not a malfunction has occurred in the VVT ​​mechanism 100 or the VVT ​​controller 250. If the microcomputer 260 of the VVT ​​controller 250 diagnoses that a malfunction has occurred (Yes), the process proceeds to step 32. On the other hand, if the microcomputer 260 of the VVT ​​controller 250 diagnoses that no malfunction has occurred (No), the output switching process for the current control cycle ends.

[0037] In step 32, the microcomputer 260 of the VVT ​​controller 250 determines whether or not the output of the PWM signal using the serial communication function has been completed. If the microcomputer 260 of the VVT ​​controller 250 determines that the output of the PWM signal has been completed (Yes), the process proceeds to step 33. On the other hand, if the microcomputer 260 of the VVT ​​controller 250 determines that the output of the PWM signal has not been completed (No), the process waits until the output of the PWM signal is completed. In short, in step 32, the process waits until the output of the PWM signal is completed to prevent the engine control module 200 from executing unexpected control due to the output of incomplete diagnostic information.

[0038] In step 33, the microcomputer 260 of the VVT ​​controller 250 selects a method for outputting detailed diagnostic information. Specifically, a map associated with the period of the regular processing and the number of information outputs is stored in advance in the non-volatile memory of the microcomputer 260 of the VVT ​​controller 250, as shown in FIG. 9. In the map shown in FIG. 9, the method of outputting a PWM signal using the serial communication function is represented as "output method A", and the method of outputting a PWM signal using the timer function is represented as "output method B". With reference to this map, it is shown that when the number of outputs is 9 or less, either output method A or B can be selected, and when the number of outputs is 10 or more, output method A can be selected only when the period of the regular processing is 11 or more. Then, the microcomputer 260 of the VVT ​​controller 250 selects an output method according to the period of the regular processing associated with the fault identified by the diagnostic information and the number of detailed fault information outputs, with reference to the map shown in FIG. 9. In the lower right range of the map shown in FIG. 9, both output methods A and B can be selected, but which one should be selected at the time of design can be determined in consideration of, for example, the resources of VVT controller 250.

[0039] In step 34, microcomputer 260 of VVT controller 250 compares the currently executed output method with the output method selected in step 33, and determines whether or not the output method needs to be switched. If microcomputer 260 of VVT controller 250 determines that the output method needs to be switched (Yes), it proceeds to step 35. On the other hand, if microcomputer 260 of VVT controller 250 determines that the output method does not need to be switched (No), it proceeds to step 36.

[0040] In step 35, the microcomputer 260 of the VVT ​​controller 250 switches from PWM signal output method B using the serial communication function to PWM signal output method A using the timer function. After that, the microcomputer 260 of the VVT ​​controller 250 ends the output switching process in the current control cycle. The details of the PWM signal output method A using the timer function will be described later.

[0041] In step 36, since the microcomputer 260 of the VVT ​​controller 250 does not need to switch the output method of the PWM signal, it resets the bit rate of the serial communication function as necessary. The bit rate of the serial communication function can be determined according to the number of outputs of detailed fault information associated with the fault identified by the diagnostic information. After that, the microcomputer 260 of the VVT ​​controller 250 ends the output switching process in the current control cycle.

[0042] According to this output switching process, when the occurrence of a fault is detected by the self-diagnosis function, the output method for outputting detailed fault information of the fault identified by the diagnostic information is selected after waiting for completion of output of the PWM signal using the serial communication function. Then, if it is necessary to switch the output method of the PWM signal, it is switched from output method B of the PWM signal using the serial communication function to output method A of the PWM signal using the timer function. Therefore, the number of fault information that can be output from the VVT ​​controller 250 to the engine control module 200 increases, and it is possible to easily identify, for example, which function has a fault. Also, if it is not necessary to switch the output method of the PWM signal, it is possible to change the number of fault information that can be output from the VVT ​​controller 250 to the engine control module 200 by resetting the bit rate of the serial communication function as necessary. Note that the switching from output of the PWM signal using the serial communication function to output of the PWM signal using the timer function may be performed not only in response to fault detection by the self-diagnosis function, but also in response to, for example, an instruction from the upper ECM 200.

[0043] 10 shows an example of second signal output processing that is executed as a regular processing by microcomputer 260 of VVT controller 250 when the output method of the PWM signal is switched from output method B to output method A in the output switching processing. Note that microcomputer 260 of VVT controller 250 executes the second signal output processing according to an application program stored in advance in a nonvolatile memory such as a flash ROM.

[0044] In step 40, the microcomputer 260 of the VVT ​​controller 250 determines whether the PWM counter stored in a volatile memory such as a RAM (Random Access Memory) is less than a predetermined number. Here, the predetermined number is the number of bits of data constituting the diagnostic information, and in the example shown in FIG. 5, for example, the predetermined number is 9. If the microcomputer 260 of the VVT ​​controller 250 determines that the PWM counter is less than the predetermined number (Yes), the process proceeds to step 41. On the other hand, if the microcomputer 260 of the VVT ​​controller 250 determines that the PWM counter is equal to or greater than the predetermined number (No), the process proceeds to step 42. The PWM counter is initialized to 0 when the second signal output process is started.

[0045] In step 41, the microcomputer 260 of the VVT ​​controller 250 increments the PWM counter, that is, increases the PWM counter by 1. Thereafter, the microcomputer 260 of the VVT ​​controller 250 advances the process to step 45.

[0046] In step 42, the microcomputer 260 of the VVT ​​controller 250 clears the PWM counter, in other words, sets the PWM counter to zero. In step 43, microcomputer 260 of VVT controller 250 obtains the diagnosis result from the self-diagnosis function and updates the duty value of the PWM signal representing the diagnosis information. To explain this with a specific example, if the resolution of the PWM signal representing the diagnosis information is 10% and its duty ratio is 30%, then the duty value is 30 / 10=3.

[0047] In step 44, the microcomputer 260 of the VVT ​​controller 250 changes the port level of the signal output from the output port of the PWM signal output circuit 290 using the serial communication function to LOW (0). Therefore, the VVT ​​controller 250 outputs LOW (0) as the PWM signal. After that, the microcomputer 260 of the VVT ​​controller 250 advances the process to step 45.

[0048] In step 45, microcomputer 260 of VVT controller 250 judges whether or not the PWM counter has reached the duty value. If microcomputer 260 of VVT controller 250 judges that the PWM counter has reached the duty value (Yes), it advances the process to step 46. On the other hand, if microcomputer 260 of VVT controller 250 judges that the PWM counter has not reached the duty ratio (No), it ends the second signal output process in the current control cycle.

[0049] In step 46, the microcomputer 260 of the VVT ​​controller 250 changes the port level of the signal output from the output port of the PWM signal output circuit 290 using the serial communication function to HIGH (1). Therefore, the VVT ​​controller 250 outputs HIGH (1) as the PWM signal. After that, the microcomputer 260 of the VVT ​​controller 250 ends the second signal output process in the current control cycle.

[0050] According to the second signal output process, as shown in Fig. 11, the PWM counter is successively counted up as the fixed-time process occurs, and the duty value is updated appropriately according to the fault information. At this time, in the initial state, the port level of the signal output from the output port of the output circuit 280 of the PWM signal using the serial communication function is LOW (0). Then, when the PWM counter reaches the duty value, the port level of the signal output from the output port of the output circuit 280 of the PWM signal using the serial communication function is changed to HIGH (1). Therefore, in the fixed-time process cycle, the PWM signal representing the fault information output from the VVT ​​controller 250 to the engine control module 200 first becomes LOW (0) for a time period corresponding to the duty value, and then becomes HIGH (1).

[0051] However, a PWM signal in which diagnostic information is assigned to a duty ratio limits the amount of information that can be output from VVT controller 250. Therefore, as shown in Fig. 12, it is desirable to detachably connect tester 300 to VVT controller 250 via a CAN, for example, and make it possible to refer to various parameters and detailed fault information stored in the volatile memory by the procedure described below.

[0052] First, an operator who wishes to refer to detailed fault information operates tester 300 to output a switching signal for switching the fault information output mode from tester 300 to VVT controller 250. This switching signal can be input to VVT controller 250 via, for example, a PWM signal input circuit 270 using a timer function. Upon receiving the switching signal, microcomputer 260 of VVT controller 250 transmits various parameters and detailed fault information stored in its volatile memory to tester 300 by a serial communication signal using the serial communication function.

[0053] In this way, it becomes possible to use tester 300 to refer to various parameters stored in the volatile memory of microcomputer 260 of VVT controller 250, enabling more detailed failure analysis to be performed.

[0054] Furthermore, a person skilled in the art will easily understand that new embodiments can be created by omitting parts of the technical ideas of the various above-mentioned embodiments, combining parts of them appropriately, or replacing parts of them with well-known technology.

[0055] As one example, the present embodiment is not limited to the VVT ​​controller 250 that controls the VVT ​​mechanism 100, but can also be applied to well-known controllers such as the engine control module 200, an automatic transmission controller, an ABS (Anti-lock Brake System) controller, etc. Also, the VVT ​​mechanism 100 is not limited to the one configured as shown in FIG. 2, and may be any well-known VVT mechanism. [Explanation of symbols]

[0056] 250...VVT controller (electronic control device) 260...Microcomputer 260A...Transmission data buffer register (transmission register) 290...PWM signal output circuit using serial communication function

Claims

1. An electronic control device that outputs a pulse width modulation signal at predetermined intervals by a microcomputer having a serial communication function, The microcomputer is configured to set a bit rate of the serial communication function corresponding to the predetermined period, set data corresponding to the pulse width modulation signal in a transmission register of the serial communication function and output the data, and when a self-diagnosis function diagnoses that a failure has occurred or when an instruction is received from an external device, switch from outputting the pulse width modulation signal using the serial communication function to outputting the pulse width modulation signal using a timer function. Electronic control unit.

2. The microcomputer is configured to output a pulse width modulated signal corresponding to data stored in the volatile memory in response to an instruction from an external device. The electronic control device according to claim 1 .

3. the pulse width modulation signal using the serial communication function has a resolution according to a transmission register of the serial communication function; The electronic control device according to claim 1 or 2.

Citation Information

Patent Citations

  • Method and device for transmitting and receiving data

    JP2002314620A

  • Two-wire system transmitter

    JP2004355101A

  • Method for transmitting and receiving data and apparatus for transmitting and receiving data

    JP2005160119A

  • PWM communication system

    JP2012004815A

  • Data processing circuit and data transmission system

    JP2018050264A