The content of the invention
It is an object of the invention to provide a kind of method that control chip enters different mode, it is intended to solve tradition
Chip operation mode control method not only lost time but also the problem of waste of resource.
The present invention is achieved in that a kind of method that control chip enters different mode, the control chip
Method into different mode includes:
Judge the state of the chip the first input and output foot and the second input and output foot;
The chip is controlled according to the state of the first input and output foot and the second input and output foot to enter
Corresponding pattern.
Further, phase is entered according to the state of the first input and output foot and the second input and output foot
The pattern answered is specially:
If the first input and output foot and the second input and output foot are high level, the chip is controlled
Into normal startup mode;
If the first input and output foot is high level, the second input and output foot is low level, controls institute
Chip is stated into burning pattern;
If the first input and output foot is low level, controls the chip and enter initial testing mode.
Further, if being low level in the first input and output foot, the chip enters initial testing mould
After formula, methods described also includes:
Judge whether the chip first powers on, if being judged as NO, control the chip and enter normal
Start-up mode;
If being judged as YES, the state of the second input and output foot is judged;
The chip is controlled according to the state of the second input and output foot and enters corresponding pattern.
Further, the state for judging the second input and output foot, according to second input and output
The state of foot controls the chip and is specially into corresponding pattern:
If the second input and output foot is continuously high level, controls the second input and output foot and be constantly in
Waiting state;
If the second input and output foot is low level, controls the chip and enter test selection pattern.
Further, after controlling the chip and entering test selection pattern, methods described also includes:
Judge the state of the first input and output foot;
According to the state of the first input and output foot, control the chip and enter corresponding module, specially:
If the first input and output foot is high level, controls the chip and enter test pattern on plate;
If the first input and output foot is low level, controls the chip and enter volume production test pattern.
Another object of the present invention is also resided in and provides the device that a kind of control chip enters different mode, the control
Coremaking piece enters the device of different mode to be included:
First judge module, for judging the shape of the chip the first input and output foot and the second input and output foot
State;
First mode control module, for according to the first input and output foot and the second input and output foot
State control the chip and enter corresponding pattern.
Further, the mode control module includes:
First mode select unit, if equal for the first input and output foot and the second input and output foot
For high level, control the chip and enter normal startup mode;
Second mode select unit, if being high level for the first input and output foot, second input
Output pin is low level, controls the chip and enters burning pattern;
3rd mode selecting unit, if being low level for the first input and output foot, controls the chip
Into initial testing mode.
Further, the control chip also includes into the device of different mode:
Second judge module, for judging whether the chip first powers on, if being judged as NO, institute
State chip and enter normal startup mode;
3rd judge module, for when second judge module is judged as YES, judging second input
The state of output pin;
Second mode control module, enters for controlling the chip according to the state of the second input and output foot
Enter corresponding pattern.
Further, the second mode control module includes:
Fourth mode select unit, if being continuously high level for the second input and output foot, control is described
Second input and output foot is constantly in waiting state;
5th mode selecting unit, if being low level for the second input and output foot, controls the chip
Into test selection pattern.
Further, the control chip also includes into the device of different mode:
4th judge module, for judging the state of the first input and output foot;
3rd mode control module, for according to the state of the first input and output foot, controlling the chip
Into corresponding module;
3rd mode control module includes:
6th mode selecting unit, if being high level for the first input and output foot, controls the chip
The test pattern on plate;
7th mode selecting unit, if being low level for the first input and output foot, controls the chip
Into volume production test pattern.
In the present invention, the control chip includes into the method for different mode:Chip completes analog reset
Decision procedure state is entered afterwards;Judge the state of the chip the first input and output foot and the second input and output foot;
Corresponding pattern is entered according to the state of the first input and output foot and the second input and output foot.At this
In invention, by the state for judging the common input and output foot of any two on chip, then the core is can control
Piece enters different mode of operations, without arranging specific pin in addition, when not only having economized on resources but also having saved
Between.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing and reality
Example is applied, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
Only to explain the present invention, it is not intended to limit the present invention.
First embodiment
First embodiment of the invention provides a kind of method that control chip enters different mode.
Fig. 1 shows that control chip provided in an embodiment of the present invention enters the flow chart of the method for different mode.
For convenience of description, illustrate only the part related to the embodiment of the present invention.
In step s 2, the state of the chip the first input and output foot and the second input and output foot is judged;
Judge the height of the chip the first input and output foot and the second input and output foot level.
Used as one embodiment of the invention, before step S2, methods described also includes:
Step S1:Chip completes to enter decision procedure state after analog reset;
As one embodiment of the invention, with the control chip into different mode method when use
Two input and output feet, i.e., two input and output pins of optional chip are defined as the first input and output foot and
Two input and output feet, during beginning, the first input and output foot and the second input and output foot acquiescence are pulled up,
After chip completes analog reset, the first input and output foot and the second input and output foot are entered and sentenced
Determine program state.
In step s3, controlled according to the state of the first input and output foot and the second input and output foot
The chip enters corresponding pattern.It is specific as follows:
Step S31:If the first input and output foot and the second input and output foot are high level, control
Make the chip and enter normal startup mode, i.e., described chip normal work.
Step S33:If the first input and output foot is high level, the second input and output foot is low electricity
It is flat, control the chip and enter burning pattern.
Under burning pattern, can be by the internal processes memory element of software program programming to the chip, such as
Programming is to FLASH (flash memory), OPT (One Time Programmable, One Time Programmable) etc..
Step S32:If the first input and output foot is low level, controls the chip and enter initial testing
Pattern.
After step S32 (i.e. described chip enters initial testing mode), methods described also includes:
Step S4:Judge whether the chip first powers on, if being judged as NO, control the chip
Into normal startup mode, if being judged as YES, execution step S5:Judge the second input and output foot
State.
When into initial testing mode, judge whether the chip is that the purpose for first powering on is:Prevent
Chip enters by mistake through other patterns in normal reset rather than during power-off reset.
Step S62:If the second input and output foot is continuously high level, second input is controlled
Output pin is constantly in waiting state;Purpose is to when volume production is tested after, accomplish controllable
Testing time.
Step S61:If the second input and output foot is low level, controls the chip and enter test selection
Pattern.
After controlling the chip and entering test selection pattern, execution step S7:Judge first input
The state of output pin;
Step S81:If the first input and output foot is high level, controls the chip and enter test on plate
Pattern;
Step S82:If the first input and output foot is low level, controls the chip and test into volume production
Pattern.
Second embodiment
The second embodiment of the present invention provides the device that a kind of control chip enters different mode.
Fig. 2 shows the module map of chip provided in an embodiment of the present invention.For convenience of description, illustrate only
The part related to the embodiment of the present invention.
As shown in Fig. 2 a kind of control chip enters the device of different mode, including:
First judge module 1, for judging the chip the first input and output foot and the second input and output foot
State.Judge the height of the chip the first input and output foot and the second input and output foot level.
As one embodiment of the invention, with the control chip into different mode method when use
Two input and output feet, i.e., two input and output pins of optional chip are defined as the first input and output foot and
Two input and output feet, during beginning, the first input and output foot and the second input and output foot acquiescence are pulled up,
After chip completes analog reset, the first input and output foot and the second input and output foot are entered and sentenced
Determine program state.
First mode control module 2, for according to the first input and output foot and second input and output
The state of foot controls the chip and enters corresponding pattern.
Used as one embodiment of the invention, mode control module 2 includes:
First mode select unit 21, if for the first input and output foot and the second input and output foot
High level is, the chip is controlled and is entered normal startup mode.
Second mode select unit 22, if being high level for the first input and output foot, described second is defeated
It is low level to enter output pin, controls the chip and enters burning pattern.Under burning pattern, can be by software
, to the internal processes memory element of the chip, such as programming is to FLASH (flash memory), OPT (One for program burn writing
Time Programmable, One Time Programmable) etc..
3rd mode selecting unit 23, if being low level for the first input and output foot, controls the core
Piece enters initial testing mode.
Used as one embodiment of the invention, the control chip enters the device of different mode also to be included:
Second judge module 3, for judging whether the chip first powers on, if being judged as NO,
The chip enters normal startup mode.
3rd judge module 4, for when second judge module is judged as YES, judging that described second is defeated
Enter the state of output pin.
Second mode control module 5, for controlling the chip according to the state of the second input and output foot
Into corresponding pattern.
When into initial testing mode, judge whether the chip is that the purpose for first powering on is:Prevent
Chip enters by mistake through other patterns in normal reset rather than during power-off reset.
Used as one embodiment of the invention, second mode control module 5 includes:
Fourth mode select unit 51, if being continuously high level for the second input and output foot, controls institute
State the second input and output foot and be constantly in waiting state.
5th mode selecting unit 52, if being low level for the second input and output foot, controls the core
Piece enters test selection pattern.
Used as one embodiment of the invention, the control chip enters the device of different mode also to be included:
4th judge module 6, for judging the state of the first input and output foot.
3rd mode control module 7, for according to the state of the first input and output foot, controlling the core
Piece enters corresponding module.
3rd mode control module 7 includes:
6th mode selecting unit 71, if being high level for the first input and output foot, controls the core
Piece enters test pattern on plate.
7th mode selecting unit 72, if being low level for the first input and output foot, controls the core
Piece enters volume production test pattern.
In the present invention, the control chip includes into the method for different mode:Chip completes analog reset
Decision procedure state is entered afterwards;Judge the state of the chip the first input and output foot and the second input and output foot;
Corresponding pattern is entered according to the state of the first input and output foot and the second input and output foot.At this
In invention, by the state for judging the common input and output foot of any two on chip, then the core is can control
Piece enters different mode of operations, without arranging specific pin in addition, when not only having economized on resources but also having saved
Between.
One of ordinary skill in the art will appreciate that:The step of realizing said method embodiment or part steps can
To be completed by the related hardware of programmed instruction, aforesaid program can be stored in embodied on computer readable storage
In medium, the program upon execution, performs the step of including said method embodiment, and aforesaid storage is situated between
Matter includes:ROM, RAM, magnetic disc or CD etc. are various can be with the medium of store program codes.
Presently preferred embodiments of the present invention is the foregoing is only, it is all at this not to limit the present invention
Any modification, equivalent and improvement made within bright spirit and principle etc., should be included in the present invention
Protection domain within.