CN106445614B - Burning device and burning method for microcontroller - Google Patents
Burning device and burning method for microcontroller Download PDFInfo
- Publication number
- CN106445614B CN106445614B CN201610889393.5A CN201610889393A CN106445614B CN 106445614 B CN106445614 B CN 106445614B CN 201610889393 A CN201610889393 A CN 201610889393A CN 106445614 B CN106445614 B CN 106445614B
- Authority
- CN
- China
- Prior art keywords
- programming
- module
- writing
- microcontroller
- burning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Abstract
The invention discloses a programming device for a microcontroller, which comprises a programming module, a programming voltage detection module and a programming control module, wherein the programming module is in serial communication with external programming logic through a serial programming communication interface, analyzes after receiving an instruction of the external programming logic, and executes corresponding programming instruction operation, and the programming instructions comprise setting programming addresses, setting programming data, starting programming and reading back NVM data for verification. When the microcontroller works normally, the clock of the related logic is thoroughly turned off, and unnecessary power consumption of the chip can be saved. The burning request can be effectively detected through a short detection time window, so that the micro-controller chip can skip the burning mode to enter the normal working mode only after a short time.
Description
Technical Field
The present invention relates to a microcontroller, and more particularly, to a recording device and a recording method for a microcontroller.
Background
In mass production of MCU chips, one of the important links is to write the user application into the memory (e.g. OTP, MTP, FLASH, etc.) of the nonvolatile storage medium of the chip. This process is also known as "burning". In the process of burning, how to quickly, efficiently and reliably burn the user program into the MCU chip is very important for controlling the production cost and the reliability.
Disclosure of Invention
The present invention is directed to a writing device and a writing method for a microcontroller, so as to solve the problems set forth in the background art.
In order to achieve the above purpose, the present invention provides the following technical solutions:
the programming device for the microcontroller comprises a programming module, a programming voltage detection module and a programming control module, wherein the programming module is in serial communication with external programming logic through a serial programming communication interface, analyzes after receiving an instruction of the external programming logic, and executes corresponding programming instruction operation, the programming instructions comprise setting programming addresses, setting programming data, starting programming and reading back NVM data for verification, the serial programming communication interface is provided with 2 signal lines, namely a programming clock signal line pclk and a programming data signal line pdat, and in the programming mode, 2 common GPIOs of a microcontroller chip are time-division multiplexed into the programming clock signal line pclk and the programming data signal line pdat; the writing voltage detection module is responsible for detecting whether writing voltage meeting writing requirements is added on a writing high voltage pin VPP of the microcontroller chip or not from the outside of the microcontroller chip, and outputting a writing high voltage effective mark signal hv_vld when detecting that the writing high voltage meeting writing exists on the writing high voltage pin VPP; the programming control module is responsible for controlling the microcontroller chip to enter a programming mode after power-on reset or to jump over the programming mode to enter a normal working mode; the burning control module outputs 2 control signals. The programming enable signal prog_en is used for controlling the operation enabling of the programming module, when the programming enable signal prog_en is in a high-level active state, the programming module prog starts to operate, the core enable signal core_en is used for controlling the operation enabling of the programming module, and when the core enable signal core_en is in a high-level active state, the microcontroller core starts to normally operate.
A burning method for a microcontroller is provided, wherein the microcontroller chip enters a burning mode if a valid burning high voltage is detected within 120 microseconds of the release of the power-on reset, otherwise, the microcontroller chip enters a normal working mode after 120 microseconds of the release of the power-on reset.
Compared with the prior art, the invention has the beneficial effects that: 1) After the stable effective duration of the high voltage of the burning is detected to be 80 microseconds, the microcontroller is allowed to enter the burning mode. By filtering the interference, the micro-controller chip can avoid entering a burning mode by mistake due to the existence of the interference, thereby influencing the normal operation of the micro-controller chip.
2) In the programming mode, 2 GPIO pins of the micro-controller chip are multiplexed in a time-sharing mode to serve as programming serial communication signal pins of the micro-controller chip, and 2 pins are not required to be additionally added, so that the chip area is saved.
3) When the microcontroller works normally, the clock of the related logic is completely closed, and unnecessary power consumption of the chip can be saved.
4) The burning request can be effectively detected through a short detection time window, so that the micro-controller chip can skip the burning mode to enter the normal working mode only after a short time.
Drawings
Fig. 1 is a system block diagram of a microcontroller in a recording device and a recording method for the microcontroller.
Fig. 2 is a schematic block diagram of a programming control module in a programming device and a programming method for a microcontroller.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-2, in this embodiment, the microcontroller is allowed to enter the recording mode after detecting the stable and effective duration of the high voltage for recording to 80 microseconds. By filtering the interference, the micro-controller chip can avoid entering a burning mode by mistake due to the existence of the interference, thereby influencing the normal operation of the micro-controller chip. In the programming mode, 2 GPIO pins of the micro-controller chip are multiplexed in a time-sharing mode to serve as programming serial communication signal pins of the micro-controller chip, and 2 pins are not required to be additionally added, so that the chip area is saved. When the microcontroller works normally, the clock of the related logic is completely closed, and unnecessary power consumption of the chip can be saved. The burning request can be effectively detected through a short detection time window, so that the micro-controller chip can skip the burning mode to enter the normal working mode only after a short time.
The principle of this scheme is shown in figure 1.
Clock module (clock_gen): the clock module is responsible for generating the core operating clock (clk_core) of the chip.
NVM module: NVM (non-volatile memory) is a non-volatile memory that can keep the contents of the memory from being lost when the chip is powered down. The NVM is used to store user programs. When the MCU is operating normally, it is necessary to read the user program from the NVM and perform the corresponding user-defined operation.
The programming module (prog) is used for carrying out serial communication with the external programming logic through the serial programming communication interface, analyzing after receiving the command of the external programming logic, and executing corresponding programming command operation. The writing instructions include setting writing address, setting writing data, starting writing, reading back the NVM data for verification, etc. The serial programming communication interface has 2 signal lines, namely a programming clock signal line (pclk) and a programming data signal line (pdat). In the writing mode, 2 general GPIOs of the chip are time-division multiplexed into a writing clock signal line (pclk) and a writing data signal line (pdat), and after writing is completed, when the chip is in a normal working mode, the 2 GPIOs can still be used as general GPIOs.
Burning voltage detection module (det_vp): the module is responsible for detecting whether the external part of the micro-controller chip adds the burning voltage meeting the burning requirement on the burning high voltage pin (VPP) of the chip. When the high voltage meeting the requirement of the programming is detected to exist on the programming high voltage pin (VPP), the programming voltage detection module outputs a programming high voltage valid flag signal (hv_vld).
Burn control module (prog_ctrl):
the burning control module is responsible for controlling the chip to enter a burning mode after power-on reset or to jump over the burning mode to enter a normal working mode. The burning control module outputs 2 control signals. The program enable signal (prog_en) is used for controlling the operation enable of the program module, and when the program enable signal (prog_en) is in an active high state, the program module (prog) starts to operate. The core enable signal (core_en) is used for controlling the operation enable of the burning module, and when the core enable signal (core_en) is in an active high level state, the microcontroller core starts to work normally.
The working principle of the burning control module is shown in fig. 2. In this scheme, the conditions for the microcontroller to enter the burn mode are: if the effective high voltage is detected, the chip enters the burning mode, or else, the chip enters the normal working mode after 120 microseconds of the release of the power-on reset. As shown in fig. 2, when the signal hv_det output by the recording voltage detection module is valid, the counter det_cnt in the recording control module performs accumulated count; when the signal hv_det output by the burning voltage detection module is in a low level state, the counter det_cnt in the burning control module is reset to zero again. The count value of the counter det_cnt is compared with the 80 microsecond count value by the comparator (C1), and when the output signal hv_vld of the comparator C1 is in the high-level output state, it indicates that the detected high voltage for burning is stable for at least 80 microseconds. The output signal hv_vld of the comparator C1 is used as a condition for detecting that the burning high voltage is effective, so that the phenomenon that the chip enters a burning mode by mistake due to interference can be avoided, and the normal power-on operation of the chip is affected. Further, even when the high voltage is not stable during the period when the high voltage is just applied or is being removed, the writing command processing should not be entered. Therefore, the logic in the burning control module can ensure that the chip is reliably burned. After the chip is powered on and reset, a counter por_cnt in the burning control module can count up, the count value of the counter por_cnt is compared with a 120 microsecond count value through a comparator (C2), and when an output signal gt_120us of the comparator C2 is in a high-level output state, the time counted from the start of the power on reset release is indicated to be longer than 120 microseconds. Otherwise, when the output signal gt_120us of the comparator C2 is in the low level output state, the time from the start of the power-on reset release is not longer than 120 microseconds, that is, the current time is still within the time window in which the recording mode can be entered. As shown in fig. 2, when the output signal hv_vld of the comparator C1 is in a high level output state and the output signal gt_120us of the comparator C2 is in a low level output state, the program enable signal (prog_en) output by the program control module is in a high active state, so that the program module (prog) is enabled to start working, and the chip enters the program mode. Meanwhile, the switch GATE1 connected with the GPIO_1 is turned on, the switch GATE2 connected with the GPIO_2 is turned on, and the external burning module can perform serial communication with the burning module through the GPIO_1 and the GPIO_2.
When the output signal gt_120us of the comparator C2 is in a high level output state and the programming enable signal (prog_en) is in a low level state, the core enable signal (core_en) output by the programming control module is in a high active state, so that the microcontroller core is enabled to enter a normal working mode. Meanwhile, the switch GATE1 connected with the GPIO_1 is closed, and the switch GATE2 connected with the GPIO_2 is closed, so that the working clock of the burning module is closed, and the chip saves unnecessary power consumption.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.
Claims (1)
1. The programming device for the microcontroller comprises a programming module, a programming voltage detection module and a programming control module, and is characterized in that the programming module is in serial communication with external programming logic through a serial programming communication interface, analyzes after receiving an instruction of the external programming logic, and executes corresponding programming instruction operation, wherein the programming instructions comprise setting programming addresses, setting programming data, starting programming and reading back NVM data for verification, the serial programming communication interface is provided with 2 signal lines, namely a programming clock signal line pclk and a programming data signal line pdat, and in a programming mode, 2 common GPIOs of a microcontroller chip are time-division multiplexed into the programming clock signal line pclk and the programming data signal line pdat; the writing voltage detection module is used for detecting whether writing voltage meeting writing requirements is added on a writing high voltage pin VPP of the micro-controller chip or not, after the writing high voltage is detected to be stable and effective for 80 microseconds, the micro-controller is allowed to enter a writing mode, and when the writing high voltage meeting writing exists on the writing high voltage pin VPP, the writing voltage detection module outputs a writing high voltage effective marking signal hv_vld; the programming control module is responsible for controlling the microcontroller chip to enter a programming mode after power-on reset or to jump over the programming mode to enter a normal working mode; the burning control module outputs 2 control signals; the programming enable signal prog_en is used for controlling the operation enabling of the programming module, when the programming enable signal prog_en is in a high-level active state, the programming module prog starts to operate, the core enable signal core_en is used for controlling the operation enabling of the programming module, and when the core enable signal core_en is in a high-level active state, the microcontroller core starts to normally operate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610889393.5A CN106445614B (en) | 2016-10-12 | 2016-10-12 | Burning device and burning method for microcontroller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610889393.5A CN106445614B (en) | 2016-10-12 | 2016-10-12 | Burning device and burning method for microcontroller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106445614A CN106445614A (en) | 2017-02-22 |
CN106445614B true CN106445614B (en) | 2023-10-03 |
Family
ID=58174241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610889393.5A Active CN106445614B (en) | 2016-10-12 | 2016-10-12 | Burning device and burning method for microcontroller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445614B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106950875B (en) * | 2017-03-17 | 2023-05-23 | 科芯(天津)生态农业科技有限公司 | Embedded programmer and tooling system thereof |
CN108776590A (en) * | 2018-05-31 | 2018-11-09 | 湖南品腾电子科技有限公司 | One kind simplifying method for burn-recording and device |
CN110321136B (en) * | 2019-07-04 | 2023-03-21 | 北京集创北方科技股份有限公司 | Data access device, method and chip |
CN111142890B (en) * | 2019-12-30 | 2022-04-05 | 无锡矽杰微电子有限公司 | Single-wire burning and testing method for MCU chip |
CN114019357A (en) * | 2021-10-27 | 2022-02-08 | 浪潮(北京)电子信息产业有限公司 | Management method of test pin of logic processing module and related assembly |
CN114579502B (en) * | 2022-02-28 | 2023-06-20 | 湖南进芯电子科技有限公司 | Burning interface system, microprocessor and burning method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1936814A (en) * | 2005-09-22 | 2007-03-28 | 鸿富锦精密工业(深圳)有限公司 | Basic input-output system and medium accessing control address on-line burn recording device |
CN102820061A (en) * | 2012-08-31 | 2012-12-12 | 东北大学 | Embedded remote device program programmer device and method |
CN105573743A (en) * | 2015-11-19 | 2016-05-11 | 深圳市芯海科技有限公司 | Chip burning system and method and electronic equipment |
CN205282100U (en) * | 2015-12-29 | 2016-06-01 | 深圳市博巨兴实业发展有限公司 | Microcontroller |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7631232B2 (en) * | 2007-09-28 | 2009-12-08 | Inventec Corporation | Parallel burning system and method |
-
2016
- 2016-10-12 CN CN201610889393.5A patent/CN106445614B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1936814A (en) * | 2005-09-22 | 2007-03-28 | 鸿富锦精密工业(深圳)有限公司 | Basic input-output system and medium accessing control address on-line burn recording device |
CN102820061A (en) * | 2012-08-31 | 2012-12-12 | 东北大学 | Embedded remote device program programmer device and method |
CN105573743A (en) * | 2015-11-19 | 2016-05-11 | 深圳市芯海科技有限公司 | Chip burning system and method and electronic equipment |
CN205282100U (en) * | 2015-12-29 | 2016-06-01 | 深圳市博巨兴实业发展有限公司 | Microcontroller |
Also Published As
Publication number | Publication date |
---|---|
CN106445614A (en) | 2017-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106445614B (en) | Burning device and burning method for microcontroller | |
CN107615387B (en) | Memory device and method of controlling ultra-deep power down mode in memory device | |
KR100375217B1 (en) | Microcontroller incorporating an electrically rewritable non-volatile memory | |
JP4663274B2 (en) | MEMORY CONTROLLER, SMART CARD HAVING THE SAME, AND MEMORY DATA READING OPERATION CONTROL METHOD | |
US20180203643A1 (en) | Automatic switch to single spi mode when entering udpd | |
US20140173173A1 (en) | Method, device, and system including configurable bit-per-cell capability | |
KR100504696B1 (en) | Nand-type flash memory device having array of status cells for storing block erase/program information | |
KR100564598B1 (en) | Synchronous flash memory device and method of operating the same | |
JP2006127648A (en) | Nonvolatile storage device and electronic device | |
EP2585934B1 (en) | Pull-up resistor activation in a memory system | |
US7883020B2 (en) | Smart card and method of testing smart card | |
KR100430608B1 (en) | Semiconductor memory device | |
CN206162495U (en) | A burning device for microcontroller | |
JPH07296599A (en) | Nonvolatile semiconductor memory | |
JP4655244B2 (en) | End configuration based on first valid command | |
US10002673B2 (en) | Flash memory data storage device and programming method thereof | |
JP4236539B2 (en) | Nonvolatile memory device | |
KR100980057B1 (en) | Precharge control circuit | |
JP2013030244A (en) | Semiconductor device | |
KR101155113B1 (en) | Non volatile memory device and method of operating the same | |
US10283175B1 (en) | NAND flash memory and status output method in NAND flash memory | |
TWI665681B (en) | Pulse generator, memory device, memory system having the same, and method of controlling an internal power of the memory device | |
KR100666421B1 (en) | Nonvolatile semiconductor memory device and method for achieving shorter erasure time | |
JP2004220774A5 (en) | ||
CN202372967U (en) | Device capable of reading boot program of computer quickly |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 518000, podium building 734, Building 12, Shenzhen Bay Science and Technology Ecological Park, No. 18 Keji South Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province Applicant after: Shenzhen Bojuxing Microelectronics Technology Co.,Ltd. Address before: 518000 4th Floor, New Material Port D(4) Building, No.2 Changyuan New Material Port, Zhongxin Road, Nanshan District, Shenzhen City, Guangdong Province Applicant before: SHENZHEN BOJUXING INDUSTRIAL DEVELOPMENT Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |