Chip burning port multiplexing control method
By implementing flexible switching and state detection between the burning port and the GPIO interface on the chip, the problem of waste of resources and low working efficiency of the chip burning port is solved, and more efficient resource utilization and function switching is achieved.
Patent Information
- Application Number
- CN202411703637.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
The chip burn port is wasted resources and low working efficiency, especially when the GPIO port is tight, the prior art timing switching methods are prone to problems such as early switching or delayed switching, resulting in waste of time and reduced efficiency.
A control method for chip burn port multiplexing is provided. Through the steps of chip reset initialization, interface status switching, system detection GPIO function occupation status and system control interface status and then switching, the interface function status is indicated by the indication bits on the chip, and the switching timing of the interface function is determined by detecting the operating status of the display driver and stepper motor.
It effectively avoids the single vacancy of interface functions, ensures the normal use and switching of GPIO functions, improves chip work efficiency, and solves the problems of insufficient GPIO and inability to achieve burn-in functions.
Smart Images

Figure CN119621628A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of control chips, and in particular to a control method for multiplexing chip burning ports. Background Art
[0002] At present, the chip burning port is only used as a burning port, and the burning port occupies resources alone. When the GPIO port is limited, the waste of resources is particularly serious.
[0003] In the prior art, there is a control method that uses timing to switch interface functions. However, due to the differences between various chips and various programs, the chips that have completed burning cannot be exactly the same. This method of timing switching is prone to problems such as early switching or delayed switching, resulting in a waste of time and reduced chip work efficiency. Summary of the invention
[0004] The present invention solves the problem of waste of chip interface resources and low chip working efficiency.
[0005] To solve the above problems, the present invention provides a control method for chip burning port multiplexing, comprising: chip reset initialization; interface state switching to GPIO, system testing whether the GPIO function is normal, if the GPIO test fails, the chip is reset and initialized again; the system detects the GPIO function occupation state; the system controls the interface state to switch again; wherein, an indication bit for indicating the interface function state is provided on the chip, when the interface function is GPIO, the indication bit is GPIO, when the interface function is the burning port, the indication bit is the burning port.
[0006] Compared with the prior art, the technical effect achieved by this technical solution is: when the GPIO function needs to be used, the burning port is switched to the GPIO interface to avoid the interface function being left vacant. The system detects whether the interface GPIO function can be used normally to ensure that the interface GPIO function is switched in place. The system detects the GPIO function occupancy status, which facilitates precise control of the timing of interface status switching. The indicator bit on the chip is used to indicate the interface function status to the user. In the absence of GPIO, the burning port can be converted to GPIO for use to solve the problem of insufficient GPIO; when the GPIO does not need to control the outside, it can be switched to the burning port to solve the problem that the chip cannot be burned after it is working, thereby improving the chip working efficiency.
[0007] Furthermore, the system detects the GPIO function occupancy status, specifically including: detecting the display driver; detecting the stepper motor.
[0008] Compared with the prior art, the technical effect achieved by the present technical solution is as follows: by detecting whether the display driver is displaying and whether the stepper motor is running, the system is used as a basis for whether to switch the interface function.
[0009] Furthermore, detecting the display driver specifically includes: when the display driver is running, the interface maintains a GPIO state.
[0010] Compared with the prior art, the technical effect achieved by this technical solution is: when the display driver is performing display work, it means that the GPIO function is being occupied. At this time, the interface function maintains the GPIO state, which facilitates the use of the GPIO function.
[0011] Furthermore, detecting the stepper motor specifically includes: when the stepper motor is running, the interface maintains a GPIO state.
[0012] Compared with the prior art, the technical effect achieved by this technical solution is: when the stepper motor is running, it means that the GPIO function is being occupied. At this time, the interface function maintains the GPIO state, which facilitates the use of the GPIO function.
[0013] Furthermore, the system controls the interface state to be switched again, specifically including: when the display driver is turned off and the stepper motor stops, the system controls the interface to be switched to the burning port state.
[0014] Compared with the prior art, the technical effect achieved by this technical solution is: when the display driver is turned off and the stepper motor stops, it means that the GPIO function is currently not required. At this time, the system can control the interface to be converted to the burning port state, so that the chip can realize the burning function.
[0015] Furthermore, the system control interface switches to the burning port state, specifically including: chip reset and code erasure; and register reconfiguration.
[0016] Compared with the prior art, the technical effect achieved by this technical solution is: erasing the GPIO function code loaded on the chip, and realizing the switching of the interface function GPIO to burning by reconfiguring the registers.
[0017] Furthermore, the present invention provides a control method for chip burning port multiplexing, which also includes: burning function test.
[0018] Compared with the prior art, the technical effect achieved by this technical solution is: after the system completes the switching of the interface GPIO to the burning function, it checks whether the burning function can be used normally, and promptly eliminates the problem of function conversion failure.
[0019] Furthermore, the burning function test specifically includes: the system burns the test program into the chip; if the burning of the test program fails, the chip is restarted.
[0020] Compared with the prior art, the technical effect achieved by this technical solution is: the chip is burned with the test code, and if it fails, the chip is restarted to reset the interface function.
[0021] Furthermore, restarting the chip specifically includes: restarting and resetting the chip; and re-burning the test program.
[0022] Compared with the prior art, the technical effect achieved by this technical solution is: the chip is burned and tested again with the program to ensure that the interface burning function is normal.
[0023] Furthermore, the present invention also provides a control device capable of implementing the control method for multiplexing the chip burning port as described above, comprising: a chip module for burning and GPIO; a control module for controlling the chip module; and a connecting circuit connecting the chip module and the control module.
[0024] Compared with the prior art, the technical effect achieved by this technical solution is: a control method for multiplexing the chip burning port is realized, so that the device can have enough GPIO interfaces when the GPIO function is busy, while ensuring the burning function. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A flowchart of a control method for multiplexing a chip burning port provided by the present invention; Figure 2 A schematic block diagram of a control device provided by the present invention.
[0026] Description of reference numerals: 100 - control device; 110 - control module; 120 - chip module. DETAILED DESCRIPTION
[0027] The object of the present invention is to provide a control method for chip burning port multiplexing, which is used to realize the control chip burning port multiplexing, make full use of chip interface resources, and improve the effect of chip working efficiency.
[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0029] See also Figure 1 The present invention provides a control method for multiplexing a chip burning port, comprising: chip reset initialization; the interface state is switched to GPIO, the system tests whether the GPIO function is normal, if the GPIO test fails, the chip is reset and initialized again; the system detects the GPIO function occupancy state; the system controls the interface state to switch again; wherein, an indication bit for indicating the interface function state is provided on the chip, when the interface function is GPIO, the indication bit is GPIO, when the interface function is the burning port, the indication bit is the burning port.
[0030] Chip reset refers to restoring the program in the chip to its initial state, which is used to eliminate program errors that may be introduced during the chip manufacturing and testing process.
[0031] This method switches the burning port to the GPIO interface when the GPIO function needs to be used, to avoid the interface function being left vacant. The system detects whether the interface GPIO function can be used normally to ensure that the interface GPIO function is switched in place. The system detects the GPIO function occupancy status, which facilitates precise control of the timing of interface status switching. The indicator bit on the chip is used to indicate the interface function status to the user. In the case of a lack of GPIO, the burning port can be converted to GPIO for use to solve the problem of insufficient GPIO; when the GPIO does not need to control the outside, it can be switched to the burning port to solve the problem that the chip cannot be burned after it is working, thereby improving the chip work efficiency.
[0032] The system detects the GPIO function occupancy status, specifically including: detecting the display driver; detecting the stepper motor.
[0033] Specifically, when the air conditioner is turned on, the screen displays the temperature, mode, etc. normally, and the display driver works. The stepper motor controls the air conditioner to swing, and the stepper motor works when the fan blades need to adjust their position or swing back and forth.
[0034] The system determines whether to switch the interface function by detecting whether the display driver is displaying and whether the stepper motor is running.
[0035] Detecting the display driver specifically includes: when the display driver is running, the interface maintains a GPIO state.
[0036] When the display driver is performing display work, it means that the GPIO function is being used. At this time, the interface function maintains the GPIO state to facilitate the use of the GPIO function.
[0037] Detecting the stepper motor specifically includes: when the stepper motor is running, the interface maintains the GPIO state.
[0038] When the stepper motor is running, it means that the GPIO function is being used. At this time, the interface function maintains the GPIO state to facilitate the use of the GPIO function.
[0039] The system control interface state is switched again, specifically including: when the display driver is turned off and the stepper motor stops, the system control interface is switched to the burning port state.
[0040] When the display driver is turned off and the stepper motor stops, it means that the GPIO function is not currently in use. At this time, the system can control the interface to switch to the burning port state so that the chip can realize the burning function.
[0041] The system control interface switches to the burning port state, including: chip reset and code erasure; reconfiguration of registers.
[0042] Specifically, the chip used in this method is configured from a burning port to a GPIO port in AFIO mode.
[0043] The system erases the GPIO function code loaded on the chip and realizes the switching of the interface function GPIO to programming by reconfiguring the registers.
[0044] The present invention provides a control method for multiplexing a chip burning port, which also includes: burning function testing.
[0045] After the system completes the switch from the interface GPIO to the burning function, check whether the burning function can be used normally to eliminate the problem of function conversion failure in time.
[0046] The burning function test specifically includes: the system burns the test program into the chip; if the test program fails to be burned, the chip is restarted.
[0047] Optionally, the chip includes a flash memory, and the flash memory is used to store the burning test program.
[0048] Use the test code to burn the chip. If it fails, restart the chip to reset the interface function.
[0049] Restart the chip, specifically including: restart and reset the chip; re-burn the test program.
[0050] Use the program to burn the chip again to test it to ensure that the interface burning function is normal.
[0051] like Figure 2 As shown, the present invention also provides a control device 100, which can implement the control method of chip burning port multiplexing as described above, including: a chip module 120 for burning and GPIO; a control module 110 for controlling the chip module; and a connecting circuit connecting the chip module and the control module.
[0052] The control module 110 and the chip module 120 are communicatively connected, so that the control module 110 can control the chip module 120 and receive the GPIO function usage status signal detected by the chip module 120 .
[0053] A control method for implementing chip programming port multiplexing is provided to facilitate the device to have enough GPIO interfaces when the GPIO function is busy, while ensuring the programming function.
[0054] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A control method for multiplexing a chip burning port, characterized in that: include: Chip reset initialization; The interface status switches to GPIO, and the system tests whether the GPIO function is normal. If the GPIO test fails, the chip is reset and initialized again; The system detects the GPIO function occupancy status; The system controls the interface status to switch again; The chip is provided with an indication bit for indicating the interface function status. When the interface function is GPIO, the indication bit is GPIO; when the interface function is a burning port, the indication bit is a burning port.
2. The control method for chip burning port multiplexing according to claim 1, characterized in that: The system detects the GPIO function occupancy status, specifically including: Detect display driver; Detecting stepper motors.
3. The control method for chip burning port multiplexing according to claim 2, characterized in that: The detection display driver specifically includes: When the display driver is running, the interface maintains the GPIO state.
4. The control method for chip burning port multiplexing according to claim 3, characterized in that: The detection stepping motor specifically comprises: When the stepper motor is running, the interface maintains the GPIO state.
5. The control method for chip burning port multiplexing according to claim 4, characterized in that: The system controls the interface state to switch again, specifically including: When the display driver is turned off and the stepper motor stops, the system control interface switches to the burning port state.
6. The control method for chip burning port multiplexing according to claim 5, characterized in that: The system control interface switches to the burning port state, specifically including: Chip reset erase code; Reconfigure registers.
7. The control method for chip burning port multiplexing according to any one of claims 1 to 6, characterized in that: Also includes: Burning function test.
8. The control method for chip burning port multiplexing according to claim 7, characterized in that: The burning function test specifically includes: The system burns the test program into the chip; If the test program fails to be burned, restart the chip.
9. The control method for chip burning port multiplexing according to claim 8, characterized in that: The restart chip specifically includes: The chip is restarted and reset; Test program and then burn it.
10. A control device capable of implementing the control method for chip burning port multiplexing as claimed in claim 9, characterized in that: include: Chip module for burning and GPIO; A control module for controlling the chip module; A connection circuit connecting the chip module and the control module.