CN101236539A - Card-reading device integration -type control chip and data access method - Google Patents
Card-reading device integration -type control chip and data access method Download PDFInfo
- Publication number
- CN101236539A CN101236539A CNA2007100083428A CN200710008342A CN101236539A CN 101236539 A CN101236539 A CN 101236539A CN A2007100083428 A CNA2007100083428 A CN A2007100083428A CN 200710008342 A CN200710008342 A CN 200710008342A CN 101236539 A CN101236539 A CN 101236539A
- Authority
- CN
- China
- Prior art keywords
- card
- data
- control chip
- card format
- format
- 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.)
- Granted
Links
Images
Landscapes
- Credit Cards Or The Like (AREA)
Abstract
The invention provides an integrated control chip for a card reader and a data access method thereof, wherein, the preferable embodiment of the disclosed integrated control chip comprises a transmission transceiver which is used for accessing data from the outside world, one or a plurality of card format interfaces which are respectively coupled to the transmission transceiver and used for respectively processing various card format data, a serial interface engine which is used for converting processed card format data into serial transmission format data, and a buffer which is used for buffering the serial transmission format data, wherein, data transmission on various card format interfaces is based on processing levels of the transmission transceiver. The integrated control chip for the card reader and the data access method thereof integrate data access of a plurality of card formats on a single chip, such as access control used for flash memory cards and smart cards, and avoid the phenomenon of confusion of processing data due to different drivers or interfaces through sequential control.
Description
Technical field
The present invention is about a kind of integration-type control chip and its data access method of reader device, especially in regard to using single-chip to control reader device and its access method of two or more specification simultaneously.
Background technology
Traditionally, the card reader of compatible flash card (Flash Memory card) and smart card (Smart card) all is to adopt a plurality of control chips simultaneously.Typical framework reader device synoptic diagram as shown in Figure 1, a flash card card reader chip 101 and a smart card reader chip 103, add USB line concentrator (hub) control chip 105 that connects external system and control the USB interface data stream in addition, formed a multi-functional card reader.Though it is lower that this card reader implements complexity, because of its higher production cost can lose the market competitiveness gradually.
As shown in Figure 1, known technology is for the card of compatible various ways, use a plurality of control chips with compatible different simultaneously cards, because operating system is different to request (request) mode of each card, so need different control chips, support two or more card if desired, then need two covers or the above diverse hardware of two covers to realize, so just need higher production cost.
In known technology, no matter be the integrative chip or the mode of a plurality of controllers, operating system (Operation System) is different to the request mode of flash card and smart card:
(1) flash card is to ask by file system (File System), is controlled by the driver of operating system internal standard usually;
(2) the request mode of smart card then is to use special-purpose application program, by the middle layer software (Middleware), if based on the PC/SC framework, the driver (driver) that the middle layer software provides as smart card service provider (Service Provider), the content in resource manager (Resource Manager) the common request smart card that provides with operating system manufacturer thus.
The driver (USBMass Storage driver) of the general mass storage that adopts of the driver of smart card and flash card is two does not have related independently code, the interaction data of they and card reader be based on USB handle (transaction) grade other.Two kinds of drivers are finished a complete solicit operation all needs one to a plurality of conversions (transfer), and card reader might receive other order that another driver sends over fully under the situation of also not finishing an operation.
Therefore, different request paths can cause the control chip deal with data to cause confusion.For example, file system need be read data from flash card, and this program can send an order of reading to card reader, and card reader begins from the flash card reading of data after receiving this order, and simultaneously the data of reading is put in the impact damper of USB.At this moment, if application program of intelligent card also requires to ask smart card, if card reader carries out after receiving this order immediately, the data that needed just now to pass on the flash card of file system just might be destroyed be fallen.
Summary of the invention
For overcoming known technology issuable signal confusion under the mutiread instruction fetch, the integration-type control chip of reader device of the present invention and the purpose of its data access method are the read-write control of integrated flash card and smart card on a single-chip, its preferred embodiment can be one and uses single-chip to read and write the multi-functional reader device of control, also provide a kind of mechanism of sequential control to take place to avoid data corruption, and can read while write flash card and smart card, and can reduce the cost of multi-functional reader device, increase competitiveness of product.
The present invention discloses a kind of integration-type control chip that is used in reader device, wherein the preferred embodiment of data access method comprises: the request signal that receives a card format earlier, follow request signal locking signal amount according to this card format, and carry out data access at this card format, finish the back release semaphore in access then, in above-mentioned steps, if receive the request signal of another card format, then another card format is introduced into dormant state and then carries out the following step: after above-mentioned steps finishes, another card format then enters wake-up states, and according to the request signal locking signal amount of another card format, carry out data access at another card format again, then finish the back release semaphore in access.
According to the data access method of described a plurality of card formats, the data access of wherein said card format and this another card format is controlled by same driver.
According to the data access method of described a plurality of card formats, wherein said card format is one of them of flash card form and smart card form.
And the preferred embodiment of the integration-type control chip in the reader device of the above-mentioned data access method of execution of the present invention includes: the transmitting transceiver device, in order to from extraneous access data; A plurality of card format interfaces are coupled to the transmitting transceiver device respectively, and in order to handle the card format data respectively; Serial interface engine is converted to serial transmission formatted data serial line interface in order to the card format data that will handle; And impact damper, in order to buffering serial transmission formatted data.Specifically, the data transmission on above-mentioned each card format interface is based on the processing rank of transmitting transceiver device.
According to described integration-type control chip, wherein said card format comprises flash card form and smart card form.
According to described integration-type control chip, the data access of wherein said a plurality of card formats is controlled by the standard driver of operating system.
The present invention also provides a kind of integration-type control chip, is applicable to the data access of a plurality of card formats, comprising: a transmitting transceiver device, in order to from extraneous access data; One card format interface is coupled to this transmitting transceiver device respectively, in order to handle the data of described card format; One serial line interface engine is converted to the data of a serial transformat in order to the data of the described card format that will handle; And an impact damper, in order to cushion the data of this serial transmission form; Wherein, the data transmission on this card format interface is based on the processing rank of this transmitting transceiver device, and with the data of the described card format of a time-sharing multiplex principle alternate treatment.
According to described integration-type control chip, wherein also comprise a microprocessing unit, this microprocessing unit is coupled to this serial interface engine and this impact damper, and produces the data of this serial transmission form according to this time-sharing multiplex principle according to a firmware.
According to described integration-type control chip, wherein said card format comprises flash card form and smart card form.
According to described integration-type control chip, the data access of wherein said a plurality of card formats is controlled by the standard driver of operating system.
The integration-type control chip of disclosed reader device and its data access method, its purpose is to integrate the read-write control of flash card and smart card on a single-chip, solve the phenomenon that known technology can cause the control chip deal with data to cause confusion at the request path of different cards, so, the mechanism that the invention provides a kind of sequential control is to avoid this chaotic the generation, and can reduce the cost of multi-functional reader device, increase competitiveness of product.
Description of drawings
Figure 1 shows that the reader device synoptic diagram of known technology;
Figure 2 shows that the present invention uses the configuration diagram of embodiment of the reader device of integration-type control chip;
Fig. 3 A and Fig. 3 B for system among the present invention respectively to the request flow process of flash card and smart card;
Figure 4 shows that the configuration diagram of integration-type control chip embodiment of the present invention;
Figure 5 shows that the access method process flow diagram of the reader device of integration-type control chip of the present invention.
Wherein, description of reference numerals is as follows:
101 flash card card reader chips
103 smart card reader chips
105 USB line concentrator control chips
21 computer systems
22 reader devices
25 reader devices
222 interfaces
221 integration-type control chips
215 drivers
214 file system
213 SCSI layers
215 drivers
212 application program of intelligent card
211 communication protocol of intelligent card
41 computer systems
42 reader devices
421 transmitting transceiver devices
425 integration-type control chips
423 serial interface engine
424 impact dampers
410 operating systems
411 driver A
412 driver B
427 interface A
428 interface B
401 flash memory card interfaces
402 intelligent card interfaces
431 flash cards
432 smart cards
Embodiment
The present invention is integration-type control chip and its data access method of reader device, the i.e. access control of integrated two or more specification on a single-chip, and followingly all will be controlled to be embodiment with the read-write of flash card (FlashMemory Card) and smart card (Smart Card).
Its preferred embodiment can be a kind of multi-functional reader device, principal character is used an integration-type control chip for this reader device, mechanism in conjunction with a kind of sequential control, except avoiding data corruption to take place, and can read while write flash card and smart card, and can reduce the cost of multi-functional reader device, increase competitiveness of product.
Computer operating system is different to the request mode of flash card and smart card, flash card is carried out request instruction by file system, as described in known technology, the request mode of smart card then is to use application program to pass through the middle layer software (Middleware), if based on PC/SC framework (the PC/SC specification allows the intelligent card reader between different vendor can read different smart cards mutually), the middle layer software should be the driver (driver) that smart card provider provides, and resource manager that provides with operating system manufacturer and smart card driver are asked the content in the access card thus.
For instance, if file system is just carried out data access with flash card, system promptly sends the order of a read-write to reader device, when reader device begins access data, and the data of reading can be put into the impact damper of access interface simultaneously, for example be coupled to serial interface engine (Serial Interface Engine, SIE) in the impact damper, serial interface engine described herein is converted to the data of serial transmission form in order to the data of the various card formats that will handle, and impact damper is in order to the data of buffering serial transmission form.At this moment, also have another application program of intelligent card also will carry out request instruction, if reader device receives the request of carrying out immediately after the order, then two kinds of signals situation of asking simultaneously may cause the data damage.Therefore, the present invention also provides the mechanism of sequential control in above-mentioned single-chip framework, to avoid this chaotic the generation.
Mention that at this reason that produces data corruption is that the driver of smart card driver and the general USB mass storage that adopts of request flash card is two and does not have related independently code, they and reader device interaction data be based on USB handle level other, yet for the read-write of integrating flash card and smart card is controlled on the single-chip, and solving the problem that different request paths can cause the control chip deal with data to cause confusion, single-chip reader device provided by the present invention is primarily aimed at indivedual requestors and carries out arrangement on the sequential.The present invention uses single control chip to carry out the control of flash card and the smart card of various embodiment, and wherein the framework of first embodiment sees also synoptic diagram shown in Figure 2.
See also Fig. 2, this embodiment utilizes a driver that the request of computer system end reading card device is arranged, and has only a series of complete operations to finish, and just allows next operation to pass to reader device.So, only need provide the card format interface on the hardware design, can be plural a plurality of interface, can be coupled to the transmitting transceiver device respectively, to handle the data of various card formats respectively, its preferred embodiment can comprise two kinds of interfaces (interface) such as flash card and smart card, to support the card of two or more specifications simultaneously.And this flash card also may have different designs because of different size, comprises the embodiment that does not show in the drawings: CF (Compact Flash) interface, in order to the signal in the access CF card; The SM/xD interface is in order to the signal in the access SM/xD card; MS (Memory Stick) interface is in order to the access MS card or the signal of MS/MSpro/MSproDuo card; The SD/MMC interface in order to signal of access SD/MMC card etc., makes the problem of utilizing driver provided by the present invention can not occur data corruption simultaneously to the request of two or more equipment.
As shown in the figure, the present invention uses the reader device of integration-type control chip to be divided into the part of computer system 21 and the part of reader device 22, if reader device 25 is by data of interface 222 accesses, this moment, the access control of these data was carried out in reader device 25 interior integration-type control chip 221 controls, and the data in this usb bus are temporary in the impact damper (not shown) earlier, data in order to buffering serial transmission form, afterwards by 215 catchers of the driver in the computer system 21, judge its data layout by the data in the impact damper, wherein preferred embodiment judges that thus the flash memory form still is the smart card form, allows operating system (OS) part can read the data of card in the reader device 25 smoothly.If be judged as the flash memory form this moment, then send the order of a read/write to reader device 25 by SCSI layer 213 and driver 215 by file system 214, after reader device 25 is received this order, begin from the flash card reading of data or write data, the data of being read and write this moment all can be kept in earlier in the impact damper (as above-mentioned impact damper) in the USB device.If driver 215 judges that these data are the data layout of smart card, then utilize the PC/SC communication protocol 211 of standard by associated smart card application program 212, carry out data access by driver 215 reading card devices 25.
According to the configuration diagram of the invention described above, the foundation of request is sent in the judgement that the integration-type control chip that is provided will utilize requestor to discharge (release) or locking (lock) semaphore (semaphore) to different cards as this control chip.If disclosed reader device support at least the first card and the data layout of second card, when computer system send first card request (time, promptly lock a semaphore, and after the data access of finishing first card, promptly discharge this semaphore; Simultaneously, under the blocked state of semaphore, system also sends request to second card, and this requestor will enter dormant state, after the data access of first card is finished and after this semaphore also was released, the requestor of second card promptly was waken up.Cooperate locking, release, dormancy and the mechanism of the sequential control of means such as wake up by the integration-type control chip that uses in the above-mentioned reader device, the data corruption phenomenon when avoiding access between described multiple card.
For instance, when file system need be when flash card reads data, application program of intelligent card also sends an APDU (Application Protocol Data Unit to smart card simultaneously, the interapplication communications protocol-data-unit) request, expression need be carried out access to smart card, but this moment, file system was to the above-mentioned semaphore of flash card locking, application program of intelligent card will enter dormant state (sleep) to the requestor of smart card, wait for the flash card release semaphore, just can carry out taking of resource.Above-mentioned APDU is the communication protocol of reader device and smart card, so as long as send the APDU signal to reader device, reader device just can be done communication with card; And semaphore to take with discharging be driver handles by reader device provided by the present invention, its flow process is as shown in Figure 3A.
The flow process of Fig. 3 A is divided into integration-type control chip provided by the present invention respectively to the request flow process of first card (flash card) and second card (smart card), and during beginning, control chip sends or receive request signal at first card earlier:
First card format is the flash card form in this example, second card format is the smart card form, when file system is sent will carry out the request signal of access the time flash card (first card) by driver, promptly receive the request signal of this flash card form this moment at the integration-type control chip of step S301 reader device; Then, at the conformability control chip of step S303 reader device by driver at this requestor locking signal amount; Because finish the locking signal amount, then can carry out the data access action at step S305 to flash card, if be used among the embodiment of USB interface, promptly use the host-host protocol that meets the USB specification to carry out the access of data, mainly comprise and send the read/write instruction, carry out the data of read/write flash card and respond read/write state etc.; After data access is finished, promptly discharge this semaphore at step S307.
On the other hand, when carrying out the flash card access action, smart card (second card) application program is sent request signal to smart card, receive this request signal at step S309 by the control chip of above-mentioned reader device this moment, also will at first lock above-mentioned semaphore, but this semaphore is taken by the requestor to the flash card in the above-mentioned flow process, therefore, driver at step S311 reader device then makes the requestor of smart card enter dormant state, and the release of wait-semaphore; After above-mentioned access to flash card was finished, operating system was learnt the information that is discharged among the step S307, was the requestor of arousing intelligent card application program to smart card at step S313, promptly entered wake-up states by dormant state; At step S315 by the integration-type control chip of reader device by the requestor locking signal amount of driver to this smart card; Afterwards, carry out data access at step S317 at smart card, the data exchange program that promptly meets smart card APDU communication protocol comprises the APDU instruction (APDU command) and response (APDU response) of transmitting between smart card and application program of intelligent card; After finishing this requestor and access action, promptly discharge this semaphore at step S319 control chip, to discharge shared usb bus related resource.
In above-mentioned each card format (card format and another card format, be not limited to the foregoing description) and system between the signal transmission all finish with handling by the integration-type control chip in the reader device, and wherein data access is all controlled by same driver, and each card carries out data access by file system, as the flash card form, maybe can carry out data access via the middle layer software, as the smart card form by a vertical application.
In actual applications, for guaranteeing not have lost package or wrong transmission by data accessed in flash card or the smart card, can between the device (as computer system, reader device or other peripheral unit) that SIE and data are obtained, set up the storer of first in first out (FIFO) pattern, so that data are kept in operation.
Another embodiment is shown in Fig. 3 B, the requestor transposing of first card and second card, ask by the smart card of driver reading card device by smart card (second card) application program earlier, and the request of startup flash card (first card) is arranged during the data access, the flow process of the embodiment of the invention is as follows:
At the beginning, application program of intelligent card earlier sends request signal to smart card, and receive request signal at above-mentioned card format at the integration-type control chip of step S331 reader device this moment; Also at first lock above-mentioned semaphore at step S333, thus the control chip of reader device promptly according to the request signal of this card format by driver to requestor locking signal amount; Afterwards, the data exchange program in that step S335 promptly meets smart card APDU communication protocol comprises and transmits APDU instruction and response between smart card and application program of intelligent card; After finishing this requestor and access action, be release semaphore at step S337, to discharge shared usb bus related resource.
Simultaneously, file system is also sent the request signal that will carry out access by driver to flash card, in like manner, receives this request signal at the integration-type control chip of step S339 reader device; Afterwards, to lock the above-mentioned semaphore that by smart card requestor taken by driver at the requestor of flash card at the control chip of step S341 reader device, but because semaphore is occupied, so the driver of reader device then makes the requestor of flash card enter dormant state earlier, and the release of wait-semaphore; After above-mentioned access to smart card is finished, learn step S337 release semaphore in step S343 operating system, promptly wake file system up by the requestor of driver to flash card, promptly enter wake-up states by dormant state; And by driver the requestor of this flash card is locked this semaphore by the control chip of reader device at step S345; Because finish the locking signal amount, then can carry out access action at step S347, as the host-host protocol that meets the USB specification carries out the access of data to flash card; After data access is finished, promptly discharge this semaphore at step S349.
Aforesaid way is to utilize the control chip of a reader device successively to finish the requestor of two distinct interfaces and card by driver, avoided known technology to utilize the solicit operation of two drivers to need one during, the mistake that reader device produces in the time of may receiving other order that another driver sends under the situation of also not finishing an operation to a plurality of conversions (transfer).
Above-mentioned first embodiment is the driver in the operating system installation special use, carries out signal judgment at the signal of different cards, and carries out the keyholed back plate of read-write program.
And utilize the integration-type control chip of reader device of the present invention and its data access method to also have second embodiment, its hardware only need provide an interface, but at two logic interfacings of two kinds of card design (logicinterface), in conjunction with the firmware of integration-type control chip (firmware) scheme wherein, the card signal that will read at reader device carries out interpretation, one of logic interfacing that decision will be used.
In this embodiment, the present invention utilizes the control chip of integration-type control chip and judgment mechanism wherein to form the solution of a form of firmware, by being provided, two logic interfacings integrate flash card and intelligent card reading device, one of them interface (interface A) is responsible for the read-write of flash card, and another one interface (interface B) is responsible for the read-write of smart card.Under this framework, the processing mode that integration-type control chip requires read-write also depends on the mechanism of the devices communicating of usb host system and double nip simultaneously.Host computer system to the data transmission on the distinct interface be based on USB handle (transaction) level other, therefore at the reader device end, always be treated to minimal processing unit with this, such as in the processing procedure of Processing Interface A, receive the request of interface B, reader device (including integration-type control chip) can be managed the request of shielding interface B so, and by the time after the finishing dealing with of interface A, goes to handle the request of interface B again.
Adopt this integration-type control chip framework to compare with traditional many control chips framework, the problem that needs to solve is how integration-type control chip accomplishes optimization to the processing that the read-write from different cards requires, make two interfaces share a cover hardware resource, be different from known technology and use two cover hardware mode, though the present invention overlaps hardware with one, but adopt the read-write requirement of the different cards of technology alternate treatment of time-sharing multiplex (Time Division Multiplexing), above-mentioned each card format interface (A, B) data transmission on is according to the processing rank of transmitting transceiver device, and data with this each card format of time-sharing multiplex principle alternate treatment, and can comprise that one is coupled to the microprocessing unit (not showing in the drawings) of serial interface engine and impact damper, and produce the data of serial transmission form according to this time-sharing multiplex principle according to firmware.The configuration diagram of the two logic interfacings of its single device that adopts as shown in Figure 4.
Embodiment shown in Figure 4 is divided into computer system 41 and reader device 42 with total system, wherein the preferred embodiment of reader device 42 is the USB reader device, connect computer system 41 by transmitting transceiver device (as the USB transceiver) 421, computer system 41 is promptly passed through this transmitting transceiver device 421 from extraneous access data, and reaches the purpose of the various card of access.Reader device 42 utilizes the data access control and the sequential control of the various card format of an integration-type control chip 425 controls, this integration-type control chip 425 is except that comprising the transmitting transceiver device 421 that connects computer system 41, also include serial interface engine (SIE) 423, impact damper 424 at least, and comprise by the present invention and utilize the logic interfacing A (427) and interface B (428) that integration-type control chip 425 fictionalizes, the corresponding respectively flash memory card interface 401 and intelligent card interface 402 that connects entity of two logic interfacing A, B.
When reader device 42 accesses outside as smart card 432, the data of flash card 431,425 of integration-type control chips in the reader device 42 utilize two kinds of logic interfacings as the smart card 432 or the read-write interface of flash card 431, because two logic interfacings are shared a cover hardware resource, so need make ongoing interface when data access, need quote shielding means (screening), when one of them logic interfacing when carrying out data access, this integration-type control chip promptly shields another logic interfacing, after operating interface was finished access action, control chip 425 just can be handled the program of asking by the interface in another wait (shielding) again.
When carrying out requestor, data (request signal or data) by flash card 431 or 432 accesses of smart card (read/write) can be stored in earlier in the impact damper 424 that is arranged in the integration-type control chip 425, data in order to buffering serial transmission form, be converted to the data of serial transmission form again via the data of 423 card formats that will handle of serial interface engine, be resent in the reader device 42, integration-type control chip 425 is at the data interpretation that is temporary in impact damper 424, transmitted by flash card 431 or smart card 432 according to data, to judge wherein is to be passed in the computer system 41 by transmitting transceiver device 421 by interface A (427) or interface B (428), and by wherein operating system 410 receptions.Data transmission on each flash card 431 or the smart card 432 is according to the processing rank of transmitting transceiver device 421, with the data of each card format of time-sharing multiplex principle alternate treatment.
Specifically, because of different cards by different logic interfacing transmission, and can judge it is the flash card or the requestor of smart card at different packages easily, re-use the USB driver of supporting in the operating system 410 (as driver A (411) or driver B (412)) and carry out data access respectively.Because the driving of USB device be can be the type of drive of standard, so disclosed handle respectively from the driver A (411) of the data of interface A and interface B and driver B (412) can be operating system built-in standard driver, so the scheme that second embodiment of the invention provided does not need the driver of extra installation.
Be initiatively to pass through driver A (411) or driver B (412) reading card device 42 carries out requestor on the other hand by operating system 410, also data are sent to serial interface engine 423 by logic interfacing A in the integration-type control chip (427) or interface B (428) respectively by transmitting transceiver device 421, and be temporary in the impact damper 424, to carry out reading or write-in program to each card.
In like manner,, then use this pairing driver (A or B) to send request by a SCSI layer to reader device by the file system in the computer system if data layout is a flash memory form in first embodiment; And, then utilize the PC/SC communication protocol of standard by application program of intelligent card as if being a smart card form by control chip judgment data form, (A or B) sends request to this reader device by pairing driver.And flash card meets the data access of the host-host protocol of USB specification, and application program of intelligent card then needs to send the signal that meets APDU communication protocol to smart card and carries out data access.
Signal Processing flow process as shown in Figure 5 between firmware that second embodiment is disclosed (as using integration-type control chip) and hardware (as reader device) in conjunction with sequential control, process flow diagram is divided into firmware part and hardware components, has used some judgment mechanisms as the mode that intercoms mutually respectively.
Wherein, hardware components has defined two marks (Flag), and in order to the data of one of two interfaces of control USB reception, flow process uses ccid_en mark (1 or 0) to control the data that whether receive from the interface of smart card correspondence; The mass_storage_en mark is then controlled the data that whether receive from the pairing interface of flash card.
When control chip receives this interrupt request, at first judge whether it is that a short bag (short packet) interrupts at step S505 by the firmware part, this step also is one and is in the circulation of judging with the wait look-at-me, if be not judged as short the bag when interrupting (situation of denying), still be in the circulation; Interrupt (situation that is) if judge this interrupt request for short bag, then represent to receive instruction during USB device (embodiment of the invention is a reader device) is by computer system at step S507, and the firmware part can be selected to assign to handle ccid_en mark and mass_storage_en mark by firmware part or Hardware Subdivision by an auto_clr_en mark;
If auto_clr_en is marked with and is set (situation that is), as establish auto_clr_en and be labeled as 1, step proceeds to hardware components, then is to handle data from smart card and flash card with hardware components; If then be not to select the data of firmware section processes, from smart card and flash card.Yet,,, make data from smart card and flash card by hardware handles so the preferred embodiments of the present invention can be made as above-mentioned auto_clr_en mark because the efficiency ratio of hardware is higher;
Then, the use that to judge interface according to the usb_cur_if mark (ccid_if/mass_storage_if) of the end points (endpoint) of USB package at step S509 hardware components is ccid_if mark or mass_storage_if mark, and whether expression receives from the data of the interface of smart card correspondence or from the data of the pairing interface of flash card respectively;
This example is to judge it is the resource of being used reader device by smart card or flash card at present with the information that the usb_cur_if mark is transmitted, so after the judgement of step S509, can be divided at step S513:ccid_en be labeled as 1, mass_storage_en is labeled as 0, this is for being the data packet that receives the interface of intelligent card corresponding at present; Be labeled as 0 at step S515:ccid_en, mass_storage_en is labeled as 1 state, this is for being the data packet that receives the interface of corresponding flash card at present;
If the auto_clr_en mark that step S507 sets is the data that instruction firmware section processes is received, as establish auto_clr_en and be labeled as 0, in like manner, the use that to judge interface according to the end points of USB package in step S511 firmware part is ccid_if mark or mass_storage_if mark, and whether expression receives from the data of the interface of smart card correspondence or from the data of the pairing interface of flash card respectively;
After the judgement of step S511,, when a logic interfacing is carried out data access therein, promptly another logic interfacing is shielded by shielding means:
Can be divided into equally at step S519:ccid_en be labeled as 1, mass_storage_en is labeled as 0, for being the data that receive the interface of intelligent card corresponding at present; Be labeled as 0 at step S517:ccid_en, mass_storage_en is labeled as 1 state, for being the data that receive the interface of corresponding flash card at present;
Afterwards, change (transfer) step at step S521, after the pairing driver of one of them logic interfacing is finished data access, promptly carry out the shielding means again, and be converted to the pairing data access step of another logic interfacing, promptly will finish a complete solicit operation at two kinds of built-in drivers of operating system all needs one to a plurality of conversions, and the embodiment of the invention promptly utilizes the expressed information of ccid_en mark and mass_storage_en mark to carry out the conversion of requestor.Promptly, if the state that sets at last of above-mentioned flow process is ccid_en is labeled as 1, mass_storage_en is labeled as 0, expression is the data that receive the interface of intelligent card corresponding at present, and then control chip falls the data mask on the interface of flash card correspondence by the transmitting transceiver device; If ccid_en is labeled as 0, mass_storage_en is labeled as 1 state, expression is the data that receive the interface of corresponding flash card at present, then control chip falls the data mask on the interface of smart card correspondence by the transmitting transceiver device again, and the requestor that both are sent can be not chaotic;
At last, after the request of an interface of firmware handle, can be made as 1 to above-mentioned ccid_en mark and mass_storage_en mark at step S523, and enter idle (idle) state at step S525, the cycle criterion step of waiting for as beginning is waited for reception next record packet by hardware components.
In sum, the integration-type control chip of disclosed reader device and its data access method, its purpose is to integrate the read-write control of flash card and smart card on a single-chip, solve the phenomenon that known technology can cause the control chip deal with data to cause confusion at the request path of different cards, so, the mechanism that the invention provides a kind of sequential control takes place to avoid this confusion, and can reduce the cost of multi-functional reader device, increases competitiveness of product.
The above is the preferred embodiments of the present invention only, is not to limit protection scope of the present invention with this, so the equivalent structure that all utilizations instructions of the present invention and accompanying drawing content are done changes, all in like manner is contained in the scope of the present invention.
Claims (10)
1. the data access method of a plurality of card formats is applicable to it is characterized in that the reader device of an integration-type control chip, comprises the following steps:
Receive the request signal of a card format;
Request signal locking signal amount according to this card format;
Carry out data access at this card format; And
Access finishes the back release semaphore;
Wherein, if receive the request signal of another card format, then this another card format is introduced into a dormant state and comprises the following steps: between above-mentioned steps
This another card format enters a wake-up states after treating the above-mentioned steps end;
Request signal locking signal amount according to this another card format;
Carry out data access at this another card format; And
Access finishes the back release semaphore.
2. the data access method of a plurality of card formats as claimed in claim 1 is characterized in that, the data access of described card format and this another card format is controlled by same driver.
3. the data access method of a plurality of card formats as claimed in claim 1 is characterized in that, described card format is one of them of flash card form and smart card form.
4. integration-type control chip is applicable to it is characterized in that the data access of a plurality of card formats, comprising:
One transmitting transceiver device is in order to from extraneous access data;
A plurality of card format interfaces are coupled to this transmitting transceiver device respectively, in order to handle the data of described card format respectively;
One serial line interface engine is converted to the data of a serial transformat in order to the data of the described card format that will handle; And
One impact damper is in order to cushion the data of this serial transmission form;
Wherein, the data transmission on the described card format interface is based on the processing rank of this transmitting transceiver device.
5. integration-type control chip as claimed in claim 4 is characterized in that, described card format comprises flash card form and smart card form.
6. integration-type control chip as claimed in claim 4 is characterized in that, the data access of described a plurality of card formats is controlled by the standard driver of operating system.
7. integration-type control chip is applicable to it is characterized in that the data access of a plurality of card formats, comprising:
One transmitting transceiver device is in order to from extraneous access data;
One card format interface is coupled to this transmitting transceiver device respectively, in order to handle the data of described card format;
One serial line interface engine is converted to the data of a serial transformat in order to the data of the described card format that will handle; And
One impact damper is in order to cushion the data of this serial transmission form;
Wherein, the data transmission on this card format interface is based on the processing rank of this transmitting transceiver device, and with the data of the described card format of a time-sharing multiplex principle alternate treatment.
8. integration-type control chip as claimed in claim 7, it is characterized in that, also comprise a microprocessing unit, this microprocessing unit is coupled to this serial interface engine and this impact damper, and produces the data of this serial transmission form according to this time-sharing multiplex principle according to a firmware.
9. integration-type control chip as claimed in claim 7 is characterized in that, described card format comprises flash card form and smart card form.
10. integration-type control chip as claimed in claim 7 is characterized in that, the data access of described a plurality of card formats is controlled by the standard driver of operating system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100083428A CN101236539B (en) | 2007-01-29 | 2007-01-29 | Card-reading device integration -type control chip and data access method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100083428A CN101236539B (en) | 2007-01-29 | 2007-01-29 | Card-reading device integration -type control chip and data access method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101236539A true CN101236539A (en) | 2008-08-06 |
CN101236539B CN101236539B (en) | 2010-09-08 |
Family
ID=39920167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007100083428A Active CN101236539B (en) | 2007-01-29 | 2007-01-29 | Card-reading device integration -type control chip and data access method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101236539B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102122362A (en) * | 2010-01-07 | 2011-07-13 | 上海华虹集成电路有限责任公司 | Method for improving communication rate of contact-type intelligent card |
WO2011140773A1 (en) * | 2010-05-11 | 2011-11-17 | 中兴通讯股份有限公司 | T-card identification method and device |
CN110609661A (en) * | 2019-09-27 | 2019-12-24 | 乐普智芯(天津)医疗器械有限公司 | Flash memory controller with read-write integrated function |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1459723A (en) * | 2002-05-24 | 2003-12-03 | 万国电脑股份有限公司 | Double interface switchover device of storage card |
CN100371919C (en) * | 2004-07-16 | 2008-02-27 | 安国国际科技股份有限公司 | Improved card reader and its data transmission method |
-
2007
- 2007-01-29 CN CN2007100083428A patent/CN101236539B/en active Active
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102122362A (en) * | 2010-01-07 | 2011-07-13 | 上海华虹集成电路有限责任公司 | Method for improving communication rate of contact-type intelligent card |
CN102122362B (en) * | 2010-01-07 | 2013-12-11 | 北京华虹集成电路设计有限责任公司 | Method for improving communication rate of contact-type intelligent card |
WO2011140773A1 (en) * | 2010-05-11 | 2011-11-17 | 中兴通讯股份有限公司 | T-card identification method and device |
CN110609661A (en) * | 2019-09-27 | 2019-12-24 | 乐普智芯(天津)医疗器械有限公司 | Flash memory controller with read-write integrated function |
Also Published As
Publication number | Publication date |
---|---|
CN101236539B (en) | 2010-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6032178A (en) | Method and arrangement for data transmission between units on a bus system selectively transmitting data in one of a first and a second data transmission configurations | |
US4204251A (en) | Interconnection unit for multiple data processing systems | |
CN102110072B (en) | Complete mutual access method and system for multiple processors | |
US4992958A (en) | Method and apparatus for controlling printer | |
US8392635B2 (en) | Selectively enabling a host transfer interrupt | |
US4015243A (en) | Multi-processing computer system | |
CN102065568B (en) | MAC (media Access control) software and hardware interaction method based on data descriptor and hardware implementation device thereof | |
US20070074214A1 (en) | Event processing method in a computer system | |
CN100440183C (en) | Inter-processor communication system | |
CN1117318A (en) | Multiprocessor data memory sharing | |
KR102285749B1 (en) | System on chip having semaphore function and emplementing method thereof | |
CN1330782A (en) | Interrupt architecture for non-uniform memory access (NUMA) data processing system | |
CN101364212A (en) | Handshake free sharing in a computer architecture | |
CN103403803A (en) | Memory system in which extended function can easily be set | |
CN103019838A (en) | Multi-DSP (Digital Signal Processor) platform based distributed type real-time multiple task operating system | |
CN101236539B (en) | Card-reading device integration -type control chip and data access method | |
KR20120038282A (en) | Bus system having id converter and coverting method thereof | |
JP4022442B2 (en) | Control method of fieldbus interface board | |
CN103365798B (en) | A kind of method and system of serial ports time-sharing multiplex | |
CN110971621B (en) | Embedded multi-CPU interconnection circuit based on SDIO interface, interconnection method and driving method | |
CN101561790A (en) | Method, system and device for communication between main control computer and slave computers | |
CN118069555A (en) | Data transmission method, device, electronic equipment and storage medium | |
US20050240706A1 (en) | Peripheral device control system | |
CN1969268B (en) | Host controller, bus communication device and method for operating the host controller | |
CN101777030B (en) | Device and method for verifying data transmission system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |