ST AN2271 Application note

AN2271

APPLICATION NOTE

Ekey-Udisk solution

Introduction

This document describes a firmware implementation for an Ekey-Udisk device based on ST72651.

The software is divided into 3 parts:

USB management: the main USB operations are managed by a USB library with USB hardware, which is not the focus in this documentation. For further information on this subject, please refer to the ST7 USB software library documentation.

NAND Flash interface: this part software is migrated from PFD solution. How to implement it is not mentioned in this documentation.

Smart Card interface: this interface is implemented by timer and accords ISO7816-1, 2, 3.

December 2005

1/8

www.st.com

System Structure

AN2271

 

 

1

System Structure

 

 

 

 

PC SIDE

DEVICE SIDE

 

 

 

 

 

 

 

 

 

PC Application Software calls 2

 

Full Speed USB Lib

 

 

 

interfaces through different driver

 

(Based on ST7 chip)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Process HID

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Protocol

 

 

 

 

 

 

HID Interface

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mass Storage

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ekey Function

 

Interface

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Udisk Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Microsoft HID

 

Microsoft Mass

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Storage driver

 

 

 

 

 

 

 

 

 

 

 

 

driver

 

 

Process APDU

 

Process BOT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Protocol

 

RBC Protocol

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ISO 7816

 

NAND Flash

 

 

 

Microsoft USB driver

 

 

 

Plugin

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2/8

www.st.com

ST AN2271 Application note

AN2271

System Diagram

 

 

2 System Diagram

Main

Polling USB event

No

New HID data received?

Yes

Parse APDU Request.

Set ETU timer interrupt.

Start communication with smart card.

APDU

No

transaction is

 

 

on-going?

 

 

Yes

 

 

 

APDU

No

transaction has

 

 

finished?

 

Yes

Send back APDU result

New

No

Flash

No

BOT package

 

operation has

 

received?

 

finished?

 

Yes

 

Yes

 

Flash operation

 

Send back BOT status

 

3/8

Loading...
+ 5 hidden pages