Be used for radio frequency non-contact smart card CPU and handle the method that receives data
Technical field
A kind of method of CPU processing reception data in the radio-frequency card that realizes relates to digital processing field, relates in particular to a kind of implementation method of CPU deal with data.
Background technology
IC (integrated circuit) smart card and is incorporating the main flow of current infotech, and it is with the information integration of its height, the security of height, and just day by day it is brilliant and magnificent.
Along with the continuous development of financial industry, socioeconomic making rapid progress, particularly public transport industry, wireless communication field, health-care industry, closed site management, identification, telephone communication, building security system or the like, what people were more and more many begins acceptance and uses the IC smart card.Bank service system particularly, IC smart card substitute ancient magnetic card and to serve masses day by day ripe.And " all-purpose card ", one card for multiple uses has brought very big raising for our quality of life.The automatic ammeter ' s reading meter of IC smart card system, coal gas/tap water kilowatt meter reading-out system, public transport/subway automatic ticketing/ticket-checking system, IC intelligent SIM card or the like in the mobile communication mobile phone, the IC smart card is more and more pressed close to our life, becomes us and divides in a step of life." swipe the card " and become a part indispensable in people's daily life.
In recent years, because the contact type CPU card in the IC smart card and the high safety confidentiality of non-contact IC intelligent RF card (built-in MCU, ASIC etc.) are a dark horse it in the IC field of intelligent cards, become the popular pet in the current IC smart card, application prospect is very wide.Abroad to the research of smart card with use early, particularly in the U.S., European countries etc.Smart card spreads all over each every aspect of society.Just as in the U.S., 20% ~ the ~ 30% of national consumption total value is finished by " swiping the card " consumption, this shows the degree that the IC smart card is popular and use.
Compare with contact intelligent card, contactless smart IC radio-frequency card (built-in MCU, ASIC etc.) has more superiority, and non-contact IC intelligent RF card (particularly contactless smart CPU card) has been represented the developing direction of whole intellective IC card, has a bright future.
But along with development of integrated circuits, smart card is more and more stricter to the requirement of area and power consumption, and the area of being pursued is more and more littler, and power consumption is more and more lower, and this is a challenge greatly to the deviser.In radio-frequency card, CPU handles the method that the general fashion that receives data adopts FIFO, and the space of using FIFO is after receiving all data, and CPU is just unified to be handled, but it is evident that the great chip occupying area of this meeting, the consumption power consumption that the thing followed also can be too much.The present invention is directed to this point, adopted a kind of relatively more novel method, make CPU handle the data that received better, and additionally do not increase chip area, and be implemented in that CPU has also handled data when receiving data.
Summary of the invention
In the contactless smart card agreement, carrier wave is modulated by the miller sign indicating number, almost all has carrier wave to suspend (pause) in each code element or the character, and in this case, chip does not have carrier signal, and then does not have clock, the decoded data of CPU intractable.The present invention is directed to this situation, the method that provides can solve CPU well and be difficult to handle decoded data problem.The present invention can additionally not increase chip area simultaneously on the basis of dealing with problems, and has realized finishing the processing of CPU to data in decoding.
The invention discloses a kind of method (with reference to the synoptic diagram of Fig. 1) of a kind of CPU to the back data processing of decoding.It can solve existence owing to pause in the carrier wave well and make the become problem of difficulty of CPU deal with data.Method of the present invention mainly contains four processes: clock switches-wakes up CPU-〉data processing-dispose.
Described clock switching is meant because CPU needs in a short period of time (receiving relatively) to handle the data of a byte, so needs higher frequency of operation in the CPU deal with data.Before the CPU deal with data, its frequency of operation to be switched on the higher frequency.
The described CPU of waking up is meant that wake CPU up in the suitable moment goes to handle decoded data.The moment that this method selection wakes CPU up is to wake CPU up behind the back to back pause after receiving a byte data.
Described data processing is meant that CPU correctly handles the decoded data in front in the time of necessity.
Described disposing is meant after CPU handles the data of decoding previously and can enters battery saving mode, can lower power consumption.
The present invention has the following advantages:
(1) the present invention has realized not increasing again when CPU handles decoded data the extra chip area of expense.
(2) the present invention has realized the function that handle on edge joint receipts data limit on the angle of data stream.
(3) the present invention can realize supporting the speed of the 848Kbps that stipulates in the contactless smart card agreement of ISO14443 type A in theory.
(4) the present invention does not adopt the mode that relatively more conventional CPU handles decoded data, has reduced hard-wired complexity and cost.
Description of drawings
Fig. 1 is the synoptic diagram of this method
Fig. 2 is the synoptic diagram under mode one situation during this method is used
Fig. 3 is the synoptic diagram under mode two situations during this method is used
Embodiment
With reference to the accompanying drawings, providing this concrete method implements to describe.
When using this method, need improve cpu clock frequency, and there are two kinds of situations available the opportunity of raising cpu clock frequency:
Mode one: after receiving each byte data, switch clock frequency (with reference to the synoptic diagram of Fig. 2).
The concrete operations mode is as follows:
Produce clock frequency switching signal a when receiving after the situation of a byte data back when also having data: CIF receives the data of a byte, behind back to back pause, produce CPU wake-up signal b afterwards.After CPU was waken up, the frequency of operation of CPU improved through clock switch circuit.Under higher frequency, CPU handles the data of previous byte in the regular hour.After CPU handles data, can enter battery saving mode, and the frequency of operation of CPU is switched back under the original frequency.
When receiving a byte data but the situation of back when no longer including data: CIF produces clock frequency switching signal a after receiving the data of a byte, produce CPU wake-up signal b receiving the end signal back of arriving afterwards.After CPU was waken up, the frequency of operation of CPU improved through clock switch circuit.Under higher frequency, CPU handles the data of previous byte in the regular hour.After CPU handles data, can enter battery saving mode, and the frequency of operation of CPU is switched back under the original frequency.
When data are discontented with a byte but the situation of reception end: CIF can't produce the clock frequency switching signal in advance in this case, it can only produce simultaneously with the CPU wake-up signal, promptly produces clock frequency switching signal a and CPU wake-up signal b after receiving the end signal arrival.In such cases, the back no longer includes data and arrives, even do not improve the frequency of operation of CPU, CPU also can have sufficient time deal with data, and therefore, the frequency of operation that also can select to improve CPU is handled the data of front.
Mode two: switch in the start bit of frame data, keep switching the higher clock frequency in back in the frame process always, the frequency of operation of CPU is switched back original frequency (with reference to the synoptic diagram of Fig. 3) at the stop bit of this frame.
The concrete operations mode is as follows: at the start bit SOF that detects frame data, CIF produces clock frequency switching signal a, and this moment, the clock with CPU switched under the higher frequency.After whenever receiving the data of a byte, CIF behind back to back pause, produces CPU wake-up signal b.Wake CPU up, under higher frequency of operation, handle the data of previous byte, before next pause comes, dispose.Can enter battery saving mode handle the data of previous byte as CPU after.Byte CPU of every reception just handles once, has so just realized the limit processing of edge joint receipts.When detecting the stop bit EOF of frame, CIF produces a clock frequency switching signal again, and the clock frequency of CPU is switched back original frequency.