Smart mobile phone and its data transmission method and systemTechnical field
The present invention relates to technical field of data transmission, more particularly to a kind of smart mobile phone and its data transmission method and beingSystem.
Background technology
Two processors are generally comprised in intelligent mobile phone platform:The referred to as application processor of responsible calculating business(Application Processor, AP), that is responsible for communication service is referred to as BBP(Base band Processor,BP).Two processors have each independent storage system, and the chip operation program that runs is also completely self-contained.
The online upgrading of smart mobile phone not only includes the chip operation program upgrading of application processor, while also including base bandThe chip operation program upgrading of processor.Wherein, application processor can be directly by downloading data bag to the storage system of itselfOnline upgrading is carried out in system, and BBP itself does not have the function of file download, accordingly, it would be desirable to by application processor elder generationPacket is downloaded in the storage system of application processor control, then the storage that above-mentioned packet is controlled by application processorIn transmitting in system to the storage system of BBP control.
Pass through USB in prior art(Universal Serial Bus, USB)Or universal asynchronous receiving-transmitting is passedDefeated device(Universal Asynchronous Receiver/Transmitter, UART)To realize application processor and base bandData transfer between processor.
When the data transfer between application processor and BBP is realized using USB, due to BBPUSB controller and USB interface are not included, the therefore realization of such scheme needs USB controls are set up on BBPDevice and USB interface, result in BBP high cost and take up room excessive.
When the data transfer between application processor and BBP is realized using UART, due to the transmission of UART, generally in below 5Mbps, therefore transfer rate is too slow for speed, it is impossible to meets and requires.
As can be seen here, realize in prior art that the method for data transfer between application processor and BBP cannot be sameWhen take into account the requirement of cost and transfer rate.
Content of the invention
What the present invention was solved is the method for realizing data transfer between application processor and BBP in prior artThe technical problem of cost and transfer rate is taken into account simultaneously cannot.
In order to solve the above problems, the embodiment of the present invention provides a kind of data transmission method, at application processor and base bandReason device is transmitted by data handshakes data wire control data, including:
When determining the data handshakes data wire for the first time in the first level, the application processor is by outside serialIf the data output data wire of interface SPI is to the length information of the BBP transmission objectives file;
When determining that the data handshakes data wire is in the first level second, the application processor is by describedThe data output data wire of SPI transmits the file destination to the BBP.
Optionally, institute is transmitted to the BBP by the data output data wire of SPI in the application processorAfter stating file destination, also include:
The BBP is verified to the file destination for receiving, and draws check results information;
When the data handshakes data wire third time is determined in the first level, the BBP is by SPI'sData input data wire transmits the check results information to the application processor.
Optionally, institute is transmitted to the application processor by the data input data wire of SPI in the BBPAfter stating check results information, in the case where the check results information is for mistake, also include:
When determining that the data handshakes data wire is in the first level the 4th time, the application processor is by describedThe data output data wire of SPI transmits the file destination to the BBP.
Optionally, institute is transmitted to the application processor by the data input data wire of SPI in the BBPAfter stating check results information, in the case where the check results information is for mistake, also include:
When determining that the data handshakes data wire is in the first level the 4th time, the application processor is by describedThe data output data wire of SPI transmits the length information of the file destination to the BBP;
When determining that the data handshakes data wire is in the first level the 5th time, the application processor is by describedThe data output data wire of SPI transmits the file destination to the BBP.
Optionally, the file destination is the chip operation program upgrade file of the BBP.
In order to solve the above problems, the embodiment of the present invention also provides a kind of data transmission system, including:Application processor andBBP, the application processor and the BBP are held by the data output data wire and data of SPI respectivelyHand data wire is connected, wherein:
The application processor, when determining the data handshakes data wire for the first time in the first level, by describedThe data output data wire of SPI sends the length information of file destination to the BBP;When the determination data handshakesWhen data wire is in the first level second, institute is sent to the BBP by the data output data wire of the SPIState file destination;
The BBP, when determining the data handshakes data wire for the first time in the first level, by describedThe data output data wire of SPI receives the length information of the file destination that the application processor sends;Described when determiningWhen data handshakes data wire is in the first level second, by answering use described in the data output data wire reception of the SPIThe file destination that reason device sends.
Optionally, data input data wire of the application processor with the BBP also by SPI is connected,
The BBP, is additionally operable to the file destination to receiving and verifies, draw check results information;When the data handshakes data wire third time is determined in the first level, by the data input data wire of the SPI to instituteState application processor and send the check results information;
The application processor, is additionally operable to, when the data handshakes data wire third time is determined in the first level, lead toThe data input data wire for crossing the SPI receives the check results information that the BBP sends.
Optionally, the application processor, be additionally operable to the BBP by the data input data wire of SPI toAfter the application processor sends the check results information, in the case where the check results information is for mistake, when trueWhen the fixed data handshakes data wire is in the first level the 4th time, by the data output data wire of the SPI to the baseProvided with processor sends the file destination;
The BBP, is additionally operable to sending institute by the data input data wire of SPI to the application processorAfter stating check results information, in the case where the check results information is for mistake, when the determination data handshakes data wireWhen being in the first level the 4th time, received described in the application processor transmission by the data output data wire of the SPIFile destination.
Optionally, the application processor, be additionally operable to the BBP by the data input data wire of SPI toAfter the application processor sends the check results information, in the case where the check results information is for mistake, when trueWhen the fixed data handshakes data wire is in the first level the 4th time, by the data output data wire of the SPI to the baseProvided with processor sends the length information of the file destination;When determining that the data handshakes data wire is in the first level the 5th timeWhen, the file destination is sent to the BBP by the data output data wire of the SPI;
The BBP, is additionally operable to sending institute by the data input data wire of SPI to the application processorAfter stating check results information, in the case where the check results information is for mistake, when the determination data handshakes data wireWhen being in the first level the 4th time, received described in the application processor transmission by the data output data wire of the SPIThe length information of file destination;When determining that the data handshakes data wire is in the first level the 5th time, by the SPI'sData output data wire receives the file destination that the application processor sends.
Optionally, the file destination is the chip operation program upgrade file of the BBP.
In order to solve the above problems, the embodiment of the present invention also provides a kind of smart mobile phone, including above-mentioned data transmission system.
Compared with prior art, the technical scheme of the embodiment of the present invention has advantages below:
Sequential by the level state of identification data handshake data line and in the level state, controls to applyProcessor by the data output data wire of existing SPI to BBP transmission data, so as to need only to set up oneData wire, you can realize the function of data transfer between application processor and BBP and data-flow-control, low cost,The little, transfer rate that takes up room is fast.And as the level change of hardware can be detected in microsecond rank, therefore respond speedDegree is faster.
Further, the BBP is verified to the file destination for receiving, and show that check results are believedBreath, and changed by the level of the data handshakes data wire, indicate that the BBP is anti-to the application processorFeedback check results information, so that furthermore achieved that the function of reception state reply.
Further, in the case where the check results information is for mistake, by the electricity of the data handshakes data wireFlat change, indicates that the application processor carries out the re-transmission of wrong data to the BBP, so as to further realizeThe function of erroneous retransmissions.
Description of the drawings
Fig. 1 is data transmission system structured flowchart in the embodiment of the present invention;
Fig. 2 is data transmission method flow chart in the embodiment of the present invention one;
Fig. 3 is data handshakes data wire operating protocol sequential chart in the embodiment of the present invention one;
Fig. 4 is data transmission method flow chart in the embodiment of the present invention two.
Specific embodiment
Serial Peripheral Interface (SPI)(Serial Peripheral Interface, SPI)Worked with master-slave mode, generally includedFrom equipment, SPI standard agreement includes four data lines, respectively clock signal data line to one main equipment and at least one(SCK), data output data wire(SDO), data input data wire(SDI)Data wire is selected with piece(CS).
It is connected by SPI between application processor and BBP, wherein, the transfer rate of SPI can reachThe transfer rate of 50Mbps, significantly larger than UART.As shown in figure 1, in the embodiment of the present invention, included by SPI standard agreementOn the basis of four data lines, a single data handshake data line Request_CLK is increased, by identification data handshake data lineLevel state and the sequential in the level state, the data for controlling application processor 101 by existing SPI are defeatedGo out data wire to 102 transmission data of BBP, so as to need only to set up data lines, you can realize application processorThe function of data transfer and data-flow-control between 101 and BBP 102, low cost, take up room little, transfer rateHurry up.And as the level change of hardware can be detected in microsecond rank, therefore response speed is faster.
For more fully understanding those skilled in the art and realizing the present invention, referring to the drawings, by specific embodimentIt is described in detail.
Embodiment one
Data transmission method flow chart with reference to shown in Fig. 2, is described in detail below by way of concrete steps:
S201, when determining the data handshakes data wire for the first time in the first level, the application processor passes throughLength information of the data output data wire of serial peripheral equipment interface SPI to the BBP transmission objectives file.
In the present embodiment, application processor and BBP are transmitted by data handshakes data wire control data.
In being embodied as, the application processor and the BBP determine whether data handshakes data wire is inThe action of the first level can be separate, i.e., described application processor and the BBP determine the number respectivelyThe first level whether is according to handshake data line, rather than testing result is transferred to the opposing party again after only being detected by a side.
In being embodied as, first level can be low level, in the case of first level is low level,The high level produced when can avoid system electrification is mistakenly considered data transfer signal.It is understood that first electricityFlat can also be high level, and in the case where first level is high level, application processor and BBP can be with headProduce when first judging whether the high level is system electrification, for example, can be realized by way of software, so as to avoidThe erroneous judgement of signal.
The application processor is a continuous process to the length information of the BBP transmission objectives file,From the beginning of the data handshakes data wire is detected for the first level, till lasting till that first level terminates.
S202, when determining that the data handshakes data wire is in the first level second, the application processor passes throughThe data output data wire of the SPI transmits the file destination to the BBP.
In being embodied as, the file destination can be the chip operation program upgrade file of the BBP,Can certainly be other files.
By the level state of identification data handshake data line and in the level in step S201 and step S202The sequential of state, controls application processor by the data output data wire of existing SPI to BBP transmission data,Wherein, step S201 is used for data-flow-control, and step S202 is used for data transfer, so as to need only to set up data lines, i.e.,The function of data transfer and data-flow-control between achievable application processor and BBP, low cost, takes up roomLittle, transfer rate is fast.And as the level change of hardware can be detected in microsecond rank, therefore response speed is faster.
S203, the BBP are verified to the file destination for receiving, and draw check results information.
File destination is verified, show that the work of check results information can be independently complete by the BBPInto, specific verification mode can be diversified, for example can be by the check information that is included in file destination come rightFile destination is verified.
In being embodied as, can be by verification information Store in the header part of file destination.It is understood that describedCheck information is stored in the other parts of file destination.
S204, when the data handshakes data wire third time is determined in the first level, the BBP passes throughThe data input data wire of SPI transmits the check results information to the application processor.
In the present embodiment, changed by the level of the data handshakes data wire, indicate the BBP to instituteApplication processor feedback check object information is stated, so as to furthermore achieved that the function of reception state reply.
The operating protocol sequential chart of data handshakes data wire described in the present embodiment is as shown in figure 3, with described first in figureAs a example by level is low level.
Low level stage first time 301 of the data handshakes data wire is file destination Length Indication stage d1, now,The application processor passes through the length information of the data output data wire of SPI to the BBP transmission objectives file,To inform when data transfer terminates.
Second low level stage 302 of the data handshakes data wire is file destination data transfer phase d2, describedApplication processor transmits the file destination, the base by the data output data wire of the SPI to the BBPThe length information of the file destination that provided with processor was received according to low level stage first time 301 calculates when data transfer is tiedBeam.
The third time low level stage 303 of the data handshakes data wire is data receiving state recovery stage d3, describedBBP transmits the check results information by the data input data wire of SPI to the application processor.
In being embodied as, only when the check results information is mistake can feed back to the application processorCheck results information., in the case where check results information is not received, default data transmission is correct for the application processor.
It is understood that the function of reception state reply in being embodied as, can be realized using above-mentioned means, also may be usedTo realize the data transfer between application processor and BBP only by step S201 and step S202.
In the case where reception state recovery function is not needed, the file destination in S203 to receiving carries out schoolTest, can also omit in the lump the step of draw check results information.
In being embodied as, exceed default threshold when the time that application processor and BBP are not detected by the first levelDuring value, whole flow process can be reset.
Embodiment two
The present embodiment is with the difference of embodiment one, furthermore achieved that the function of erroneous retransmissions, with reference to Fig. 4 institutesThe data transmission method flow chart for showing, wherein step S201 to S204 are referred to the concrete steps in embodiment one, below in detailDescribe the bright step different from embodiment one in detail:
S205, when determining that the data handshakes data wire is in the first level the 4th time, the application processor passes throughThe data output data wire of the SPI transmits the file destination to the BBP.
Before erroneous retransmissions are carried out, need first to be verified to receiving file destination by the BBP, obtainGo out check results information, and by the check results feedback of the information to the application processor.Therefore, the reality of erroneous retransmissions functionOn the basis of now needing establishment step S203 and step S204, in the case where the check results information is for mistake, just carry outErroneous retransmissions.
S206, when determining that the data handshakes data wire is in the first level the 4th time, the application processor passes throughThe data output data wire of the SPI transmits the length information of the file destination to the BBP.
S207, when determining that the data handshakes data wire is in the first level the 5th time, the application processor passes throughThe data output data wire of the SPI transmits the file destination to the BBP.
When erroneous retransmissions are carried out, only the file destination can be retransmitted, i.e. execution step S205, it is also possible toThe length information and the file destination of the file destination are all retransmitted, i.e. execution step S206 and step S207.
In being embodied as, can further to re-transmission after data verify again, and in check results informationData re-transmission is carried out again in the case of for mistake, till data transfer is correct.
In being embodied as, exceed default threshold when the time that application processor and BBP are not detected by the first levelDuring value, whole flow process is reset.
Embodiment three
Data transmission system with reference to shown in Fig. 1, including:Application processor 101 and BBP 102, the applicationProcessor 101 is connected with data handshake data line by the data output data wire of SPI respectively with the BBP 102,Wherein:
The application processor 101, when determining the data handshakes data wire for the first time in the first level, by instituteThe data output data wire for stating SPI sends the length information of file destination to the BBP 102;When the determination dataWhen handshake data line is in the first level second, by the data output data wire of the SPI to the BBP 102Send the file destination;
The BBP 102, when determining the data handshakes data wire for the first time in the first level, by instituteThe data output data wire for stating SPI receives the length information of the file destination that the application processor 101 sends;Work as determinationWhen the data handshakes data wire is in the first level second, described answering is received by the data output data wire of the SPIThe file destination sent with processor 101.
In the present embodiment, by the level state of identification data handshake data line and in the level state whenSequence, controls application processor 101 by the data output data wire of existing SPI to 102 transmission data of BBP, fromAnd need only to set up data lines, you can realize data transfer and the number of application processor 101 and BBP 102According to the function of stream control, low cost, the little, transfer rate that takes up room are fast.And as the level change of hardware can be in Microsecond gradeIt is not detected, therefore response speed is faster.
Data input data wire of the application processor 101 with the BBP 102 also by SPI is connected,
The BBP 102, is additionally operable to the file destination to receiving and verifies, and show that check results are believedBreath;When data handshakes data wire third time is determined in the first level, by the data input data wire of the SPI toThe application processor 101 sends the check results information;
The application processor 101, is additionally operable to when the data handshakes data wire third time is determined in the first level,The check results information that the BBP 102 sends is received by the data input data wire of the SPI.
Further, the file destination that the BBP 102 pairs is received is verified, and draws check resultsInformation, and changed by the level of the data handshakes data wire, indicate that the BBP 102 is processed to the application101 feedback check object information of device, so that furthermore achieved that the function of reception state reply.
The application processor 101, be additionally operable to the BBP 102 by the data input data wire of SPI toAfter the application processor 101 sends the check results information, in the case where the check results information is for mistake, whenDetermine the data handshakes data wire the 4th time in the first level when, by the data output data wire of the SPI to describedBBP 102 sends the length information of the file destination;When determining the data handshakes data wire the 5th time in theDuring one level, the file destination is sent to the BBP 102 by the data output data wire of the SPI;
The BBP 102, is additionally operable to passing through the data input data wire of SPI to the application processor 101After sending the check results information, in the case where the check results information is for mistake, when the determination data handshakesWhen data wire is in the first level the 4th time, the application processor 101 is received by the data output data wire of the SPIThe length information of the file destination for sending;When determining that the data handshakes data wire is in the first level the 5th time, pass throughThe data output data wire of the SPI receives the file destination that the application processor 101 sends.
Further, in the case where the check results information is for mistake, by the electricity of the data handshakes data wireFlat change, indicates that the application processor 101 carries out the re-transmission of wrong data to the BBP 102, so as to enter oneStep achieves the function of erroneous retransmissions.
Example IV
The present embodiment provides a kind of smart mobile phone, and the smart mobile phone includes the data transmission system provided in embodiment threeSystem.
The application processor of the smart mobile phone is directly carried out in the storage system of itself by downloading data bag onlineUpgrading, and packet is first downloaded to application processor control by application processor when carrying out online upgrading by BBPIn storage system, then depositing to BBP control in the storage system that above-mentioned packet is controlled, is transmitted by application processorIn storage system.
In the present embodiment, by the level state of identification data handshake data line and in the level state whenSequence, controls application processor by the data output data wire of existing SPI to BBP transmission data, so as to onlyNeed to set up data lines, you can realize data transfer between application processor and BBP and data-flow-controlFunction, low cost, the little, transfer rate that takes up room are fast.And as the level change of hardware can be detected in microsecond rank,Therefore response speed is faster.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is canCompleted with instructing the hardware of correlation by program, the program can be stored in a computer-readable recording medium, storageMedium can include:ROM, RAM, disk or CD etc..
Although present disclosure is as above, the present invention is not limited to this.Any those skilled in the art, without departing from thisIn the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim instituteThe scope of restriction is defined.