Serial port burning circuit
By collaborating with the conversion module and serial communication module in the serial programming circuit, the MCU module can be conveniently switched between programming and working states, solving the problems of complexity and low efficiency in traditional serial programming operations, and improving the stability and efficiency of programming.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional serial port programming methods are complex to operate, inefficient, and inconvenient to switch between programming and normal working states, which can easily lead to errors or equipment damage.
Design a serial port programming circuit, including an MCU module, a serial communication module, and a conversion module. Through the cooperation of the conversion module and the serial communication module, the MCU module can be conveniently switched between programming state and working state. The pin levels of the MCU are precisely controlled by switching components and pull-up and pull-down elements to ensure the stability and accuracy of signal transmission.
It enables convenient switching between burning mode and working mode, improves the stability and security of burning, reduces the probability of errors, and improves burning efficiency.
Smart Images

Figure CN223986318U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of serial port programming technology, and in particular to a serial port programming circuit. Background Technology
[0002] In the development and production of electronic devices, it is often necessary to program microcontroller units (MCUs). Traditional programming methods suffer from problems such as complex operation, low programming efficiency, and inconvenience in switching between programming and normal operation states, which can easily lead to programming errors or equipment damage. Utility Model Content
[0003] The purpose of this invention is to overcome the shortcomings of the existing technology, such as complex serial port programming operation and low programming efficiency, and to provide a serial port programming circuit.
[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0005] This utility model embodiment provides a serial port programming circuit, including: an MCU module, a serial communication module, and a conversion module;
[0006] The two ends of the conversion module are respectively connected to the serial communication module and the MCU module; the serial communication module is also connected to the MCU module;
[0007] The conversion module is used to control the MCU module to switch between the programming state and the working state;
[0008] The serial communication module is used to receive control signals from an external communication interface to control the conversion module according to the control signals, and to transmit programming information to the MCU module in the programming state.
[0009] In one embodiment, the serial communication module has a first control pin, a second control pin, and a first communication pin; the MCU module has an MCU reset pin, a mode conversion pin, and a second communication pin; one end of the conversion module is connected to the first control pin and the second control pin, and the other end is connected to the MCU reset pin and the mode conversion pin; the first communication pin is connected to the second communication pin.
[0010] In one embodiment, the conversion module includes a first switch component, a second switch component, a first level pull-up element, a second level pull-up element, and a level pull-down element; the first end of the first switch component is connected to the first control pin, the second end is connected to the second control pin, and the third end is connected to the MCU reset pin and the first level pull-up element; the first end of the second switch component is connected to the second control pin, the second end is grounded, and the third end is connected to the mode conversion pin, the second level pull-up element, and the level pull-down element.
[0011] In one embodiment, both the first switching assembly and the second switching assembly include a switching transistor; the first terminal of the switching transistor is a control terminal; the second terminal of the switching transistor is a low-potential terminal; and the third terminal of the switching transistor is a high-potential terminal.
[0012] In one embodiment, the control terminal is provided with a first current-limiting resistor, which is connected to the first control pin or the second control pin and to one end of a clamping diode, the other end of which is connected to the low potential terminal.
[0013] In one embodiment, the end of the first pull-up element away from the first switch assembly and the end of the second pull-up element away from the second switch assembly are both connected to a first power supply.
[0014] In one embodiment, the conversion module further includes a circuit protection component, one end of which is connected to the second control pin and the other end of which is connected to the first power supply.
[0015] In one embodiment, the circuit protection component includes a second current-limiting resistor and a diode, wherein the cathode of the diode is connected to the second control pin, the anode is connected to one end of the second current-limiting resistor, and the other end of the second current-limiting resistor is connected to the first power supply.
[0016] In one embodiment, the serial communication module is also connected to a power-on reset component.
[0017] In one embodiment, the serial communication module further includes a power supply pin and a serial port reset pin. The power-on reset component includes a third-level pull-up element and a filter capacitor. One end of the third-level pull-up element is connected to the power supply pin, and the other end is connected to one end of the filter capacitor and the serial port reset pin. The other end of the filter capacitor is grounded.
[0018] Compared with the prior art, the beneficial effects of the serial port programming circuit of this utility model are: through the division of labor and cooperation between the conversion module and the serial communication module, the programming state and the working state can be conveniently switched, eliminating the need for manual manipulation of the pins with pliers to change the circuit state, thus improving the stability and security of programming and increasing programming efficiency.
[0019] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this utility model, 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 this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the serial port programming circuit provided by this utility model. Attached Figure Description
[0023] 1. MCU module; 2. Serial communication module; 3. Conversion module. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this utility model clearer, the present utility model will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0025] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present utility model.
[0026] In the description of this utility model, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this utility model and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this utility model.
[0027] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this utility model, "a plurality of" means two or more, unless otherwise explicitly specified.
[0028] In this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.
[0029] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0030] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. The illustrative expressions of the above terms in this specification should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0031] See Figure 1 As shown, this utility model provides a specific embodiment of a serial port programming circuit, including: an MCU module 1, a serial communication module 2, and a conversion module 3;
[0032] The two ends of the conversion module 3 are connected to the serial communication module 2 and the MCU module 1, respectively; the serial communication module 2 is also connected to the MCU module 1;
[0033] The conversion module 3 is used to control the MCU module 1 to switch between the programming state and the working state;
[0034] The serial communication module 2 is used to receive control signals from the external communication interface to control the conversion module 3 according to the control signals, and to transmit programming information to the MCU module 1 which is in the programming state.
[0035] Specifically, the external communication interface is a USB port for connecting to a computer device. When the computer device sends a control signal via USB, the serial communication module 2 receives the signal and then controls the conversion module 3 accordingly. The conversion module 3 then switches the MCU module 1 to the programming state. At this time, the serial communication module 2 transmits the programming information from the computer device to the MCU module 1 in the programming state, completing the programming operation. After programming is complete, the computer device sends a programming completion control signal to the serial communication module 2 via USB. The serial communication module 2 then controls the conversion module 3 to switch the MCU module 1 back to the working state. This circuit structure design allows the programming operation to proceed in an orderly manner. Through the division of labor and cooperation between the conversion module 3 and the serial communication module 2, convenient switching between the programming state and the working state is achieved, eliminating the need for manual manipulation of pins with pliers to change the circuit state. This improves the stability and safety of programming and increases programming efficiency.
[0036] In one specific embodiment, the serial communication module 2 is provided with a first control pin, a second control pin, and a first communication pin; the MCU module 1 is provided with an MCU reset pin, a mode conversion pin, and a second communication pin; one end of the conversion module 3 is connected to the first control pin and the second control pin, and the other end is connected to the MCU reset pin and the mode conversion pin; the first communication pin is connected to the second communication pin.
[0037] Specifically, by clearly defining the pin settings and connection relationships between the serial communication module 2 and the MCU module 1, a channel for signal transmission and status control is established. This design allows control signals to be accurately transmitted from the serial communication module 2 to the conversion module 3, thereby controlling the working state of the MCU module 1. Simultaneously, it ensures the accurate transmission of programming information between the two modules, forming the fundamental connection architecture for achieving efficient and stable operation of the entire circuit. When the serial communication module 2 receives an external control signal, it outputs the signal to the conversion module 3 using the first and second control pins. The conversion module 3, based on the received signal state, switches the working state of the MCU module 1 through connections to the MCU reset pin and mode conversion pin, such as putting the MCU module 1 into programming mode or normal operation mode. During programming, the first and second communication pins are responsible for transmitting programming information between the serial communication module 2 and the MCU module 1, ensuring smooth programming operations. This pin connection method clearly defines the signal flow, the logic of collaborative work between modules is clear, effectively reducing signal interference, greatly improving the reliability and stability of the programming circuit, and ensuring the accuracy of switching between programming and operating states and the transmission of programming information.
[0038] More specifically, the serial communication module 2 includes a serial communication chip U13, with a first control pin, a second control pin, and a first communication pin all located on the serial communication chip U13. The first control pin is the DTR pin 15 of the serial communication chip U13, the mode conversion pin is the RTS pin 11 of the serial communication chip U13, and the first communication pin is the RXD-SCI pin 20 and the TXD-SCI pin 21 of the serial communication chip U13. The MCU module 1 includes an MCU chip U5, with an MCU reset pin, a mode conversion pin, and a second communication pin all located on the MCU chip U5. The MCU reset pin is the RESET pin 14 of the MCU chip U5, the mode conversion pin is the BOOT0 pin 94 of the MCU chip U5, and the second communication pin is the UART-TX pin 30 and the UART-RX pin 29 of the MCU chip U5. The RXD-SCI pin 20 of the serial communication chip U13 is connected to the UART-TX pin 30 of the MCU chip U5, and the TXD-SCI pin 21 of the serial communication chip U13 is connected to the UART-RX pin 29 of the MCU chip U5.
[0039] When an external control signal is input to the serial communication chip U13, the serial communication chip U13 outputs the control signal to the conversion module 3 through the DTR pin 15 and the RTS pin 11. Based on these signals, the conversion module 3 adjusts the levels of the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5, putting the MCU chip U5 into the programming state. During the programming process, the TXD-SCI pin 21 of the serial communication chip U13 first sends programming information to the UART-RX pin 29 of the MCU chip U5. After completing the initial programming operation, the MCU chip U5 feeds back programming-related information to the RXD-SCI pin 20 of the serial communication chip U13 through the UART-TX pin 30, such as whether the programming was successful and whether there are any data verification errors. After programming is complete and the feedback confirms that there are no errors, the conversion module 3 again adjusts the levels of the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5 according to the control signal, restoring it to normal operating status. This pin-level design greatly simplifies circuit debugging and maintenance, allowing developers to quickly locate and resolve potential problems. With clearly defined pin functions and precise connections, the stability and accuracy of signal transmission are further enhanced, effectively reducing the probability of errors caused by unclear hardware connections and significantly improving the performance and reliability of the entire serial port programming circuit.
[0040] Preferably, the serial communication chip U13 is model CP2105-GM. The CP2105-GM is a highly integrated USB-to-UART bridge chip that integrates the USB and UART interfaces into a single chip, eliminating the need for additional complex circuitry for interface conversion. This significantly reduces the board area, which is highly advantageous for space-constrained designs such as small embedded devices and IoT modules, contributing to product miniaturization and portability. The CP2105-GM has control pins such as DTR and RTS, which can be conveniently used to control the operating status of external devices, such as controlling the MCU chip's reset and mode switching in this design. These control pins enable automated mode switching, improving the system's intelligence and ease of operation. It supports high-speed data transmission, meeting the data communication needs of most application scenarios. During the programming process, data can be quickly and stably transferred from the computer to the MCU chip, shortening programming time and improving production efficiency.
[0041] Preferably, the MCU chip U5 is an STM32H523VCT6. The STM32H523VCT6 features a high clock frequency and powerful computing capabilities. It can quickly handle various complex tasks, such as parsing and storing received data during programming, and running user programs in normal operating mode. This enables the device to achieve more advanced functions, improving product performance and competitiveness. The chip integrates rich peripherals, such as multiple UART interfaces, SPI interfaces, and I2C interfaces, facilitating communication and interaction with various external devices. In this design, data transmission is achieved through the UART interface and a serial communication chip, realizing programming and normal communication functions. Furthermore, the rich peripheral resources facilitate product functional expansion; developers can flexibly configure and use these peripherals according to actual needs to meet different application scenarios.
[0042] In one specific embodiment, the conversion module 3 includes a first switch component Q33, a second switch component Q34, a first level pull-up element, a second level pull-up element, and a level pull-down element; the first end of the first switch component Q33 is connected to a first control pin, the second end is connected to a second control pin, and the third end is connected to the MCU reset pin and the first level pull-up element; the first end of the second switch component Q34 is connected to the second control pin, the second end is grounded, and the third end is connected to the mode conversion pin, the second level pull-up element, and the level pull-down element.
[0043] Specifically, the design principle of the conversion module 3 is to adjust the levels of the reset pin and mode conversion pin of the MCU module 1 based on the control signals given by the serial communication module 2, using switching components and pull-up / pull-down elements, thereby switching the MCU module 1 between the programming state and the working state. The first switching component Q33 and the second switching component Q34 can be turned on or off according to the control signals output by the serial communication module 2, thereby changing the level state of the MCU module 1 pins. The function of the first and second pull-up elements is to pull the corresponding pin level high when the switching components are off, ensuring the pin is in a stable high-level state. The function of the pull-down elements is to pull the corresponding pin level low when the switching components are on, ensuring the pin is in a stable low-level state.
[0044] When no external control signal is input, the serial communication chip U13 is in normal working state by default. At this time, DTR pin 15 and RTS pin 11 output a high level, the first switch component Q33 is off, and the second switch component Q34 is on. The RESET pin 14 of the MCU chip U5 is pulled high by the first level pull-up component, and the BOOT0 pin 94 is pulled low by the level pull-down component, which is in normal working state. When the external control signal controls the serial communication chip U13 to switch to the programming state: At this time: the level of RTS pin 11 changes from high to low, causing the second switch component Q34 to be off, and the BOOT0 pin 94 is pulled high by the second level pull-up component; DTR pin 15 remains at a high level, the first switch component Q33 is on, and the RESET pin 14 is pulled low by the level pull-down component, and the MCU enters the reset state; the external control signal then controls the level of DTR pin 15 to change from high to low after a delay of 100ms, the first switch component Q34 is off, and the RESET pin 14 is pulled high by the first level pull-up component, completing the reset and entering the programming mode. The serial communication chip U13 establishes a communication link with the MCU chip U5's UART-RX pin 29 via its TXD-SCI pin 21, and the programming data is written to the MCU's internal memory area through this channel. Simultaneously, the MCU feeds back programming status information to the RXD-SCI pin 20 via the UART-TX pin 30. After the external control signal is removed, the serial communication chip U13 returns to normal UART mode: the RTS pin 11 returns to a high level, the second switch component Q34 is turned on, and the BOOT0 pin 94 is pulled low; the DTR pin 15 returns to a high level, the first switch component Q33 is turned off, and the RESET pin 14 is pulled high; after the MCU completes programming, it automatically boots from the internal flash on the next power-on, and the serial port resumes normal communication functions.
[0045] This embodiment achieves fully automatic switching of the operating state of MCU module 1 through the coordinated action of the first switching component Q33 and the second switching component Q34. When the DTR pin 15 and RTS pin 11 of the serial communication chip U13 output control signals, Q33 and Q34 are turned on or off according to preset logic, precisely adjusting the levels of the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5. For example, in programming mode, Q33 is turned on to pull the RESET pin 14 low to trigger a reset, and Q34 is turned off to pull the BOOT0 pin 94 high by the second level pull-up element, forcing the MCU to enter the programming state. This automatic switching avoids manual intervention, ensures the timing accuracy of state transitions, and reduces the risk of misoperation. The design of the first level pull-up element, the second level pull-up element, and the level pull-down element in the switching module 3 ensures the stability of the MCU pin levels. When Q33 is off, the RESET pin 14 is pulled high to avoid noise interference caused by floating. When Q33 is on, the pull-down element forces the RESET pin 14 low to ensure the validity of the reset signal. Similarly, the BOOT0 pin 94 is maintained high by the second pull-up element when Q34 is off, ensuring reliable entry into the programming mode. This level clamping mechanism effectively suppresses signal fluctuations and improves the circuit's anti-interference performance.
[0046] In one specific embodiment, both the first switching component Q33 and the second switching component Q34 include a switching transistor; the first terminal of the switching transistor is a control terminal; the second terminal of the switching transistor is a low potential terminal; and the third terminal of the switching transistor is a high potential terminal.
[0047] The design principle of the switching transistor in conversion module 3 is based on its controllable on / off characteristics. The control terminals of the first switching component Q33 and the second switching component Q34 are respectively connected to the DTR pin 15 and RTS pin 11 of the serial communication chip U13. The low-potential terminals are grounded or connected to other control signals, while the high-potential terminals are connected to the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5. When the control terminal receives a high level, the transistor is turned on, forming a path between the high-potential terminal and the low-potential terminal, pulling the corresponding MCU pin level low; when the control terminal is low, the transistor is turned off, and the MCU pin level is maintained high by the corresponding pull-up element. This design achieves precise switching of the operating mode of MCU module 1 by controlling the switching state of the transistor.
[0048] Initially, the serial communication chip U13 outputs a high level on DTR pin 15 and RTS pin 11, while the first switch component Q33 and the second switch component Q34 are both off. At this time, the first pull-up element pulls the RESET pin 14 of the MCU chip U5 high to a logic high level. The second pull-up element and the pull-down element work together to keep the BOOT0 pin 94 low, and the MCU is in normal operating mode. When entering the programming state, the RTS pin 11 changes from high to low, the second switch component Q34 is off, and the BOOT0 pin 94 is pulled high by the second pull-up element; simultaneously, the DTR pin 15 remains high, the first switch component Q33 is on, pulling the RESET pin 14 low to trigger a reset. After a delay, the DTR pin 15 goes low, Q33 is off, and the RESET pin 14 is pulled high by the pull-up resistor, the MCU completes the reset and enters the programming mode. After programming is complete, the DTR and RTS pins return to high levels, Q33 is off, Q34 is on, and the MCU pin levels are reset to their initial state.
[0049] Switching transistors offer fast response times, rapidly reacting to control signals and enabling quick switching of the operating states of MCU module 1. Furthermore, precise control signals allow for accurate control of the transistor's on / off states, thereby precisely adjusting the pin levels of MCU module 1 and ensuring accurate state switching. As electronic switches, switching transistors experience no mechanical wear, withstand a greater number of switching cycles, and offer higher reliability and stability compared to mechanical switches. This reduces circuit problems caused by switch failures and improves the overall reliability of the serial port programming circuit. Switching transistors also consume less power in both on and off states, especially in the off state where they consume almost no power, contributing to lower overall circuit power consumption and improved energy efficiency, making them suitable for applications with power consumption requirements. In addition, the small size and ease of integration of switching transistors allow for a more compact design of conversion module 3, facilitating circuit miniaturization, reducing board space requirements, and meeting the miniaturization and integration needs of modern electronic devices.
[0050] Preferably, the switching transistor is an NMOS transistor. NMOS transistors are characterized by low on-resistance. When operating as the first switching component Q33 and the second switching component Q34, the low on-resistance allows current to flow smoothly when the NMOS transistor is turned on, reducing power loss in the on-state. Taking the level control of the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5 as an example, the low on-resistance ensures that when the pin level needs to be pulled low, it can be quickly and stably pulled down to the desired low level value, avoiding slow or incomplete level pull-down due to excessive resistance, thus ensuring the accuracy and reliability of the state switching of MCU module 1. The NMOS transistor is a voltage-driven device. In this serial port programming circuit, the control signals output from the DTR pin 15 and RTS pin 11 of the serial communication chip U13 can be directly used as the drive signals for the NMOS transistor. Compared to current-driven devices, voltage-driven devices do not require a large additional drive current, which simplifies the design of the drive circuit. Only the voltage amplitude of the control signal needs to meet the turn-on and turn-off conditions of the NMOS transistor, reducing the use of external circuit components, lowering circuit complexity and cost, and improving circuit stability. The NMOS transistor enables rapid switching. In the serial port programming circuit, MCU module 1 needs to switch quickly between programming and operating states, requiring the switching components to respond rapidly to changes in the control signal. The high-speed switching characteristics of the NMOS transistor allow it to complete the turn-on and turn-off transitions in a short time, ensuring the timeliness of MCU module 1's state switching. For example, when switching from normal operating mode to programming mode, the NMOS transistor can quickly respond to the level changes of RTS pin 11 and DTR pin 15, enabling the MCU chip U5 to enter the programming state promptly, improving programming efficiency.
[0051] In one specific embodiment, the control terminal is provided with a first current-limiting resistor, which is connected to a first control pin or a second control pin and connected to one end of a clamping diode D62, the other end of which is connected to a low potential terminal.
[0052] Specifically, the first current-limiting resistor limits the current flowing into the control terminal of the switching transistor, preventing damage due to excessive current. In the serial port programming circuit, the control signal voltage output from pins 15 (DTR) and 11 (RTS) of the serial communication chip U13 may fluctuate. When the control signal voltage is high, the first current-limiting resistor effectively reduces the current flowing into the control terminal, keeping the transistor operating within a safe current range. The clamping diode D62 limits the voltage at the control terminal. When the control signal voltage is too high, the clamping diode D62 conducts, clamping the control terminal voltage within a safe range to prevent excessive voltage from damaging the transistor. Simultaneously, when the control signal is low, the clamping diode D62 is off, not affecting the normal operation of the transistor. The combination of the first current-limiting resistor and the clamping diode D62 effectively protects the switching transistor. By limiting current and voltage, transistor damage due to overcurrent and overvoltage is avoided, extending the transistor's lifespan and improving the reliability of the entire conversion module 3. In practical applications, this reduces circuit repair and replacement costs due to transistor failure. Because the current and voltage at the control terminal are effectively controlled, the operating state of the switching transistor is more stable. This makes the level changes of the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5 more accurate and reliable, thereby improving the stability of MCU module 1 switching between the programming state and the working state. During the programming process, stable state switching can reduce the occurrence of programming errors and improve the programming success rate.
[0053] In one specific embodiment, the end of the first pull-up element away from the first switch assembly Q33 and the end of the second pull-up element away from the second switch assembly Q34 are both connected to a first power supply.
[0054] Specifically, in the serial port programming circuit, the first and second pull-up components are connected to the first power supply. The core design principle is to provide a stable high-level signal to the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5. When the first switch component Q33 and the second switch component Q34 are in the off state, it is necessary to ensure that the corresponding pins can be pulled high to an appropriate level to maintain the MCU module 1 in normal operation or a specific startup mode. The first power supply, as a stable voltage source, connects the pins to the power supply through the pull-up components. Utilizing the voltage division effect of the pull-up resistors, the pins remain high when there is no external pull-down signal, providing the basic conditions for stable circuit operation.
[0055] In one specific embodiment, the first level pull-up element and the second level pull-up element are resistors R170 and R274, respectively, and the first power supply is an MCU regulated power supply.
[0056] Specifically, in the circuit, the first and second pull-up components are 10KΩ resistors, and the MCU power supply is a 3.3V supply. The core principle is to utilize the voltage divider characteristic of the resistors. When the first switch assembly Q33 and the second switch assembly Q34 are turned off, the resistors connect the RESET pin 14 and BOOT0 pin 94 of the MCU chip U5 to the 3V 3-MCU power supply, pulling the pin level high to near the power supply voltage (3.3V), providing a stable high-level signal to the MCU, ensuring its normal operation or operation in a specific startup mode. The 10KΩ resistor value, while providing the pull-up level, also serves as a current limiter. It restricts the current flowing into the pins, preventing damage to the MCU due to excessive current. Simultaneously, this resistance value also matches well with the signal transmission requirements between the serial communication chip U13 and the MCU chip U5, ensuring signal stability and accuracy. The combination of the 10KΩ resistor and the MCU power supply provides a stable high-level signal to the MCU pins, effectively preventing MCU malfunctions caused by pin level fluctuations and improving the reliability of the entire circuit system. The 10KΩ resistor has a relatively moderate resistance value, ensuring pull-up functionality without consuming excessive power. Compared to smaller resistor values, it reduces the circuit's static power consumption, meeting energy-saving design requirements. The 3.3V supply voltage is a commonly used operating voltage for modern MCUs, offering good compatibility with most MCU chips. Furthermore, the 10KΩ resistor value is well-suited for different types of serial communication chips and MCU chips, improving the circuit's versatility. Understandably, the resistance values of the first and second level pull-up components can be adjusted according to different application scenarios and circuit requirements. For example, in applications requiring high signal response speed, the resistor value can be appropriately reduced, but care must be taken to avoid excessive current damaging the MCU; in scenarios with stricter power consumption requirements, the resistor value can be increased. The voltage of the primary power supply can also be flexibly adjusted according to actual needs.
[0057] In one specific embodiment, the pull-down element is a resistor R166, and the pull-down element is grounded.
[0058] Specifically, the pull-down element uses a 100KΩ resistor and is grounded. Its core design principle is to provide a stable low-level reference for the BOOT0 pin 94 of the MCU chip U5 when the second switching component Q34 is turned on. When Q34 is on, the BOOT0 pin 94 is connected to ground through the 100KΩ resistor, forming a low-impedance path, forcibly pulling the pin level down to near ground potential (0V). This design utilizes the voltage divider characteristic of the resistor to ensure reliable pin level switching when the switch is on, while avoiding excessive current consumption. The reason for choosing a 100KΩ resistor value is to balance pull-down speed and power consumption: a larger resistance value reduces quiescent current and lowers system power consumption; a smaller resistance value, while accelerating the pull-down speed, increases conduction losses. The 100KΩ resistance value strikes a balance between the two, satisfying the level switching requirements while ensuring circuit efficiency. It is understandable that the resistance value of the pull-down element can be adjusted according to different application scenarios and circuit requirements.
[0059] In one specific embodiment, the conversion module 3 further includes a circuit protection component, one end of which is connected to the second control pin and the other end of which is connected to the first power supply.
[0060] Specifically, the circuit protection component in conversion module 3 is connected at one end to the second control pin (such as the RTS pin of the serial communication chip U13) and at the other end to the first power supply (3V3-MCU). Its design principle is based on preventing abnormal circuit conditions. During normal operation, the signal output from the second control pin controls the conduction and cutoff of the second switching component Q34 to switch the operating state of MCU module 1. However, in practical applications, abnormal conditions such as voltage fluctuations, electrostatic discharge (ESD), and surges may occur, which may damage the components in the circuit. The function of the circuit protection component is to protect the second control pin and the connected circuit components in the event of abnormalities, preventing damage caused by overvoltage, overcurrent, etc. During normal operation, the signal voltage output from the second control pin is within the normal range. The circuit protection component does not substantially affect the transmission of this signal; it acts as a high-impedance component and will not interfere with the control of the second control pin on the second switching component Q34. At this time, the signal from the second control pin normally controls the conduction and cutoff of the second switching component Q34, thereby switching the operating state of MCU module 1. When abnormal conditions such as voltage fluctuations, ESD, or surges cause the voltage at the second control pin to exceed the normal range, the circuit protection component responds quickly. If the voltage is too high, the circuit protection component directs the excessive voltage to the primary power supply, where the filtering and voltage regulation functions absorb the excess energy, thereby protecting the second control pin and connected circuit components. For example, when an ESD event occurs, the circuit protection component conducts within a very short time, rapidly discharging the electrostatic charge to the power supply terminal to prevent damage to the chip from static electricity.
[0061] In one specific embodiment, the circuit protection component includes a second current-limiting resistor R273 and a diode D62. The cathode of the diode D62 is connected to the second control pin, and the anode is connected to one end of the second current-limiting resistor R273. The other end of the second current-limiting resistor R273 is connected to the first power supply.
[0062] Specifically, the design principle of this circuit protection component is to comprehensively utilize the characteristics of the second current-limiting resistor R273 and diode D62 to protect the second control pin. The second control pin may encounter abnormal voltage conditions, such as electrostatic discharge, surge impact, or operational errors, all of which can cause the pin to withstand excessive voltage, thereby damaging connected circuit components. Diode D62 has unidirectional conductivity; when the voltage of the second control pin is higher than the first power supply voltage, diode D62 will conduct. The function of the second current-limiting resistor R273 is to limit the current, preventing damage to the circuit due to excessive current. Through the cooperation of these two components, excessive voltage can be guided to the first power supply, thereby protecting the second control pin and related circuitry.
[0063] In one specific embodiment, the serial communication module 2 is also connected to a power-on reset component.
[0064] Specifically, the power-on reset component is connected to the serial communication module 2. Its core design principle is to ensure that the serial communication module 2 enters a known and stable initial state when the system is powered on. At the moment of power-on, the power supply voltage gradually rises from 0V to the rated value. During this process, various components in the circuit may exhibit unstable electrical characteristics, such as capacitor charging and inductor energy storage. These factors may cause the registers and logic circuits inside the serial communication module 2 to be in an uncertain state. The function of the power-on reset component is to generate a reset signal after the power supply voltage reaches a suitable operating range, resetting the internal state of the serial communication module 2 to its initial value, thereby ensuring its subsequent normal operation. The power-on reset component ensures that the serial communication module 2 is in a definite initial state every time it is powered on, avoiding communication errors or system failures caused by unstable factors at the moment of power-on. This is particularly important for systems that require long-term stable operation, such as industrial automation control systems and smart home devices, effectively reducing downtime and maintenance costs caused by abnormal power-on. By using the power-on reset component, developers no longer need to write complex power-on initialization code in the software to handle the initial state of the serial communication module 2. The power-on reset component automatically performs the hardware-level reset operation, making the software design simpler and reducing development difficulty and cycle time. Different serial communication modules 2 may have different power-on initialization requirements; the power-on reset component can adapt to these differences, providing a unified reset solution for various types of serial communication modules 2. This makes it easier to replace or upgrade the serial communication module 2, improving system compatibility and scalability.
[0065] In one specific embodiment, the serial communication module 2 is further provided with a power supply pin and a serial port reset pin. The power-on reset component includes a third-level pull-up element and a filter capacitor. One end of the third-level pull-up element is connected to the power supply pin, and the other end is connected to one end of the filter capacitor and the serial port reset pin. The other end of the filter capacitor is grounded.
[0066] Specifically, the design principle of this power-on reset component is based on the charging characteristics of a capacitor and the pull-up function. In serial communication module 2, the power supply pin provides power, while the serial port reset pin is used to switch the reset operation of module 3. A third-level pull-up element (usually a resistor) transfers the voltage of the power supply pin to the serial port reset pin, keeping the pin high during normal operation. The presence of the filter capacitor utilizes the characteristic that capacitor charging takes time. When the system powers on, the power supply voltage rises from 0, and the filter capacitor begins to charge. During the charging process, the voltage across the capacitor cannot change abruptly, causing the serial port reset pin to remain low for a period of time, thus triggering the reset operation of serial communication module 2. As the capacitor completes charging, the level of the serial port reset pin gradually rises to a high level, the module ends the reset state, and begins normal operation. When the system powers on, the voltage of the power supply pin begins to rise. At this time, the filter capacitor begins to charge. Since the voltage across the capacitor cannot change abruptly, the voltage of the serial port reset pin will temporarily remain low. This low-level signal is sent to the serial port reset pin of serial communication module 2, triggering the internal reset logic of the module, restoring the module's registers and state machine to their initial state. As time progresses, the filter capacitor gradually charges to a voltage close to that of the power supply pin, and the voltage of the serial port reset pin also increases accordingly. When the voltage rises to the range that the module considers to be a valid high level, the module ends the reset state and begins normal initialization configuration and data communication operations. This power-on reset component consists of only a third-level pull-up element and a filter capacitor, making it simple in structure and low in cost. Furthermore, the reset mechanism based on the capacitor charging characteristics is highly reliable, requiring no additional complex circuits or control signals, and can automatically complete the reset operation when the system powers on, reducing module failures caused by power-on instability. The filter capacitor not only implements the reset function but also has a filtering effect. It can filter out high-frequency noise and interference signals in the power supply, providing a more stable power environment for the serial communication module 2. This helps improve the module's anti-interference capability, reduces communication errors, and ensures the accuracy and stability of data transmission. This power-on reset component design has good compatibility and can be applied to various types of serial communication modules 2. As long as the module has a power supply pin and a serial port reset pin, this component can be used to implement the power-on reset function without requiring special modification or configuration of the module.
[0067] In one specific embodiment, the third level pull-up element is a resistor R189.
[0068] Specifically, a 10KΩ resistor R189 is selected as the third-level pull-up element. Its design principle is closely related to the capacitor charging characteristics and the reset requirements of the serial communication module 2. In the power-on reset circuit of the serial communication module 2, resistor R189 connects the power supply pin and the serial port reset pin, and works in conjunction with the filter capacitor C188. When the system powers on, the voltage on the power supply pin rises, and current flows through the 10KΩ resistor R189 to charge the filter capacitor C188. The resistance value of resistor R189 affects the charging time of the capacitor. The 10KΩ resistor R189 is carefully selected to ensure that the capacitor completes charging within a suitable time, thereby ensuring that the serial port reset pin remains low for an appropriate duration to achieve an effective reset operation. When the system powers on, the voltage on the power supply pin gradually rises from zero. At this time, current flows through the 10KΩ third-level pull-up element to the filter capacitor C188. Since the voltage across the capacitor cannot change abruptly, the voltage of the serial port reset pin is initially low. This low-level signal is transmitted to the serial port reset pin of serial communication module 2, triggering the module's reset logic and restoring the module's internal registers and state machine to their initial state. As time progresses, the capacitor continuously charges, and its voltage gradually increases. When the capacitor's charge approaches the supply voltage, the voltage of the serial port reset pin also rises to a valid high-level range recognized by the module. The module then ends its reset state and begins normal initialization configuration and data communication operations. The 10KΩ resistor R189 limits the charging current throughout the process, controlling the capacitor's charging speed and thus determining the duration of the reset signal. Understandably, the resistance value of the third-level pull-up component can be adjusted according to the specific reset time requirements of different serial communication modules 2. If it is necessary to extend the reset time, the resistance value of resistor R189 can be appropriately increased; conversely, if it is necessary to shorten the reset time, the resistance value of resistor R189 can be decreased. In this way, the personalized reset needs of various modules can be flexibly met.
[0069] The above embodiments are preferred implementations of this utility model. In addition, this utility model can also be implemented in other ways. Any obvious substitutions without departing from the concept of this technical solution are within the protection scope of this utility model.
Claims
1. A serial programming circuit, characterized by, The application relates to a serial communication module and a MCU module. The serial communication module is connected to the MCU module through a conversion module. The conversion module is used for switching the MCU module between a burning state and a working state. The serial communication module is used for receiving a control signal from an external communication interface to control the conversion module and transmitting burning information to the MCU module in the burning state. The serial communication module is provided with a first control pin, a second control pin and a first communication pin; the MCU module is provided with an MCU reset pin, a mode conversion pin and a second communication pin; one end of the conversion module is connected to the first control pin and the second control pin, and the other end is connected to the MCU reset pin and the mode conversion pin; and the first communication pin is connected to the second communication pin.
2. The serial burning circuit according to claim 1, characterized in that, The conversion module comprises a first switch assembly, a second switch assembly, a first level pull-up element, a second level pull-up element and a level pull-down element; the first end of the first switch assembly is connected to the first control pin, the second end is connected to the second control pin, and the third end is connected to the MCU reset pin and the first level pull-up element; the first end of the second switch assembly is connected to the second control pin, the second end is grounded, and the third end is connected to the mode conversion pin, the second level pull-up element and the level pull-down element.
3. The serial burning circuit according to claim 2, characterized in that, The first switch assembly and the second switch assembly each comprise a switch transistor; the first end of the switch transistor is a control end; the second end of the switch transistor is a low potential end; and the third end of the switch transistor is a high potential end.
4. The serial burning circuit according to claim 3, characterized in that, The control end is provided with a first current-limiting resistor connected to the first control pin or the second control pin and connected to one end of a clamping diode, and the other end of the clamping diode is connected to the low potential end.
5. The serial programming circuit of claim 4, wherein, The first end of the first level pull-up element and the first end of the second level pull-up element are connected to a first power supply.
6. The serial burning circuit according to claim 3, characterized in that, The conversion module further comprises a circuit protection assembly, one end of which is connected to the second control pin and the other end of which is connected to the first power supply.
7. The serial programming circuit of claim 6, wherein, The circuit protection assembly comprises a second current-limiting resistor and a diode, the cathode of the diode is connected to the second control pin, the anode of the diode is connected to one end of the second current-limiting resistor, and the other end of the second current-limiting resistor is connected to the first power supply.
8. The serial burning circuit according to claim 7, characterized in that, The serial communication module is further connected to a power-on reset assembly.
9. The serial burning circuit according to claim 2, characterized in that, The serial communication module is further provided with a power supply pin and a serial communication reset pin, and the power-on reset assembly comprises a third level pull-up element and a filter capacitor, one end of the third level pull-up element is connected to the power supply pin, the other end of the third level pull-up element is connected to one end of the filter capacitor and the serial communication reset pin, and the other end of the filter capacitor is grounded.
10. The serial burning circuit according to claim 9, characterized in that,
Citation Information
Cited By
Peripheral module firmware burning circuit and method
CN121833003A
Peripheral module firmware burning circuit and method
CN121833003B