CN102957507A - Method for decoding S1 signal of single wire protocol (SWP) physical layer - Google Patents
Method for decoding S1 signal of single wire protocol (SWP) physical layer Download PDFInfo
- Publication number
- CN102957507A CN102957507A CN2011102555909A CN201110255590A CN102957507A CN 102957507 A CN102957507 A CN 102957507A CN 2011102555909 A CN2011102555909 A CN 2011102555909A CN 201110255590 A CN201110255590 A CN 201110255590A CN 102957507 A CN102957507 A CN 102957507A
- Authority
- CN
- China
- Prior art keywords
- swp
- signal
- counter
- physical layer
- decoding
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000005070 sampling Methods 0.000 claims description 20
- 230000000630 rising effect Effects 0.000 claims description 11
- 238000012512 characterization method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
Images
Landscapes
- Communication Control (AREA)
Abstract
The invention provides a method for decoding an S1 signal of a single wire protocol (SWP) physical layer. The method is suitable for the field of design of an intelligent card integrated circuit with an SWP interface. By the method, the physical layer decoding of an SWP interface of an intelligent card can be completed; and the method has the advantages that the decoding speed and the decoding process are optimized, and the correctness of a decoded result can be guaranteed.
Description
Technical field
The present invention is applied to the SWP Interface design field of smart card, can realize with integrated circuit.
Background technology
The SWP interface is mainly used in supporting the SIM card of near-field communication.Supporting the SIM card of near-field communication, realized E-Payment, authentication, ticket dealing, exchanges data, anti-counterfeit recognition, advertizing several functions, is a kind of new business of moving communicating field, industry common name " mobile payment ".Have broad application prospects.
In NFC (Near Field communication) system, NFC control chip CLF (Contactless Front) will be connected with intelligent card chip.In conventional SIM card, C1 (VCC), C2 (RST), C3 (CLK), C5 (GND), five pins of C7 (IO) are conventional ISO 7816 pins; C4 (RFU), C8 (RFU) pin are then expanded to USB interface on the sheet by ISO; C6 (SWP) pin is used for connecting smart card and CLF chip, follows the SWP agreement.
The SWP agreement is the single line connectivity scenario of the C6 pin that gives SIM card of Gemalto company proposition.As shown in Figure 4, in the SWP agreement, smart card and CLF interface comprise three line: VCC (C1), GND (C5), SWP (C6).Wherein realize full-duplex communication based on voltage and load-modulate principle on the SWP holding wire, can realize that like this smart card supports ISC7816 and two interfaces of SWP simultaneously under ISO7816 interface definition, and reserve the pin of expansion the 3rd high speed (USB) interface.Support the smart card of SWP must support simultaneously ISO 7816 and two protocol stacks of SWP, needing the smart card Chip Operating System is the operating system of multitask, and these two parts need to manage independently, and the reset signal of two interfaces is independent of one another.
The SWP agreement is point to point protocol between smart card and CLF.The principle of single-wire-protocol is based under the full-duplex mode that modulation /demodulation to voltage, electric current realizes, has wherein defined S1, two signals of S2 physical layer.
Signal S1 is low or high by Digital Modulation in voltage domain, realizes that CLF is to the transfer of data of smart card.
Signal S2 is low or high by Digital Modulation in current field, realizes that intelligence snaps into the transfer of data of CLF.
Signal S1 is the logical value that recently characterizes current transmission position by different duties, as shown in Figure 1.Stipulate in the agreement that the high level duty ratio of logical one is 70%~80%, the high level duty ratio of logical zero is 20%~30%.
The SWP interface of smart card end is characterized in that realizing physical layer in the SWP standard, MAC layer, logic link layer and HCI agreement, thereby the realization smart card is communicated by letter with the CLF end.
Summary of the invention
The technical problem that the present invention solves provides a kind of smart card to the implementation method of physical layer S1 signal decoding.Guarantee that smart card can be correctly decoded the logical data that the CLF end sends.
In order to realize said method, need to provide in the intelligent cards SWP interface decoding clock of high frequency, be used for realizing SWP physical layer S1 signal decoding.Its feature may further comprise the steps:
1) behind the system reset, counter is set to 0;
2) master controller detects the success of S1 signal rising edge in the sampling instant of SWP decode clock; Whether, be then represent S1 signal decoding after be logical zero, otherwise be logical one behind the expression S1 signal decoding if being 0 according to current counter then; Counter puts 1, then waits for next time SWP decode clock sampling;
3) master controller detects the failure of S1 signal rising edge in the sampling instant of SWP decode clock, and current counter is full 0 or complete 1, then waits for next time SWP decode clock sampling;
4) master controller detects the failure of S1 signal rising edge in the sampling instant of SWP decode clock, and current counter be full 0 or complete 1, then according to the S1 level value that samples, height then with counter from adding 1, low then counter is subtracted 1 certainly.
Master controller starts master controller and controls SWP physical layer S1 signal decoding by after the SWP interface enable, and exports the data that are synchronized with the SWP decode clock and use to logic link layer.
Description of drawings
Fig. 1 S1 signal bits coded system
Fig. 2 SWP system layer model
Fig. 3 SWP physical layer S1 signal decoding method
Fig. 4 SWP system line schematic diagram
Embodiment
Master controller starts master controller and controls SWP physical layer S1 signal decoding by after the SWP interface enable, and output is synchronized with the data of SWP decode clock to logic link layer.
As shown in Figure 1, the S1 Signal coding is followed the high-low level duty ratio difference of stipulating and is characterized the current data value in the SWP agreement.In a data bit wide, high level accounts for 3/4 characterization logic 1; Low level accounts for 1/4 characterization logic 0.
Then resolve physical layer data by the high and low level ratio of SWP decode clock sampling S1 signal.In a data bit wide, the high level that samples the then characterization logic 1 that occupies the majority, the low level then characterization logic 0 that occupies the majority.
Because physical layer encodes all begins with the high level of S1 signal, low level finishes.Think a data transmission beginning so detect S1 signal rising edge in the coding/decoding method, S1 signal rising edge is then thought the current data end of transmission next time, and the next bit transfer of data begins.
The invention is intended to finish the physical layer shown in Fig. 2 resolves, and the data after will resolving export the upper layer logic link layer to, the present invention can be when detecting the next bit transfer of data and beginning, finish the parsing of current data, and the control by counter data, accomplished SWP physical layer decoding optimization area circuit.
Describe the present invention in conjunction with Fig. 3, the present invention is by the record of counter realization to the rear S1 signal level value of sampling, and use SWP decode clock is to the S1 signal sampling; Described SWP physical layer S1 signal decoding method comprises,
1) behind the system reset, counter is set to 0;
2) master controller detects the success of S1 signal rising edge in the sampling instant of SWP decode clock; Whether, be then represent S1 signal decoding after be logical zero, otherwise be logical one behind the expression S1 signal decoding if being full 0 according to current counter then, counter puts 1; Then wait for next time SWP decode clock sampling;
3) master controller detects the failure of S1 signal rising edge in the sampling instant of SWP decode clock, and current counter is full 0 or complete 1, then waits for next time SWP decode clock sampling;
4) master controller detects the failure of S1 signal rising edge in the sampling instant of SWP decode clock, and current counter is not full 0 or complete 1, then according to the S1 level value that samples, height then with counter from adding 1, low then with counter from subtracting 1, then wait for next time SWP decode clock sampling.
By smart card SWP interface physical layer S1 signal decoding method disclosed by the invention, make smart card successfully realize the S1 signal decoding, efficiently solve the problem of SWP interface decoding.
Claims (1)
1. SWP physical layer S1 signal decoding method is characterized in that step is as follows:
1) system reset sets to 0 counter;
2) master controller detects the success of S1 signal rising edge in the sampling instant of SWP decode clock, judge then whether current counter is 0, be then to be logical zero behind the S1 signal decoding, otherwise be logical one behind the S1 signal decoding, and counter put 1, then wait for next time SWP decode clock sampling;
3) master controller detects the failure of S1 signal rising edge in the sampling instant of SWP decode clock, and current counter is full 0 or complete 1, then waits for next time SWP decode clock sampling;
4) master controller detects the failure of S1 signal rising edge in the sampling instant of SWP decode clock, and current counter is not full 0 or complete 1, then according to the S1 level value that samples, height then with counter from adding 1, low then with counter from subtracting 1, then wait for next time SWP decode clock sampling.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102555909A CN102957507A (en) | 2011-08-31 | 2011-08-31 | Method for decoding S1 signal of single wire protocol (SWP) physical layer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102555909A CN102957507A (en) | 2011-08-31 | 2011-08-31 | Method for decoding S1 signal of single wire protocol (SWP) physical layer |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102957507A true CN102957507A (en) | 2013-03-06 |
Family
ID=47765800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102555909A Pending CN102957507A (en) | 2011-08-31 | 2011-08-31 | Method for decoding S1 signal of single wire protocol (SWP) physical layer |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102957507A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103577976A (en) * | 2013-11-11 | 2014-02-12 | 杭州晟元芯片技术有限公司 | SWP implantation device of security chip |
CN104158623A (en) * | 2014-07-25 | 2014-11-19 | 深圳中科讯联科技有限公司 | S1 signal decoding method for SWP interface and circuit |
CN106374932A (en) * | 2016-09-30 | 2017-02-01 | 湘潭大学 | Decoder and decoding method of a dual-mode UHF-RFID reader |
US9612609B2 (en) | 2014-11-18 | 2017-04-04 | Atmel Corporation | Single wire system clock signal generation |
CN112003775A (en) * | 2020-07-27 | 2020-11-27 | 苏州浪潮智能科技有限公司 | A single-level single-wire full-duplex bus communication method and system |
CN112149439A (en) * | 2020-11-17 | 2020-12-29 | 四川科道芯国智能技术股份有限公司 | Decoding self-alignment method, device and equipment for SWP physical layer S2 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101303683A (en) * | 2007-03-15 | 2008-11-12 | 美国快捷半导体有限公司 | Control interface and protocol |
CN101582759A (en) * | 2008-04-08 | 2009-11-18 | 意法半导体(胡希)公司 | Detection of data received by a master device in a single-wire communication protocol |
EP2134026A1 (en) * | 2008-06-11 | 2009-12-16 | Gemplus | Method for broadband data transmission and corresponding device(s) |
WO2011027179A1 (en) * | 2009-09-07 | 2011-03-10 | Innovision Research & Technology Plc | Near field rf communicators and near field rf communications enabled devices |
-
2011
- 2011-08-31 CN CN2011102555909A patent/CN102957507A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101303683A (en) * | 2007-03-15 | 2008-11-12 | 美国快捷半导体有限公司 | Control interface and protocol |
CN101582759A (en) * | 2008-04-08 | 2009-11-18 | 意法半导体(胡希)公司 | Detection of data received by a master device in a single-wire communication protocol |
EP2134026A1 (en) * | 2008-06-11 | 2009-12-16 | Gemplus | Method for broadband data transmission and corresponding device(s) |
WO2011027179A1 (en) * | 2009-09-07 | 2011-03-10 | Innovision Research & Technology Plc | Near field rf communicators and near field rf communications enabled devices |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103577976A (en) * | 2013-11-11 | 2014-02-12 | 杭州晟元芯片技术有限公司 | SWP implantation device of security chip |
CN104158623A (en) * | 2014-07-25 | 2014-11-19 | 深圳中科讯联科技有限公司 | S1 signal decoding method for SWP interface and circuit |
US9612609B2 (en) | 2014-11-18 | 2017-04-04 | Atmel Corporation | Single wire system clock signal generation |
US9985778B2 (en) | 2014-11-18 | 2018-05-29 | Atmel Corporation | Single wire system clock signal generation |
CN106374932A (en) * | 2016-09-30 | 2017-02-01 | 湘潭大学 | Decoder and decoding method of a dual-mode UHF-RFID reader |
CN106374932B (en) * | 2016-09-30 | 2019-07-26 | 湘潭大学 | Decoder and decoding method for dual-mode UHF-RFID reader |
CN112003775A (en) * | 2020-07-27 | 2020-11-27 | 苏州浪潮智能科技有限公司 | A single-level single-wire full-duplex bus communication method and system |
CN112003775B (en) * | 2020-07-27 | 2022-02-18 | 苏州浪潮智能科技有限公司 | Single-level single-wire full-duplex bus communication method and system |
US11741037B2 (en) | 2020-07-27 | 2023-08-29 | Inspur Suzhou Intelligent Technology Co., Ltd. | Single-level single-line full-duplex bus communication method and system |
CN112149439A (en) * | 2020-11-17 | 2020-12-29 | 四川科道芯国智能技术股份有限公司 | Decoding self-alignment method, device and equipment for SWP physical layer S2 |
CN112149439B (en) * | 2020-11-17 | 2021-04-09 | 四川科道芯国智能技术股份有限公司 | Decoding self-alignment method, device and equipment for SWP physical layer S2 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102957507A (en) | Method for decoding S1 signal of single wire protocol (SWP) physical layer | |
CN107092949B (en) | Smart card performance enhancement circuit and system | |
JP5621038B2 (en) | Communication management method using NFC controller | |
CN100382065C (en) | Smart card reader-writer based on USB interface and its control method | |
JP5123857B2 (en) | NFC reader with passive mode of operation with low power consumption | |
CN101820696B (en) | Terminal supporting enhanced near field communication and processing method thereof | |
CN101908157B (en) | NFC-SIM (Near Field Communication-Subscriber Identity Module) chip | |
CN100580613C (en) | Connection and communication method between NFC control chip and SIM card chip | |
CN101826898B (en) | Communication device and communication method | |
WO2007096794A1 (en) | Negotiation of a proper communication protocol between a data carrier and a reader device | |
TW200703122A (en) | Controller, apparatus and method for contactless ICC connectivity | |
CN101673220B (en) | Method for improving work parallelism of dual-interface SIM card | |
CN103778092A (en) | USB and SD interface multiplex circuit and multiplex method | |
CN103427945B (en) | The communication means of synchronous serial communication interface and this synchronous serial communication interface | |
CN104299316A (en) | Method for automatically detecting card types through financial terminal | |
CN103095622B (en) | A kind of bpsk signal restoring circuit being applicable to ISO14443 agreement | |
CN105930754A (en) | IC card reader and interface expansion method thereof | |
CN202102425U (en) | Port conversion device | |
CN201383160Y (en) | Intelligent card and coupled antenna | |
CN103606001B (en) | Adaptive threshold control method in a kind of non-contact intelligent card demodulation system | |
CN202067299U (en) | Radio frequency SIM (subscriber identity module) card and mobile terminal | |
CN104102890A (en) | NFC (Near Field Communication) mobile communication terminal and card detection method thereof | |
CN201674037U (en) | Switching device and card reader | |
CN102255638B (en) | Interface circuit meeting single wire protocol (SWP) on contactless front (CLF) chip of near field communication (NFC) controller | |
CN101350058B (en) | Method for self-adapting double-interface IC card protocol mode |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C05 | Deemed withdrawal (patent law before 1993) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20130306 |