Revision History

Smart Card Library

Smart Card Library
Revision History

This section describes in more detail the changes made between versions of the Smart Card Library stack. This section generally discusses only changes made to the core files (those found in the "\Microchip Solutions\Microchip" folder). This section generally doesn't include changes to the demo projects unless those changes are important to know about. This section also doesn't encompass minor changes to the stack files such as arrangement or locations of definitions or any other organizational changes.

Topics
Name 
Description 
  1. In SClib.c.:-
    • "SC_TransactT0" function is modified to handle a 256 bytes read from smart card as per the "Case 2S" requirement of ISO 7816 specification.
    • The assignment of "apduResponse->SW1" & "apduResponse->SW2" is modified in "SC_TransactT1" function
  2. In SCpic24.c, SCpic18.c, SCpic32.c & SCdspic33f.c:-
    • "SCdrv_InitUART" function is modifed to switch on the power supply to the smart card during initialization phase.
 
  1. In SClib.c.:-
    • Changed the size of input/output parameters of static functions 'SC_UpdateCRC', 'SC_UpdateEDC' & 'SC_SendT1Block'. This fix is done to optimize the code.
    • Modified the contents of 'SC_UpdateCRC' & 'SC_SendT1Block' function to suit the above change.
    • Modified "SC_TransactT0" function, to transmit first byte as 0x00 when LC & LE bytes are 0x00.
    • Changed the local variable 'edc' from 'WORD' type to 'unsigned short int' type (in static function :- 'SC_ReceiveT1Block')
  2. In SCpic24.c, SCpic18.c, SCpic32.c & SCdspic33f.c:-
    • The variable 'delayLapsedFlag' is declared as 'volatile' type, as it is modified in the Interrupt Service Routine.
 
  1. In SClib.c.:-
    • The wait time was getting reinitialized to default value while communicating with smart card using T = 0 protocol. So deleted "t0WWTetu = 10752;" in "SC_TransactT0" function.
    • Modified the function "SC_SendT1Block" in such a way that EDC is transmitted more effeciently for LRC/CRC mode in T = 1 protocol.
    • Initialized local variable "txLength" to '0' in function "SC_TransactT1" to remove non-critical compiler warnings.
  2. In sc_config.h
    • Removed the following unused file inclusions:-
      1. libpic30.h
      2. math.h
      3. delays.h
      4. plib.h
 
  1. Modified the PPS functionality as per ISO 7816 standard.
  2. Fixed BWT (Block Wait Time) and WT (Wait Time) calculation issues.
  3. Removed recursive function calls and modified the code to make it well structured and organized.
  4. Modified "SCdrv_EnableDelayTimerIntr" and "SCdrv_SetDelayTimerCnt" macros to configure 16 bit timers (this macro is used to provide delays).
  5. “WaitMicroSec()" & "WaitMilliSec()" macros are removed from sc_config.h file.
  6. Moved timer interrupts (used by smart card stack) to ISO 7816 hardware driver files.
  7. Added "TIMER1_SINGLE_COUNT_MICRO_SECONDS" and "TIMER0_SINGLE_COUNT_MICRO_SECONDS" macros in sc_config.h file.
  8. WaitMicroSec() and WaitMilliSec() delay functions have been rewritten in the ISO 7816 driver files to provide accurate... more 
Supported smart card library stack to PIC32, PIC24H and dsPIC33F devices. 
The following list of variable names has been changed to follow a common coding standard across the smartcard library.  
Microchip Smart Card Library 1.02.8 - [July 18, 2012]
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.