The NFC clock control devices and its method of a kind of mobile terminal
Technical field
The present invention relates to the NFC clock controls of the NFC application fields of mobile terminal, more particularly to a kind of mobile terminal
Devices and methods therefor.
Background technology
With the development of mobile terminal technology, the function of mobile terminal is more and more.Current increasing mobile terminal
With NFC(Near Field Communication, near field communication (NFC))Function, can be in mobile device, consumption
Electronic product and smart control Tool Room carry out wireless near field communication.By NFC chip and the main control chip phase of mobile terminal
Connection;NFC chip operationally needs outside input clock, i.e. NFC clocks.
The NFC clock control modes used at present are lasting input NFC clocks.When user opens NFC function, master control core
Piece control NFC clocks are exported to NFC chip always;When user closes NFC function, main control chip control NFC clocks are closed.This
Kind of scheme the disadvantage is that, as long as user opens NFC function, always main control chip persistently exports NFC clocks;And user opens
During NFC function, NFC chip does not work in most cases, is waited for;And the NFC clocks of now main control chip output
Not used in NFC chip, the electricity for causing NFC clocks output module in main control chip is wasted, and power consumption is higher.
Therefore, prior art has yet to be improved and developed.
The content of the invention
The technical problem to be solved in the present invention is, for the drawbacks described above of prior art, there is provided a kind of mobile terminal
NFC clock control devices and its method, it is intended to solve existing mobile terminal NFC chip do not work also persistently export NFC clocks, make
The problem of electricity into NFC clock output modules is wasted and power consumption is higher.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of NFC clock control devices of mobile terminal, it includes master controller and NFC chip, and the master controller connects
Connect NFC chip;
Master controller instructs to start the clock request pattern of NFC chip to NFC chip send configuration, NFC chip according to
When whether it needs clock, corresponding clock request signal is sent to master controller;Master controller judges the clock request letter
Number command content, exported according to command content or stop exporting NFC clocks to NFC chip.
In the NFC clock control devices of described mobile terminal, the master controller includes:
Data communication interface, for carrying out data communication with NFC chip, transmission configuration is instructed to NFC chip, and is received
The clock request signal that NFC chip is sent;
Dispensing unit, for being instructed by data communication interface send configuration to NFC chip;
Clock request detection unit, for judging that the command content for the clock request signal that NFC chip is sent is that clock is beaten
Open request or clock turn-off request;
Clock control cell, is closed for exporting NFC clocks according to clock opening request to NFC chip, and according to clock
Request stops exporting NFC clocks to NFC chip;
The dispensing unit, data communication interface, clock request detection unit and clock control cell are sequentially connected, described
Data communication interface, clock control cell connection NFC chip.
In the NFC clock control devices of described mobile terminal, the model MSM8225 of the master controller, NFC chip
Model PN544;I2CSCL pin, I2CSDA pin, the BBCLK pin of master controller connect IF3 pin, the IF2 of NFC chip respectively
Pin, XTAL1 pin.
In the NFC clock control devices of described mobile terminal, the configuration-direct is a string of default data, for inciting somebody to action
NFC chip is configured to data mode tranmitting data register request signal.
In the NFC clock control devices of described mobile terminal, the master controller also includes:
Detection unit, the model for detecting NFC chip controls dispensing unit generation correspondence according to the model of NFC chip
Configuration-direct;
The detection unit connects dispensing unit.
A kind of NFC clock control methods of mobile terminal, it includes:
A, master controller instruct to start the clock request pattern of NFC chip to NFC chip send configuration;
When whether B, NFC chip need clock according to it, corresponding clock request signal is sent to master controller;
C, master controller judge the command content of the clock request signal, are exported according to command content or stop exporting
NFC clocks are to NFC chip.
In described NFC clock control methods, in the step A, when NFC chip starts, dispensing unit passes through number
Instruct to NFC chip to start the clock request pattern of NFC chip according to communication interface send configuration.
In described NFC clock control methods, in the step A, the configuration-direct is a string of default data, is used
It is configured in by NFC chip with data mode tranmitting data register request signal.
In described NFC clock control methods, specifically included in the step C:
The command content for the clock request signal that C1, clock request detection unit parsing NFC chip are sent;
Whether C2, the command content for judging the clock request signal open request with the clock prestored identical;It is identical then
Control clock control cell exports NFC clocks to NFC chip, different then execution step C3;
Whether C3, the command content for judging the clock request signal identical with the clock turn-off request prestored, it is identical then
Control clock control cell stops exporting NFC clocks to NFC chip, different then be not responding to.
In described NFC clock control methods, before the step A, in addition to:
A0, the model for detecting NFC chip, control dispensing unit to call corresponding configuration-direct according to the model of NFC chip.
The NFC clock control devices and its method of the mobile terminal provided compared to prior art, the present invention, pass through master control
Device processed instructs to start the clock request pattern of NFC chip to NFC chip send configuration, when whether NFC chip needs according to it
Corresponding clock request signal is sent during clock to master controller;Master controller judges the command content of the clock request signal,
Exported according to command content or stop exporting NFC clocks to NFC chip;When stopping NFC when NFC chip does not need NFC clocks
Clock is exported, and is reduced the power consumption after NFC function is opened, is saved power consumption, and its is simple in construction, full automation is controlled, conveniently
Energy consumption saves, is adapted to widely popularize.
Brief description of the drawings
Fig. 1 is the structure chart of the NFC clock control devices for the mobile terminal that the present invention is provided.
Fig. 2 is the detection method flow chart of the motherboard type for the mobile terminal that the present invention is provided.
Fig. 3 is the schematic diagram of the Application Example of NFC clock control devices one for the mobile terminal that the present invention is provided.
Embodiment
The present invention provides the NFC clock control devices and its method of a kind of mobile terminal, to make the purpose of the present invention, technology
Scheme and advantage are clearer, clear and definite, and the present invention is described in more detail for the embodiment that develops simultaneously referring to the drawings.It should manage
Solution, the specific embodiments described herein are merely illustrative of the present invention, is not intended to limit the present invention.
The present invention opens NFC clocks after NFC function and persistently exported for existing mobile terminal causes the problem of power consumption is higher,
Exported according to the actual demand of NFC chip or stop output NFC clocks, to reduce NFC power consumptions, save electric energy.Referring to Fig. 1,
The NFC clock control devices of the mobile terminal include master controller 100 and NFC chip 200, and the master controller 100 is connected
NFC chip 200.Master controller 100 instructs to start the clock request pattern of NFC chip 200 to the send configuration of NFC chip 200,
Whether NFC chip 200 needs to send corresponding clock request signal during clock to master controller 100 according to it;Master controller 100
Judge the command content of the clock request signal, exported according to command content or stop exporting NFC clocks to NFC chip 200.
It is to be appreciated that the master controller 100 also includes other modules, such as power supply module, what control NFC was opened and closed opens
Module is closed, the data that NFC chip is transmitted are carried out with the processor etc. of relevant treatment;It is prior art, does not make switching molding herein
Block is described in detail.
The master controller 100 includes:Data communication interface 110, dispensing unit 120, the and of clock request detection unit 130
Clock control cell 140.The dispensing unit 120, data communication interface 110, clock request detection unit 130 and clock control
Unit 140 is sequentially connected, the data communication interface 110, the connection NFC chip 200 of clock control cell 140.
Data communication interface 110 by the connection of some data communication line NFC chips relate in data communication, the present embodiment
And transmission configuration is instructed to NFC chip, and receive the clock request signal that NFC chip is sent.When the switch of master controller 100
When module control NFC chip is opened, dispensing unit 120 is instructed to NFC chip 200 by data communication interface send configuration.
The configuration-direct is a string of the default data defined according to NFC chip manufacturer(Such as 0x8767890123456,
It is previously written before dispatching from the factory according to the model of the NFC chip of installation in dispensing unit 120).The data can be controlled inside NFC chip
The working condition of corresponding registers starts the clock request pattern of NFC chip 200, and NFC chip 200 is configured to data shape
Formula tranmitting data register request signal.The command content of the clock request signal includes clock and opens request and clock turn-off request.
In other words, under clock request pattern, NFC chip 200 can detect whether oneself current working condition needs NFC clocks,
Need, send the clock opening request that NFC chip manufacturer defines(For a string of predetermined data, such as
0x1234567890123456001)To master controller 100, it is not necessary to which NFC clocks then send the clock that NFC chip manufacturer defines
Turn-off request(Also it is a string of predetermined data, such as 0x1234567890123456000)To master controller 100.
Data communication interface 110 receives the clock request signal and is transferred to clock request detection unit 130.When described
Clock request detection unit 130 judge NFC chip 200 send clock request signal command content be clock open request or
Clock turn-off request.Clock control cell 140 opens request according to clock and exports NFC clocks to NFC chip, if clock is closed
Request then stops exporting NFC clocks to NFC chip.So, the output of NFC clocks is stopped when NFC chip does not need NFC clocks,
The power consumption after NFC function is opened is reduced, power consumption is saved;Need to export NFC clocks during NFC clocks again, NFC chip is received
Related data is inputted or exported again after to NFC clocks, wireless near field communication is realized, NFC chip work is not interfered with, it is tied
Structure is simple, full automation is controlled, facilitate energy consumption to save, be adapted to widely popularize.
In the specific implementation, the NFC chip based on different model, its internal register circuit structure may be different.
If user changes or upgrading NFC chip causes its model change, user can search the corresponding configuration-direct of the model on the net
And write dispensing unit 120 and store.The present embodiment detects NFC chip by increasing by a detection unit in master controller 100
Model, according to the model of NFC chip control dispensing unit call corresponding configuration-direct.
NFC clock control devices based on above-mentioned mobile terminal, the clock when present invention also provides a kind of NFC of mobile terminal
Method processed, also referring to Fig. 1 and 2, the NFC clock control methods are as shown in Fig. 2 it includes:
S100, master controller instruct to start the clock request pattern of NFC chip to NFC chip send configuration;
When whether S200, NFC chip need clock according to it, corresponding clock request signal is sent to master controller;
S300, master controller judge the director data of the clock request signal, export or stop defeated according to director data
Go out NFC clocks to NFC chip.
In the step S100, when NFC chip starts, dispensing unit is instructed by data communication interface send configuration
Start the clock request pattern of NFC chip to NFC chip, NFC chip 200 is configured to ask with data mode tranmitting data register
Signal.I.e. under clock request pattern, NFC chip 200 can detect whether oneself current working condition needs NFC clocks, need
Then to send the clock opening request that NFC chip manufacturer defines(Such as 0x1234567890123456001), it is not necessary to NFC clocks
Then send the clock turn-off request that NFC chip manufacturer defines(Such as 0x1234567890123456000), it is specific such as above-mentioned embodiment
It is shown.
Data communication interface 110, which receives the clock request signal and is transferred to clock request detection unit 130, carries out phase
Close and judge.Then the step S300 is specifically included:
The command content for the clock request signal that step 31, clock request detection unit parsing NFC chip are sent;
Whether step 32, the command content for judging the clock request signal open request with the clock prestored identical;Phase
It is same then control clock control cell export NFC clocks to NFC chip, different then execution step C3;
Whether step 33, the command content for judging the clock request signal are identical with the clock turn-off request prestored, phase
Same then control clock control cell stops exporting NFC clocks to NFC chip, different then be not responding to.Specifically such as above-mentioned embodiment institute
Show.
NFC chip based on different model, its internal register circuit structure may be different.If user changes or risen
Level NFC chip causes its model change, and before the step S100, the present embodiment can also first detect the type of NFC chip
Number, control dispensing unit to call corresponding configuration-direct according to the model of NFC chip, specifically as shown in above-mentioned embodiment.
Please refer to Fig. 3, in a preferred embodiment, the model MSM8225 of master controller 100, NFC chip 200
Model PN544;I2CSCL pin, I2CSDA pin, the BBCLK pin of master controller 100 connect respectively NFC chip 200 IF3 pin,
IF2 pin, XTAL1 pin.Wherein, the I2CSCL pin, I2CSDA pin belong to data communication interface, for realize with NFC chip it
Between data communication.The BBCLK pin belong to clock control cell, for exporting or stopping to export NFC clocks to NFC chip.
The GPIO1 pin of the master controller 100 connect the VEN pin of NFC chip, and GPIO1 pin belong to switch module, for controlling NFC cores
Piece is opened or closed.
Dispensing unit instructs 0x8767890123456 by data communication interface to the send configuration of NFC chip 200, represents
NFC chip 200 is configured to data mode tranmitting data register request signal.When NFC chip 200 needs NFC clocks, during transmission
Clock request signal 0x1234567890123456001 is transmitted into clock request detection unit by data communication interface to be sentenced
It is disconnected.Clock request detection unit judges that 0x1234567890123456001 is identical with the clock opening request prestored, controls clock
During the BBCLK pin output NFC clocks of control unit 140.
When NFC chip 200 does not need NFC clocks, tranmitting data register request signal 0x1234567890123456000 passes through
Data communication interface, which is transmitted into clock request detection unit, to be judged.Clock request detection unit judges
0x1234567890123456001 opens request with the clock prestored and differed, but identical with the clock turn-off request prestored, then
When controlling the BBCLK pin stopping output NFC clocks of clock control cell.
In summary, the present invention stops the output of NFC clocks when NFC chip does not need NFC clocks, reduces NFC function
Power consumption after unlatching, saves power consumption;Need to export NFC clocks during NFC clocks again, NFC chip is received after NFC clocks again
Related data is inputted or exported, wireless near field communication is realized, NFC chip work is not interfered with, its is simple in construction, complete certainly
Dynamicization controls, facilitates energy consumption to save, be adapted to widely popularize.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect scope.