CN112433895B - Method and circuit for controlling starting mode of chip - Google Patents

Method and circuit for controlling starting mode of chip Download PDF

Info

Publication number
CN112433895B
CN112433895B CN202011200869.2A CN202011200869A CN112433895B CN 112433895 B CN112433895 B CN 112433895B CN 202011200869 A CN202011200869 A CN 202011200869A CN 112433895 B CN112433895 B CN 112433895B
Authority
CN
China
Prior art keywords
resistor
switch
starting
voltage
chip
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
Application number
CN202011200869.2A
Other languages
Chinese (zh)
Other versions
CN112433895A (en
Inventor
麦海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Particle Microelectronics Co ltd
Original Assignee
Guangzhou Particle Microelectronics Co ltd
Filing date
Publication date
Application filed by Guangzhou Particle Microelectronics Co ltd filed Critical Guangzhou Particle Microelectronics Co ltd
Priority to CN202011200869.2A priority Critical patent/CN112433895B/en
Publication of CN112433895A publication Critical patent/CN112433895A/en
Application granted granted Critical
Publication of CN112433895B publication Critical patent/CN112433895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method and a circuit for controlling a starting mode of a chip. The method for determining the boot mode of the chip by detecting the voltage of the starting pin through the ADC and starting from different memories can reduce the occupation of the starting pin, reduce the area of the chip, reduce the cost of the chip and improve the market competitiveness of the chip.

Description

Method and circuit for controlling starting mode of chip
Technical Field
The present invention relates to the field of integrated circuits, and in particular, to a method and a circuit for controlling a start mode of a chip.
Background
Currently, regarding the selection of a chip start mode (hereinafter also referred to as a boot mode), the existing patent and related literature describe that the boot mode of the chip is selected by GPIO (General-purpose input/output interface) as a start pin. The chip determines that it is started from different memories by detecting the level of GPIO. For chips with fewer boot modes, the method is practical, simple and easy to implement. The inadequacies of this approach are manifested when the boot mode of the chip is more. With the increase of boot modes, the number of GPIOs occupied by the starting pins is also increased. 1 starting pin is required to be occupied in two boot modes, 2 starting pins are required to be occupied in four boot modes, and 3 starting pins are required to be occupied in 8 boot modes. For the chip, every time one start pin is added, the cost is increased.
Therefore, it is necessary to improve the starting mode of the chip in the prior art, so as to solve the problem of cost increase caused by the occupation of more starting pins in multiple boot modes.
Disclosure of Invention
The invention aims to provide a method and a circuit for controlling a starting mode of a chip, which can solve the problem that a plurality of starting pins are occupied in a plurality of boot modes in the prior art.
The invention aims at realizing the following technical scheme:
In a first aspect, the present invention provides a method for controlling a start mode of a chip, detecting a voltage of a start pin of the chip, and selecting a corresponding start mode according to a voltage value of the start pin.
Further, selecting a corresponding starting mode according to the voltage value of the starting pin specifically includes:
Step S1, the ADC of the chip detects the voltage of a starting pin, if the voltage of the starting pin is smaller than a first set value, a USB starting mode is selected, otherwise, the step S2 is carried out;
Step S2, if the voltage of the starting pin is smaller than a second set value, selecting a Uart starting mode, otherwise, turning to step S3;
step S3, if the voltage of the starting pin is smaller than a third set value, selecting a flash starting mode, otherwise, turning to step S4;
Step S4, if the voltage of the starting pin is smaller than a fourth set value, selecting a Nor nonvolatile flash memory starting mode, otherwise, turning to step S5;
And S5, if the voltage of the starting pin is smaller than a fifth set value, selecting a Nand nonvolatile flash memory starting mode, otherwise, selecting an SD card starting mode.
Further, the first set value is less than the second set value, less than the third set value, less than the fourth set value, and less than the fifth set value.
In a second aspect, the invention provides a start-up mode control circuit of a chip, which comprises the chip and a voltage dividing circuit; the output end of the voltage dividing circuit is connected to a starting pin of the chip; the chip comprises an analog-to-digital conversion circuit and a central control unit; the analog-to-digital conversion circuit is used for detecting the voltage of the starting pin; the central control unit selects the starting mode of the chip according to the voltage of the starting pin.
Further, the voltage dividing circuit comprises a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch and a seventh switch; the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor are sequentially connected in series, one end of the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor is connected with a power supply, and the other end of the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor are grounded; one end of the first switch is connected with a power supply; one end of the second switch is connected with a series node of the first resistor and the second resistor; one end of the third switch is connected with a series node of the second resistor and the third resistor; one end of the fourth switch is connected with a series node of the third resistor and the fourth resistor; one end of the fifth switch is connected with a series node of the fourth resistor and the fifth resistor; one end of the sixth switch is connected with a series node of the fifth resistor and the sixth resistor; one end of the seventh switch is grounded; the other end of the first switch, the other end of the second switch, the other end of the third switch, the other end of the fourth switch, the other end of the fifth switch, the other end of the sixth switch and the other end of the seventh switch are mutually connected to serve as output ends of the voltage dividing circuit.
Further, one of the first switch, the second switch, the third switch, the fourth switch, the fifth switch, the sixth switch and the seventh switch is turned on at the same time.
The invention provides a method for determining the boot mode of a chip by detecting the voltage of a starting pin by using an ADC (analog to digital converter), which can reduce the occupation of the starting pin, reduce the area of the chip, reduce the cost of the chip and improve the market competitiveness of the chip.
Drawings
FIG. 1 is a flow chart showing a specific process of selecting a corresponding start mode according to a voltage value of a start pin according to the present invention;
fig. 2 is a circuit schematic diagram of a start-up mode control circuit of the chip of the present invention.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
The method for controlling the starting mode of the chip comprises the following steps:
detecting the voltage of a starting pin of the chip, and selecting a corresponding starting mode according to the voltage value of the starting pin.
The voltage of the enable pin is measured using an ADC (analog to digital conversion circuit) inside the chip. The starting pin is connected with the peripheral voltage dividing circuit. The output voltage of the peripheral voltage dividing circuit is the voltage of the starting pin. The voltage of the starting pin is controlled by controlling the output voltage of the peripheral voltage dividing circuit, so that the starting mode of the chip is further controlled.
Further, in a preferred embodiment of the present application, selecting the corresponding start mode according to the voltage value of the start pin specifically includes:
step S1, the ADC of the chip detects the voltage of a starting pin, if the voltage of the starting pin is smaller than a first set value, a USB (Universal Serial Bus ) starting mode is selected, otherwise, the step S2 is performed.
At the beginning of chip power-on, hardware initialization, such as starting the clocks of the modules, initializing dram (Dynamic Random Access Memory ), initializing ADC, etc., is performed first. Then the chip starts the ADC to detect the voltage of the starting pin, and judges the starting mode of the chip according to the detected voltage value. The starting modes of the chip include, but are not limited to, a USB (universal serial bus) starting mode (Usb boot), a Uart (Universal Asynchronous Receiver/Transmitter) starting mode (Uart boot), a flash memory starting mode (U disk boot), a Nor nonvolatile flash memory starting mode (Nor flash boot), a Nand nonvolatile flash memory starting mode (NAND FLASH boot) and an SD card starting mode (SD boot).
Nor and Nand are the two most dominant nonvolatile flash memory technologies, which are well known in the art and are not described in detail herein.
The voltage of the USB start-up mode is typically around 0.3V, so the first set point is typically set to 0.3V. The specific values of the first set point should not be taken as limiting the invention.
And S2, if the voltage of the starting pin is smaller than a second set value, selecting a Uart starting mode, otherwise, turning to step S3.
The second set point is typically set to 0.8V. The specific values of the second set point should not be taken as limiting the invention.
And S3, if the voltage of the starting pin is smaller than a third set value, selecting a flash starting mode, otherwise, turning to step S4.
The third set point is typically set to 1.3V. The specific numerical value of the third set point should not be taken as limiting the invention.
And S4, if the voltage of the starting pin is smaller than the fourth set value, selecting a Nor nonvolatile flash memory starting mode, otherwise, turning to step S5.
The fourth set point is typically set to 1.8V. The specific value of the fourth set point should not be taken as limiting the invention.
If the ADC detects that the voltage of the starting pin is 1.5V, the program enters a nor flash boot mode, a nor flash controller is initialized, codes on the nor flash are read into a ram to operate, and then the codes are operated.
And S5, if the voltage of the starting pin is smaller than a fifth set value, selecting a Nand nonvolatile flash memory starting mode, otherwise, selecting an SD card starting mode.
The fifth set point is typically set to 2.3V. The specific values of the fifth set point should not be taken as limiting the invention.
The magnitude of the set values is smaller than the first set value, smaller than the second set value, smaller than the third set value, smaller than the fourth set value and smaller than the fifth set value.
According to the method for controlling the starting mode of the chip, when the chip has a plurality of starting modes, the plurality of starting modes can be completed only by one starting pin. So as to reduce the occupation of pin pins, reduce the area of the chip, reduce the cost of the chip and improve the market competitiveness of the chip.
The invention discloses a start mode control circuit of a chip, which comprises the chip and a voltage dividing circuit. The pins of the chip at least comprise a start pin. The starting pin is connected with the output end of the voltage dividing circuit. The chip comprises an analog-to-digital conversion circuit ADC and a central control unit CPU. The analog-to-digital conversion circuit is used for detecting the voltage of the starting pin, and the central control unit selects the starting mode of the chip according to the voltage of the starting pin.
Further, in a preferred embodiment of the present application, the voltage dividing circuit includes resistors R1-R6, switches S1-S7. The resistors R1-R6 are sequentially connected in series. One end of the resistor R1 is used as one end of the voltage dividing circuit to be connected with a power supply. One end of the resistor R6 is grounded as the other end of the voltage dividing circuit. One end of the switch S1 is connected to a power supply. One end of the switch S2 is connected to a series node of the resistor R1 and the resistor R2. One end of the switch S3 is connected to a series node of the resistor R2 and the resistor R3. One end of the switch S4 is connected to a series node of the resistor R3 and the resistor R4. One end of the switch S5 is connected to a series node of the resistor R4 and the resistor R5. One end of the switch S6 is connected to a series node of the resistor R5 and the resistor R6. One end of the switch S7 is grounded. The other end of the switch S1, the other end of the switch S2, the other end of the switch S3, the other end of the switch S4, the other end of the switch S5, the other end of the switch S6 and the other end of the switch S7 are connected with each other as output ends of the voltage dividing circuit to be connected to a start pin of the chip.
Normally, one of the switches S1-S7 is closed at the same time, and after a certain switch is closed, the starting pin of the chip generates voltage. The voltage of the starting pin is detected through the ADC of the chip, and the CPU of the chip determines different BOOT modes according to the voltage value of the starting pin. Assuming that r1=r2=r3=r4=r5=r6, the power supply is 3V. Then, according to the voltage division theorem, the switch S1 is closed, and when the other switches are opened, the voltage of the start pin is 3V. When the switch S2 is closed and the other switches are opened, the voltage of the starting pin is 2.5V. When the switch S3 is closed and the other switches are opened, the voltage of the starting pin is 2V. When the switch S4 is closed and the other switches are opened, the voltage of the starting pin is 1.5V. When the switch S5 is closed and the other switches are opened, the voltage of the starting pin is 1V. When the switch S6 is closed and the other switches are opened, the voltage of the starting pin is 0.5V. When the switch S7 is closed and the other switches are opened, the voltage of the starting pin is 0V.
The starting mode of the chip can be further controlled by controlling the output voltage of the peripheral voltage dividing circuit through controlling the on of the switches S1-S7. It can be seen that the start mode control circuit of the chip can complete a plurality of start modes by only one start pin when the chip has a plurality of start modes. So as to reduce the occupation of pin pins, reduce the area of the chip, reduce the cost of the chip and improve the market competitiveness of the chip. The analog-to-digital conversion circuit is not limited, and the analog-to-digital conversion circuit can be realized, and the voltage of the starting pin can be detected.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; may be mechanically connected, may be electrically connected or may be in communication with each other; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
The above description is for the purpose of illustrating the embodiments of the present invention and is not to be construed as limiting the invention, but is intended to cover all modifications, equivalents, improvements and alternatives falling within the spirit and principles of the invention.

Claims (4)

1. The method for controlling the starting mode of the chip is characterized by detecting the voltage of a starting pin of the chip and selecting a corresponding starting mode according to the voltage value of the starting pin; the start mode includes: USB starting mode, uart starting mode, flash starting mode, nor nonvolatile flash starting mode, nand nonvolatile flash starting mode and SD card starting mode;
the voltage of the starting pin of the detection chip specifically comprises:
Detecting the voltage of a starting pin of the chip by using an analog-to-digital conversion circuit in the chip; the starting pin is connected with a peripheral voltage dividing circuit; the output voltage of the peripheral voltage dividing circuit is the voltage of the starting pin; the voltage of the starting pin is controlled by controlling the output voltage of the peripheral voltage dividing circuit;
The peripheral voltage dividing circuit includes: a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch, and a seventh switch;
the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor are sequentially connected in series, one end of the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor is connected with a power supply, and the other end of the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor are grounded;
One end of the first switch is connected with a power supply; one end of the second switch is connected with a series node of the first resistor and the second resistor; one end of the third switch is connected with a series node of the second resistor and the third resistor; one end of the fourth switch is connected with a series node of the third resistor and the fourth resistor; one end of the fifth switch is connected with a series node of the fourth resistor and the fifth resistor; one end of the sixth switch is connected with a series node of the fifth resistor and the sixth resistor; one end of the seventh switch is grounded; the other end of the first switch, the other end of the second switch, the other end of the third switch, the other end of the fourth switch, the other end of the fifth switch, the other end of the sixth switch and the other end of the seventh switch are mutually connected, and serve as an output end of the voltage dividing circuit to be connected to a starting pin of the chip;
At the same time, one and only one of the first switch, the second switch, the third switch, the fourth switch, the fifth switch, the sixth switch, and the seventh switch is closed; after a certain switch is closed, a starting pin of the chip generates voltage;
The voltage of the starting pin is detected through an analog-digital conversion circuit of the chip.
2. The method for controlling a start-up mode of a chip according to claim 1, wherein selecting a corresponding start-up mode according to a voltage value of a start pin specifically comprises:
Step S1, if the voltage of the starting pin is smaller than a first set value, selecting a USB starting mode, otherwise, turning to step S2;
Step S2, if the voltage of the starting pin is smaller than a second set value, selecting a Uart starting mode, otherwise, turning to step S3;
step S3, if the voltage of the starting pin is smaller than a third set value, selecting a flash starting mode, otherwise, turning to step S4;
Step S4, if the voltage of the starting pin is smaller than a fourth set value, selecting a Nor nonvolatile flash memory starting mode, otherwise, turning to step S5;
And S5, if the voltage of the starting pin is smaller than a fifth set value, selecting a Nand nonvolatile flash memory starting mode, otherwise, selecting an SD card starting mode.
3. The method according to claim 2, wherein the first setting value < the second setting value < the third setting value < the fourth setting value < the fifth setting value.
4. The starting mode control circuit of the chip is characterized by comprising the chip and a voltage dividing circuit; the output end of the voltage dividing circuit is connected to a starting pin of the chip; the chip comprises an analog-to-digital conversion circuit and a central control unit; the analog-to-digital conversion circuit is used for detecting the voltage of the starting pin; the central control unit selects a starting mode of the chip according to the voltage of the starting pin;
The voltage dividing circuit comprises a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch and a seventh switch; the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor are sequentially connected in series, one end of the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor is connected with a power supply, and the other end of the first resistor, the second resistor, the third resistor, the fourth resistor, the fifth resistor and the sixth resistor are grounded; one end of the first switch is connected with a power supply; one end of the second switch is connected with a series node of the first resistor and the second resistor; one end of the third switch is connected with a series node of the second resistor and the third resistor; one end of the fourth switch is connected with a series node of the third resistor and the fourth resistor; one end of the fifth switch is connected with a series node of the fourth resistor and the fifth resistor; one end of the sixth switch is connected with a series node of the fifth resistor and the sixth resistor; one end of the seventh switch is grounded; the other end of the first switch, the other end of the second switch, the other end of the third switch, the other end of the fourth switch, the other end of the fifth switch, the other end of the sixth switch and the other end of the seventh switch are mutually connected to serve as output ends of the voltage dividing circuit;
And one of the first switch, the second switch, the third switch, the fourth switch, the fifth switch, the sixth switch and the seventh switch is turned on at the same time.
CN202011200869.2A 2020-11-02 Method and circuit for controlling starting mode of chip Active CN112433895B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011200869.2A CN112433895B (en) 2020-11-02 Method and circuit for controlling starting mode of chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011200869.2A CN112433895B (en) 2020-11-02 Method and circuit for controlling starting mode of chip

Publications (2)

Publication Number Publication Date
CN112433895A CN112433895A (en) 2021-03-02
CN112433895B true CN112433895B (en) 2024-06-21

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628426A (en) * 2017-03-17 2018-10-09 立锜科技股份有限公司 Operation mode decision circuitry and its method
CN110888680A (en) * 2019-11-26 2020-03-17 珠海泰芯半导体有限公司 Starting method and system of embedded processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628426A (en) * 2017-03-17 2018-10-09 立锜科技股份有限公司 Operation mode decision circuitry and its method
CN110888680A (en) * 2019-11-26 2020-03-17 珠海泰芯半导体有限公司 Starting method and system of embedded processor

Similar Documents

Publication Publication Date Title
US10162774B2 (en) Intelligent voltage regulator
JP4299883B2 (en) Automatic voltage detection when multiple voltages are applied
KR101659094B1 (en) Systems and circuits with multirange and localized detection of valid power
US20090031048A1 (en) Configuring Multi-Bit Slave Addressing on a Serial Bus Using a Single External Connection
US5894423A (en) Data processing system having an auto-ranging low voltage detection circuit
US9959128B2 (en) Digital sensor system
TW201234184A (en) Adaptive USB charging method and system
CN108663070B (en) Digital sensor system
US20090177819A1 (en) Integrated circuit cards including multiple communication interfaces and related methods of operation
US7372760B2 (en) Semiconductor device and entry into test mode without use of unnecessary terminal
CN112433895B (en) Method and circuit for controlling starting mode of chip
CN112433895A (en) Chip starting mode control method and control circuit
CN113345494B (en) Semiconductor device with a semiconductor device having a plurality of semiconductor chips
US20070150217A1 (en) Low-voltage detection device and low-voltage detection method
CN103297053B (en) A/D converter circuit and microcontroller and sampling time method of adjustment
CN115060976A (en) Capacitance detection device, detection method and electronic equipment
US9184760B2 (en) Semiconductor device
CN113433406A (en) Key detection circuit and terminal equipment
CN217821606U (en) Multi-loading control circuit and system of FPGA firmware
JP2010087959A (en) Semiconductor device
CN110632999A (en) Power management device of storage equipment
JPH10320271A (en) Microcomputer system

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant