background image

 

 

 

 

Version 1.3 

GPR400 

Reference Manual

 

Summary of Contents for GPR400

Page 1: ...Version 1 3 GPR400 Reference Manual ...

Page 2: ...th its clients and for its own internal use The information contained herein is the sole property of GEMPLUS and shall not under any circumstances be reproduced without prior consent of the company Copyright GEMPLUS 1997 Smartcards and Smartcard Readers are patent protected by INNOVATRON and produced by GEMPLUS under license Patented by Bull CP8 Patented by Innovatron Printed in France GEMPLUS B P...

Page 3: ...n when you need it Read this section in order to use this guide to its full potential Preface Read the Preface for a general description of the GPR400 and of its environment GPR400 Hardware Read the GPR400 Hardware section for a description of the hardware and its connections Sending Commands to a Smartcard This section describes how to send commands to a Smartcard via the GPR400 It includes the f...

Page 4: ...erview 3 The 2K byte Memory 4 PCCard Configuration 5 SENDING COMMANDS TO THE READER 6 Sending Commands to the GPR400 6 Command and Response Format 8 Description of the TLV Field 8 Chaining TLV fields 9 GPR400 Commands 9 Select Card 9 Open Session 11 Close Session 11 APDU Exchange 12 Activate Driver 13 Reset GPR 14 Power Down GPR 14 Load Memory 15 Read Memory 16 ...

Page 5: ...PERATING SPECIFICATIONS 19 Maximum Operating Values 19 Standard Operating Conditions 20 AC Test Conditions 21 AC Characteristics 21 APPENDIX B PIN OUT DESCRIPTION 22 APPENDIX C SAMPLE GPR400 SCENARIOS 25 Scenario 1 25 Scenario 2 25 Scenario 3 27 APPENDIX D STATUS CODES 30 ...

Page 6: ...oducts Smart Card PCMCIA slot Smartcard Smartcard Smartcard Compact Smartcard Reader Writer Fig 1 GPR400 PCMCIA Slot and Smartcard Configuration When the reader is connected to the PCMCIA interface it is seen as an I O PC Card type II as defined by PCMCIA standard releases 2 0 and above The GPR400 has 128 Kbytes of optional flash memory and 2 Kbytes of RAM The flash memory if present is used by th...

Page 7: ...IA interface as follows 32 bytes are used for I O data exchange 2016 bytes are used as the Attribute Memory defined by the PCMCIA Standard 2 1 or by the PC Card Standard and can also be used as extended executable memory for the microcontroller ...

Page 8: ... 68 pin connector The Smartcard module is compliant with the ISO 7816 2 standard GPR400 Architecture Overview The GPR400 is based on a microcontroller It communicates with the PCMCIA bus using a specific component ASIC containing 2 Kbytes of RAM The flash memory 128 Kbytes is mapped onto the embedded microcontroller Please note this memory is optional in this release The GPR400 has an 8 bit data I...

Page 9: ...ific PCMCIA defined registers for I O PC Card Configuration Option Register the registers for the Smartcard interface and some external RAM data which are used by the embedded microprocessor for external data space or executable programs application programs or Smartcard drivers The C I S is downloaded by the internal microcontroller The external RAM data can be loaded by the embedded microcontrol...

Page 10: ...ace 32 byte long memory space Configuration Option Register structure see also PCCard Standard bit 7 set to 1 this bit initializes the GPR400 minimum pulse of 5 µs bit 6 5 reserved reset to 0 bit 4 0 these bits are defined by the I O base address as described in the following table Configuration Option register value I O address 18 300h 31Fh 19 320h 33Fh 1A 340h 35Fh 10 200h 21Fh 11 220h 23Fh 12 2...

Page 11: ... for portable PCs that run on batteries bear in mind the following recommendation to limit battery power consumption Power Off the Smartcard when you have finished accessing it and power down the GPR This will switch the GPR400 into Power Down mode Sending Commands to the GPR400 This section describes in full detail how to send Smartcard commands to the GPR400 You send commands to the GPR400 throu...

Page 12: ...this bit to a minimum time of 5 microseconds and waits for 20 milliseconds This command is the first action to perform after a POWER DOWN GPR it reactivates the embedded microprocessor Note that the GPR400 is automatically reactivated when inserted into the PCMCIA socket bit 1 INTR GPR400 interrupt request After sending the GPR400 command in the I O buffer the host must set this bit to 1 in order ...

Page 13: ...ion of the TLV Field Type T This value specifies the command on one byte The command function is one of the following Select Card Open Session Close Session APDU Exchange Activate Driver Power Down GPR Load Memory Read Memory Exec Memory IFD Status The response to a command is in the same location The Type value is equal to the command type value plus 02h bit 1 set to 1 Length L This specifies the...

Page 14: ...Tc1 first block index 1 of a chaining field index c Tn Block n of the last chaining field index c is not present L L1 L2 Ln The index c corresponds to the value of bit 2 of type T with bit 2 1 chaining field bit 2 0 standard field or last field The maximum chaining field Length is V1 V2 Vn 256 bytes this corresponds to a 256 byte buffer for data exchange with a Smartcard GPR400 Commands Select Car...

Page 15: ...L 01 V b7 b0 where b1 b0 00 Downloaded Smartcard driver 0 01 RFU Reserved for Future Use 10 Driver ISO 7816 3 11 RFU b4 0 Smartcard clock 3 68 MHz 1 Smartcard clock 7 36 MHz b7 b5 b3 b2 RFU Answer Format Type Ta Tc 02h 52h Length L 01 Variable V Reader Status Code ...

Page 16: ...the terminal If the Smartcard is already powered on then the command merely returns the ATR this function then permits either a cold or a warm reset Command Format T 20h L 00 Answer Format Type Ta Tc 02h 22h Length L Length SmartCard Answer to reset 1 Variable V Reader Status Code 1 byte Answer To Reset Close Session This command powers off a Smartcard in compliance with ISO 7816 standards Command...

Page 17: ...ining retransmission and resynchronization must be handled by the external application The Exchange Data buffer for ISO Smartcards has a length of 256 bytes Command Format T 30h L Length of V field V Vex where Vex DIR Vinf for T 0 protocol ISO In command DIR 00 Vinf CLA INS P1 P2 Lin Data IN ISO Out command DIR 01 Vinf CLA INS P1 P2 Lout Vex Nad Pcb Le Vinf E for T 1 protocol TPDU format Vinf CLA ...

Page 18: ...0 or T 1 e g GPM256 GPM896 GFM GAM etc The validated command is used to customize the GPR400 or to create a new command Command Format T 70h L 03 V DIR ADR where DIR b1 b0 00 downloaded IC driver 01 10 RFU 11 specific command driver b2 0 driver located in RAM 1 driver located in flash b3 if b2 1 b3 0 first page of flash b3 1 second page of flash b6 b4 RFU b7 b7 0 current driver invalid b7 1 curren...

Page 19: ...ard is already inserted the TLV is the GPR400 s only answer Note This command does not power down the Smartcard interface use the Close Session command Power Down is the GPR400 s very low consumption mode this applies only if a CLOSE SESSION has been executed To reactivate the reader you need to perform a RESET GPR before sending any commands refer to the Handshake Register section Command Format ...

Page 20: ...IR b1 b0 00 data from the Smartcard 10 data from the Host 01 11 RFU b2 0 loading to RAM 1 loading to Flash Memory b3 if b2 1 b3 indicates the page 0 page 0 1 page 1 b5 b4 00 downloading without erasing 10 erasing the current 16 Kb partition before downloading 01 or 11 complete erasing before downloading b6 b7 RFU ADR physical address on two bytes MSB LSB Vex exclusive Smartcard command for data co...

Page 21: ...V DIR ADR Lng where DIR b0 b1 RFU b2 0 read from RAM 1 read from flash memoryb3 if b2 1 b3 indicates the page 0 first 64 Kbyte block 1 second block b4 b7 RFU ADR physical address on two bytes MSB LSB Lng number of bytes to be read 00 256 bytes Answer Format Type Ta Tc 02h Length L Length of V field Variable V Reader Status Code Vinf Vinf corresponds to the data read ...

Page 22: ... already been executed Command Format T 90h L Length of V field V User Data where The subroutine uses available User Data as parameters Answer Format Type Ta Tc 02h 92h Length L Length of V field Variable V Reader Status Code Answer User Data user defined Status GPR This command provides 3 types of information on the GPR400 s status firmware Smartcard and driver information Command Format T A0h L ...

Page 23: ...imal byte Mem 00h if Flash Memory absent 11h if Flash Memory present General Setup Register byte DIR and ADR bytes of the Validate Driver command fields PC Card Manufacturer info byte LSB see PCMCIA Standard for checksum information 2 or 3 bytes Data Checksum GPR400 firmware Checksum RAM Checksum Flash Memory optional for Smartcard information 3 bytes Data Smartcard register 1 Smartcard register 2...

Page 24: ...ists the GPR400 s maximum operating conditions Table 3 GPR400 Maximum Operating Conditions Condition Value Operating temperature 0ºC to 55ºC Storage temperature 20ºC to 65ºC Voltage on any PIN with respect to ground 0 5V to 5 5V Vpp supply voltage with respect to ground 0 5V to 7 0V Vcc supply voltage with respect to ground 0 5V to 5 5V Note Conditions outside the values specified in Table 3 may c...

Page 25: ...p during read operations 0 5 5 V ILi Input leakage current 5 uA Vcc Vcc Max Vin Vcc or Vss ILo Output leakage current 1 15 uA Vcc Vcc Max Vout Vcc or Vss Iccpd Icc power down current 200 500 µA Vcc Vcc Max CE Vcc Iccop Icc operating current 4 20 mA Vcc Vcc Max CE Vil with no IccSmartcard inserted Vil Input low voltage 0 5 0 8 V Vih Input high voltage 2 2 Vcc 0 5 V Vol Output low voltage 0 40 V lol...

Page 26: ...isted below Input rise and fall times 10 ns Input pulse levels Vol and Voh Input timing reference level Vil and Vih Output timing reference level Vil and Vih AC Characteristics The GPR400 AC Characteristics are listed below Read access time 55 ns Write access time 55 ns Attribute Memory and I O buffer ...

Page 27: ...t 5 38 D12 I O N C 5 D6 I O Data bit 6 39 D13 I O N C 6 D7 I O Data bit 7 40 D14 I O N C 7 CE1 I PC Card Enable 41 D15 I O N C 8 A10 I Add bit 10 42 CE2 I N C 9 OE I Output EN 43 NC N C 10 A11 I Add bit 11 44 IORD I I O read 11 A9 I Add bit 9 45 IOWR I I O write 12 A8 I Add bit 8 46 A17 I N C 13 A13 I Add bit 13 47 A 18 I N C 14 A14 I Add bit 14 48 A 19 I N C 15 WE I Write enable 49 A 20 I N C 16 ...

Page 28: ... N C 23 A6 I Add bit 6 57 RFU N C 24 A5 I Add bit 5 58 RST I Reset 25 A4 I Add bit 4 59 WAIT O N C 26 A3 I Add bit 3 60 Inpack O Valid access 27 A2 I Add bit 2 61 REG I Reg Valid 28 A1 I Add bit 1 62 BVD2 O Bat Volt Detect 29 A0 I Add bit 0 63 BVD1 O Bat Volt Detect 30 D0 I O Data bit 0 64 D8 I O N C 31 D1 I O Data bit 1 65 D9 I O N C 32 D2 I O Data bit 2 66 D10 I O N C 33 WP O Ground 67 CD2 O Car...

Page 29: ...ite in I O buffer Active low REG input signal to enable GPR400 access Attribute Memory and I O buffer INPACK output indicates the GPR400 is inserted correct I O address Active low IREQ output Interrupt Request signal indicates to the host that an answer is available CD1 CD2 outputs these signals detect whether the GPR400 is inserted or not They are internally connected to the ground Vcc GPR400 pow...

Page 30: ...et the GPR400 power on Read the C I S in the Attribute Memory Write Attribute Memory at address 0FA0h the value 12h as mentioned in the C I S configuration Scenario 2 Send an ISO command to a Smartcard protocol T 1 clock 3 58 MHz Reset GPR write I O at 0240h Handshake Register bit 0 set to 1 and reset to 0 5 us later Select Card T L V 50 01 02 write I O 0242h 50h 0243h 01h 0244h 02h write I O 0240...

Page 31: ...ad Pcb Le Vinf E write I O 0240h bit 1 set to 1 wait for Interrupt Request IREQ then write I O 0240h bit 2 reset to 0 read I O 0242h 32 L Nad Pcb Le Vinf E Close Session T L V 10 00 write I O 0242h 10 00 write I O 0240h bit 1 set to 1 wait for Interrupt Request IREQ then write I O 0240h bit 2 reset to 0 read I O 0242h 12 01 00 PowerDown GPR T L V 40 01 00 write I O 0242h 40 01 00 write I O 0240h b...

Page 32: ...xt ADLnext DATA until the entire driver corresponding to protocol X is downloaded write I O 0242h 60 L 00 ADH ADL DATA write I O 0240h bit 1 set to 1 wait for Interrupt Request IREQ then write I O 0240h bit 2 reset to 0 read I O 0242h 62 01 00 and loop until last data appears Activate driver T L V 70 03 81 ADh ADl ADh ADl base driver address write I O 0242h 70 03 80 ADh ADl write I O 0240h bit 1 s...

Page 33: ...n T L V 20 00 write I O 0242h 20 00 write I O 0240h bit 1 set to 1 wait for Interrupt Request IREQ then write I O 0240h bit 2 reset to 0 read I O 0242h 22 01 00 APDU Exchange T L V 30 L Vex The Vex Variable can be structured as T 0 or T 1 or it can have a specific format It will be handled by the new Smartcard driver write I O 0242h 30 L Vex write I O 0240h bit 1 set to 1 wait for Interrupt Reques...

Page 34: ...e I O 0240h bit 1 set to 1 wait for Interrupt Request IREQ then write I O 0240h bit 2 reset to 0 read I O 0242h 12 01 00 PowerDown GPR T L V 40 01 00 write I O 0242h 40 01 00 write I O 0240h bit 1 set to 1 wait for Interrupt Request IREQ then write I O 0240h bit 2 reset to 0 read I O 0242h 42 01 00 ...

Page 35: ...alue 28 14h Unknown card type The T parameter in the Define Card Type command is not valid 15h Card turned off A Power Up command must be given to the card prior to any other operation 16h The V parameter is incorrect 19h The Flash Memory is not present The command is not supported 1Ah Error in an ISO format card command The LN parameter in the ISO header does not correspond to the actual data len...

Page 36: ... error only occurs after several unsuccessful attempts at retransmission E4h The card has just sent the reader an invalid Procedure Byte see ISO 7816 3 E5h A command was issued but no data was exchanged E7h The SW1 and SW2 bytes returned by the card are not 90 00h F7h Card removed the card has been withdrawn while carrying out of an instruction Make sure that the card instruction is complete F8h C...

Reviews: