Method and microcontroller for driving in system programming

By receiving and setting the system programming flag using driver code and detecting it, the problem of additional hardware and latency required to start the ISP function in existing technologies is solved, enabling fast and flexible ISP control.

CN116643510BActive Publication Date: 2026-01-23NUVOTON
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210534994.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-02-16
Filing Date
2022-05-17
Publication Date
2026-01-23
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

Existing in-system programming methods require additional buttons, jumpers, or test points, cannot change the ISP execution state at any time, and require additional waiting time to detect connectivity requirements, resulting in boot delays.

Method used

By receiving the driver code, setting the system programming flag, detecting the flag, performing a system reset, and determining whether to execute the system programming program after the reset is completed, the automatic detection and control of the ISP function is achieved using the communication processing unit and the reset circuit.

Benefits of technology

It enables quick ISP startup without additional hardware, avoids boot delays, and supports changing the ISP execution status at any time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116643510B_ABST
    Figure CN116643510B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and a microcontroller for driving in-system programming, which comprises the following steps: receiving a group of driving codes; setting an in-system programming flag according to the driving codes; executing a system reset after the setting of the in-system programming flag is completed; detecting whether the in-system programming flag exists after the system reset is completed; and executing an in-system programming program when the in-system programming flag is detected. The method and the microcontroller for driving in-system programming provided by the embodiment of the present application do not affect the boot time, do not need additional circuits, and do not affect the ISP function of user function operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to methods for in-system programming, and more particularly to methods for driving in-system programming and microcontrollers. Background Technology

[0002] Existing methods for enabling in-system programming (ISP) include: Method 1, using a specific high or low level on an input / output pin to determine whether to enable ISP; Method 2, using power-on options recorded in non-volatile memory to determine whether to enable ISP; and Method 3, detecting whether a connection request has been received and using a timeout mechanism to determine whether to enable ISP.

[0003] However, the existing Method 1 requires the design of additional buttons, jumpers, or test points. The existing Method 2 is not easy to implement regarding ISP changes and cannot be changed at any time. In the existing Method 3, additional waiting and detection time is required to check for ISP connection needs, causing boot delays. Summary of the Invention

[0004] In a first aspect, embodiments of the present invention provide a method for driving in-system programming, comprising: receiving a set of driver codes; setting an in-system programming flag based on the driver codes; performing a system reset after the in-system programming flag is set; detecting whether there is an in-system programming flag after the system reset is completed; and executing an in-system programming program when the in-system programming flag is detected.

[0005] Furthermore, the method for driving in-system programming provided in this embodiment of the invention further includes: executing a normal boot procedure when no in-system programming flag is detected.

[0006] Furthermore, the step of setting the system programming flag based on the driver code includes: checking whether the received driver code matches at least one verification code; and setting the system programming flag when the received driver code matches the at least one verification code.

[0007] Further, the step of setting the system programming flag based on the driver code, the second driver code, and the third driver code includes: checking whether the received driver code matches at least one verification code; incrementing a counter value by one when the received driver code matches at least one verification code; checking whether the received second driver code matches at least one verification code; incrementing the counter value by one when the received second driver code matches at least one verification code; checking whether the received third driver code matches at least one verification code; incrementing the counter value by one when the received third driver code matches at least one verification code; and setting the system programming flag when the counter value equals a preset value.

[0008] Furthermore, the method for driving in-system programming provided in this embodiment of the invention further includes: setting a reset delay time after the in-system programming flag is set; and performing a system reset after waiting for the reset delay time.

[0009] Secondly, embodiments of the present invention provide a microcontroller for executing the method for driving in-system programming as described in any of the above embodiments, comprising: a communication processing unit. The communication processing unit includes a buffer, a reset circuit, and an execution unit. The buffer receives a set of driving codes. The reset circuit is configured to perform the following: setting an in-system programming flag based on the driving codes; and resetting the microcontroller after the in-system programming flag is set. The execution unit is configured to perform the following: detecting whether an in-system programming flag exists after the microcontroller is reset; and executing an in-system programming program when the in-system programming flag is detected.

[0010] Furthermore, if the execution unit does not detect the in-system programming flag, it executes a normal boot procedure.

[0011] Furthermore, the reset circuit checks whether the received driver code matches at least one verification code; and when the received driver code matches at least one verification code, the reset circuit sets the system programming flag.

[0012] Furthermore, the communication processing unit includes a matching counter for storing a count value.

[0013] Furthermore, the reset circuit checks whether the received drive code matches at least one verification code; if the received drive code matches at least one verification code, the matching counter increments its count by one; the reset circuit checks whether the received second drive code matches the at least one verification code; if the received second drive code matches at least one verification code, the matching counter increments its count by one; the reset circuit checks whether the received third drive code matches at least one verification code; if the received third drive code matches at least one verification code, the matching counter increments its count by one; and when the count of the matching counter equals a preset value, the reset circuit sets the system programming flag.

[0014] Furthermore, after the system programming flag is set, the reset circuit sets a reset delay time; and after waiting for the reset delay time, the reset circuit then executes the microcontroller reset. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating a method for driving in-system programming according to an embodiment of the present invention.

[0017] Figure 2 This is a schematic diagram of the structure of the microcontroller 200 according to an embodiment of the present invention.

[0018] Figure 3 This is a schematic diagram of the structure of the microcontroller 300 according to an embodiment of the present invention.

[0019] Explanation of reference numerals in the attached figures:

[0020] 200: Microcontroller

[0021] 202: Communication Processing Unit

[0022] 204: In-system programming driver circuit

[0023] 206: Buffer

[0024] 208: Reset Circuit

[0025] 210: Execution Unit

[0026] 212: Communication Protocol Line

[0027] 300: Microcontroller

[0028] 302: Communication Processing Unit

[0029] 304: In-system programming driver circuit

[0030] 306: Buffer

[0031] 308: Reset Circuit

[0032] 310: Execution Unit

[0033] 312: Communication Protocol Line

[0034] 314: Match Counter Detailed Implementation

[0035] This invention is described with reference to the accompanying drawings, wherein similar or identical reference numerals throughout the drawings denote similar or identical elements. The drawings are not depicted to actual scale and are merely illustrative of the invention. Some anatomical forms of the invention are described below as illustrative examples. This means that many specific details, relationships, and methods are set forth to provide a complete description of the invention. However, those skilled in the art will recognize that this invention can still be made without one or more specific details or by other means.

[0036] In other examples, well-known structures or operations are not detailed to avoid confusion with the invention. The invention is not limited to the order of the described actions or events, as some actions may occur in a different order or simultaneously with other actions or events. Furthermore, not all described actions or events need to be performed in the same manner as in prior art.

[0037] Figure 1 This is a flowchart illustrating a method for driving in-system programming according to an embodiment of the present invention. Figure 1 As shown, the driver-in-system programming method of the present invention includes: receiving a set of driver codes (step S100); setting an in-system programming flag according to the driver codes (step S102); performing a system reset after the in-system programming flag is set (step S104); detecting whether there is an in-system programming flag after the system reset is completed (step S106); and executing an in-system programming program when the in-system programming flag is detected (step S108). In some embodiments, when no in-system programming flag is detected in step S106, the driver-in-system programming method of the present invention executes step S110, that is, executes a normal boot procedure. If the driver-in-system programming method of the present invention receives another set of driver codes again during the normal boot procedure, the method of the present invention will return to step S100 and execute steps S102 to S106 in sequence.

[0038] In step S100, the driver code is, for example, a driver code with 16 bits, such as (a2 d3 0946 dc 4c ad 66), but the present invention is not limited thereto. In some embodiments, the method of the present invention receives the driver code in step S100 via a communication protocol. The communication protocol includes the Universal Asynchronous Receiver / Transmitter (UART) protocol, the Inter-Integrated Circuit (I2C) protocol, the Serial Peripheral Interface Bus (SPI) protocol, and the Controller Area Network (CAN) protocol, but the present invention is not limited thereto.

[0039] In step S102, the in-system programming method of the present invention first checks whether the received driver code matches at least one verification code. If the received driver code matches at least one verification code, a system programming flag is set. For example, suppose that all verification codes in the method of the present invention include a set of 16-bit codes (a2 d3 09 46 dc 4cad 66), which is the same as the driver code received in step S100; therefore, the method of the present invention sets the system programming flag. In some embodiments, the in-system programming flag is set in a register. For example, when the method of the present invention has not yet set the system programming flag, the data in the register is 0. When the method of the present invention has already set the system programming flag, the data in the register is 1. The present invention uses only a 1-bit register as an example, but the present invention does not limit the number of bits in the register.

[0040] In some embodiments, the method of the present invention receives more than one set of driver codes in step S100. For example, the method of the present invention sequentially receives driver code (a2 d3 09 46 dc 4c ad 66), driver code (7e 95c2 e8 9e 06 4409), and driver code (74 4f 51 a5 26 91 b4 0a). Therefore, in step S102, the method of the present invention sets the system programming flag according to the driver code (a2 d3 09 46 dc 4c ad 66), driver code (7e 95 c2 e8 9e 06 44 09), and driver code (744f 51 a5 26 91 b4 0a). In detail, when the method of the present invention receives the driving code (a2 d3 09 46 dc 4c ad 66), the method first checks whether the received driving code (a2 d3 09 46 dc4c ad 66) matches at least one verification code. If at least one set of verification codes matches the driving code (a2 d3 09 46 dc 4c ad 66), the method increments a count value by one. If no at least one set of verification codes matches the driving code (a2 d3 09 46 dc 4c ad 66), the method resets the count value to zero. In some embodiments, the count value is stored in a counter, but the present invention is not limited thereto.

[0041] Next, when the method of the present invention receives the drive code (7e 95 c2 e8 9e 06 44 09), the method of the present invention checks again whether the received drive code (7e 95 c2 e8 9e 06 44 09) matches at least one verification code. If at least one set of verification codes matches the drive code (7e 95 c2 e8 9e 06 44 09), the method of the present invention increments the count value by one. If no at least one set of verification codes matches the drive code (7e 95 c2 e8 9e 0644 09), the method of the present invention resets the count value to zero. Similarly, when the method of the present invention receives the drive code (744f 51 a5 26 91 b4 0a), the method of the present invention checks again whether the received drive code (74 4f 51 a5 26 91 b40a) matches at least one verification code. If at least one set of verification codes matches the driving code (74 4f 51a5 26 91 b4 0a), the method of this invention increments the count value by one. If no set of verification codes matches the driving code (74 4f 51 a5 26 91 b4 0a), the method of this invention resets the count value to zero.

[0042] In some embodiments, the method of the present invention sets the system programming flag only when the count value equals a preset value (e.g., the count value equals 3). Simply put, the method of the present invention must continuously receive three drive codes that match the verification code in step S100 before setting the system programming flag in step S102. Conversely, if the method of the present invention does not continuously receive three drive codes that match the verification code, the method of the present invention resets the count value to zero and does not set the system programming flag in step S102. For example, although the method of the present invention continuously receives the driver code (a2 d3 0946 dc 4c ad 66), the driver code (7e 95 c2 e8 9e 06 44 09), and the driver code (74 4f 51 a5 26 91b4 0a), the driver code (74 4f 51 a5 26 91b4 0a) does not match the verification code. Therefore, the method of the present invention will not set the system programming flag in step S102 until three more driver codes that match the verification code are received consecutively.

[0043] In step S104, in some embodiments, the method of the present invention sets a reset delay time after the system programming flag is set. The method of the present invention performs a system reset only after the reset delay time has elapsed. For example, the method of the present invention may set a reset delay time of 3 seconds in step S104. Therefore, after the method of the present invention completes the setting of the system programming flag, it will first wait for a 3-second reset delay time before performing a system reset.

[0044] In step S106, when the method of the present invention detects the in-system programming flag set before the system reset, the method of the present invention executes an in-system programming program in step S108. In some embodiments, in the in-system programming program, the method of the present invention can transmit the program code to be programmed through a communication protocol to a communication processing unit, and the communication processing unit can execute the program code accordingly to complete the in-system programming program. In step S106, when the method of the present invention does not detect the in-system programming flag set before the system reset, the method of the present invention executes a normal boot procedure in step S110. In the normal boot procedure, the method of the present invention will only return to step S100 and execute steps S102 to S106 accordingly if the driver code is received again; otherwise, the method of the present invention will remain in the normal boot procedure in step S110. In some embodiments, the method of the present invention executes the program code in the system's read-only memory in the normal boot procedure. When the method of the present invention is executing the program code in the system's read-only memory, the method of the present invention can detect the in-system programming flag.

[0045] Figure 2This is a schematic diagram of the structure of the microcontroller 200 according to an embodiment of the present invention. Figure 2 As shown, the microcontroller 200 includes a communication processing unit 202 and an in-system programming (ISP) driver circuit 204. In some embodiments, the communication processing unit 202 supports at least one of a plurality of communication protocols. For example, the plurality of communication protocols may include UART, I2C, SPI, and CAN, but the invention is not limited thereto. The communication processing unit 202 includes a buffer 206, a reset circuit 208, and an execution unit 210. In some embodiments, the buffer 206 receives a set of driver codes from the ISP driver circuit 204. The buffer 206 is, for example, a first-in, first-out (FIFO) buffer, but the invention is not limited thereto. In some embodiments, the buffer 206 receives a set of driver codes from the receiving ISP driver circuit 204 via a communication protocol line 212. The communication protocol supported by the communication protocol line 212 is the same as the communication protocol supported by the communication processing unit 202, such as UART, I2C, SPI, and CAN, etc.

[0046] The reset circuit 208 sets an in-system programming flag based on the driver code. After the in-system programming flag is set, the reset circuit 208 performs a reset of the microcontroller 200. Specifically, the reset circuit 208 checks whether the received driver code matches at least one verification code. When the received driver code matches at least one verification code, the reset circuit 208 sets the system programming flag. In some embodiments, the reset circuit 208 sets the system programming flag in a register (not shown), but the invention is not limited thereto. In some embodiments, after the reset circuit 208 completes the setting of the in-system programming flag, the reset circuit 208 may set a reset delay time. The reset circuit 208 performs a reset of the microcontroller 200 only after waiting for the reset delay time.

[0047] After the microcontroller 200 is reset, the execution unit 210 then checks for an in-system programming flag. When the in-system programming flag is detected, the execution unit 210 executes an in-system programming program. In the in-system programming program, the in-system programming driver circuit 204 can write the program code to be programmed into the communication processing unit 202 via the communication protocol line 212. The execution unit 210 of the communication processing unit 202 can then execute the program code accordingly to complete the in-system programming program. In some embodiments, when the execution unit 210 does not detect the in-system programming flag, the execution unit 210 executes a normal boot procedure. In the normal boot procedure, the execution unit 210 remains in the normal boot procedure unless the buffer 206 receives another driver code. In some embodiments, the execution unit 210 executes the program code in the read-only memory (not shown) of the microcontroller 200 in the normal boot procedure. While the execution unit 210 is executing the program code in the read-only memory of the microcontroller 200, the execution unit 210 can detect the in-system programming flag.

[0048] Figure 3 This is a schematic diagram of the microcontroller 300 according to an embodiment of the present invention. Figure 3 As shown, the microcontroller 300 includes a communication processing unit 302 and an in-system programming (ISP) driver circuit 304. In some embodiments, the communication processing unit 302 supports at least one of a plurality of communication protocols. For example, the plurality of communication protocols may include UART, I2C, SPI, and CAN, but the invention is not limited thereto. The communication processing unit 302 includes a buffer 306, a reset circuit 308, an execution unit 310, and a match counter 314. In some embodiments, the buffer 306 receives multiple sets of driver codes from the ISP driver circuit 304. The buffer 306 may be, for example, a first-in-first-out buffer, but the invention is not limited thereto. In some embodiments, the buffer 306 receives multiple sets of driver codes from the receiving ISP driver circuit 204 via a communication protocol line 312. The communication protocol supported by the communication protocol line 312 is the same as the communication protocol supported by the communication processing unit 302, such as UART, I2C, SPI, and CAN, etc.

[0049] For example, buffer 306 receives drive codes (a2 d3 09 46 dc 4c ad 66), (7e 95c2 e8 9e 06 44 09), and (74 4f 51 a5 26 91 b4 0a). Therefore, reset circuit 308 sets the system programming flag based on the drive codes (a2 d3 09 46 dc 4c ad 66), (7e 95 c2 e8 9e 06 44 09), and (744f 51 a5 26 91 b4 0a). In detail, when buffer 306 receives the drive code (a2d3 09 46 dc 4c ad 66), reset circuit 308 first checks whether the received drive code (a2 d3 09 46 dc 4c ad 66) matches at least one verification code. If at least one verification code matches the drive code (a2 d3 0946 dc 4c ad 66), the match counter 314 increments its count. If no verification code matches the drive code (a2 d3 09 46 dc 4c ad 66), the match counter 314 resets its count to zero.

[0050] Next, when buffer 306 receives the drive code (7e 95 c2 e8 9e 06 44 09), reset circuit 308 checks again whether the received drive code (7e 95 c2 e8 9e 06 44 09) matches at least one verification code. If at least one set of verification codes matches the drive code (7e 95 c2 e8 9e 06 44 09), the match counter 314 increments its count. If no set of verification codes matches the drive code (7e 95 c2 e8 9e 06 44 09), the match counter 314 resets its count to zero. Similarly, when buffer 306 receives the drive code (74 4f 51a5 26 91 b4 0a), reset circuit 308 checks again whether the received drive code (74 4f 51a5 26 91 b4 0a) matches at least one verification code. If at least one set of verification codes matches the drive code (74 4f 51a5 26 91 b4 0a), the match counter 314 increments its count. If no set of verification codes matches the drive code (74 4f 51a5 26 91 b4 0a), the match counter 314 resets its count to zero.

[0051] In some embodiments, the reset circuit 308 is set to the system programming flag only when the count value in the match counter 314 equals a preset value (e.g., the count value equals 3). Simply put, the buffer 306 must continuously receive three sets of drive codes that match the verification code for the reset circuit 308 to be set to the system programming flag. Conversely, if the buffer 306 does not continuously receive three sets of drive codes that match the verification code, the match counter 314 will reset its count value to zero, preventing the reset circuit 308 from being set to the system programming flag. For example, although buffer 306 continuously receives drive codes (a2 d3 09 46 dc4c ad 66), drive codes (7e 95 c2 e8 9e 06 44 09), and drive codes (74 4f 51 a5 26 91 b40a), the drive code (74 4f 51 a5 26 91 b4 0a) does not match the verification code. Therefore, reset circuit 308 will not set the system programming flag until buffer 306 continuously receives three more sets of drive codes that match the verification code.

[0052] Figure 3 The actions performed by buffer 306, reset circuit 308, and execution unit 310 are the same as those performed by buffer 306, reset circuit 308, and execution unit 310. Figure 2 The actions performed by buffer 206, reset circuit 208, and execution unit 210 are therefore not described in detail. In some embodiments, execution unit 310 executes program code in the read-only memory (not shown) of microcontroller 300 during the normal boot process. While execution unit 310 is executing program code in the read-only memory of microcontroller 300, execution unit 310 can continuously detect the in-system programming flag. In some embodiments, execution unit 310 is typically an in-system programming (ISP) functional structure (not shown) and a Universal Asynchronous Receiver / Transmitter (UART) protocol functional structure (not shown) in microcontroller 300, but the invention is not limited thereto.

[0053] In the mechanism for detecting in-system programming (ISP) flags, monitoring can be performed through software or hardware. For example, all data received by the system must pass through the detection software before being processed by the system, or the received data can be simultaneously transmitted to both the detection software and the system. Regarding hardware detection, this invention can detect the receive buffer of peripheral devices at any time; if data conforming to the rules appears, an ISP reset can be directly triggered. This invention provides a method for driving in-system programming and a microcontroller that does not affect boot time, requires no additional circuitry, or interfere with user operation, thus enabling ISP function startup.

[0054] While the present invention is implemented as described above, it should be understood that what is presented above are merely examples and not limitations. Many modifications to the above exemplary embodiments can be made without departing from the spirit and scope of the invention. Therefore, the breadth and scope of the present invention should not be limited by the embodiments described above. Rather, the scope of the present invention should be defined by the claims of this application and their equivalents.

[0055] Although the invention described above has been illustrated and depicted by one or more related steps, equivalent changes and modifications will be conceived by those skilled in the art based on the above specifications and drawings. Furthermore, while a particular feature of an embodiment of the invention has been demonstrated by one of the related steps, such feature may be combined with one or more other features to suit any known or particular application.

[0056] Unless otherwise defined, all terms used herein (including technical or scientific terms) are to be understood by one of ordinary skill in the art. It should be further understood that the terms used herein, as defined in commonly used dictionaries, should be interpreted in the context of the relevant art. Unless explicitly defined herein, the terms used herein should not be construed as idealized or overly formal.

Claims

1. A method for driving in-system programming, characterized in that, include: Receive a set of driver codes; Based on whether the set of driver codes matches at least one verification code, set an in-system programming flag; After the system programming flag is set, a system reset is performed; After the system reset is complete, check whether the in-system programming flag is present; as well as When the in-system programming flag is detected, an in-system programming procedure is executed; The step of setting an in-system programming flag based on whether the set of driver codes matches at least one verification code includes: If at least one set of verification codes matches the driving code, increment the counter by one; if no set of verification codes matches the driving code, reset the counter to zero.

2. The method as described in claim 1, characterized in that, Also includes: If the in-system programming flag is not detected, execute a normal boot procedure.

3. The method as described in claim 1, characterized in that, The step of setting an in-system programming flag based on whether the set of driver codes matches the at least one verification code includes: Check whether a first driver code in the received set of driver codes matches at least one verification code; and When the first driver code in the received set of driver codes matches the at least one verification code, the in-system programming flag is set.

4. The method as described in claim 1, characterized in that, The step of setting the in-system programming flag based on whether the set of driver codes matches the at least one verification code includes: Check whether a first driver code in the received set of driver codes matches the at least one verification code; When the first driver code in the received driver code set matches the at least one verification code, a count value is incremented by one. Check whether a second driver code in the received set of driver codes matches the at least one verification code; When the second driver code in the received driver code set matches the at least one verification code, the count value is incremented by one; Check whether a third driver code in the received set of driver codes matches the at least one verification code; When the third driver code in the received driver code set matches the at least one verification code, the count value is incremented by one; and When the count value equals a preset value, the in-system programming flag is set.

5. The method as described in claim 1, characterized in that, Also includes: After the system programming flag is set, a reset delay time is set; as well as After waiting for the reset delay time, the system reset will be performed.

6. A microcontroller for performing the method for driving in-system programming as described in any one of claims 1 to 5, characterized in that, include: A communication processing unit, comprising: A buffer receives a set of drive codes; A reset circuit is configured to perform the following actions: setting an in-system programming flag based on whether the set of driver codes matches at least one verification code; and resetting the microcontroller after the in-system programming flag is set. An execution unit is configured to perform the following: after the microcontroller reset is completed, detect whether the in-system programming flag is present; and when the in-system programming flag is detected, execute an in-system programming program; The step of setting an in-system programming flag based on whether the set of driver codes matches at least one verification code includes: If at least one set of verification codes matches the driving code, increment the counter by one; if no set of verification codes matches the driving code, reset the counter to zero.

7. The microcontroller as described in claim 6, characterized in that, If the execution unit does not detect the in-system programming flag, the execution unit executes a normal boot procedure.

8. The microcontroller as claimed in claim 6, characterized in that, Also includes: The reset circuit checks whether a first driver code in the received set of driver codes matches the at least one verification code. as well as When the first driver code in the received set of driver codes matches the at least one verification code, the reset circuit sets the in-system programming flag.

9. The microcontroller as described in claim 6, characterized in that, The communication processing unit further includes a matching counter for storing a count value.

10. The microcontroller as described in claim 9, characterized in that, Also includes: The reset circuit checks whether a first driver code in the received set of driver codes matches the at least one verification code. When the first driver code in the received driver code set matches the at least one verification code, the matching counter increments the count value by one. The reset circuit checks whether a second driving code in the received set of driving codes matches the at least one verification code; When the second driver code in the received driver code set matches the at least one verification code, the matching counter increments the count value by one. The reset circuit checks whether a third driving code in the received set of driving codes matches the at least one verification code. When the third driver code in the received driver code group matches the at least one verification code, the matching counter increments the count value by one. as well as When the count value of the matching counter is equal to a preset value, the reset circuit sets the in-system programming flag.

11. The microcontroller as claimed in claim 6, characterized in that, Also includes: After the system programming flag is set, the reset circuit is set with a reset delay time; as well as After waiting for the reset delay time, the reset circuit then performs the reset of the microcontroller.

Citation Information

Patent Citations

  • Online upgrading method and online upgrading system

    CN104423984A

  • Updating and recovering system for booting program and method thereof

    TWI220226B