1 / 18

Communication

Communication. We have 3 implemented protocols in our project: Serial Communication Protocol. USB HID Communication Protocol. USB Smart Card Communication Protocol. Serial Communication Protocol. Features: Data Rate: Serial runs at up to 115kbps . Number of devices: limited number .

mina
Download Presentation

Communication

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Communication • We have 3 implemented protocols in our project: • Serial Communication Protocol. • USB HID Communication Protocol. • USB Smart Card Communication Protocol.

  2. Serial Communication Protocol • Features: • Data Rate: Serial runs at up to 115kbps. • Number of devices: limited number. • Power: Two data lines, • one transmission • one receive line which means there is no bus for power . • Data Rate: 1byte is transmitted at time • Flexibility: • User should select the com port that connected to the device . • Truly Plug & Play: no • Hot-Swappable: no

  3. USB Communication Protocols • According to the serial limitation we prefer to use the USB protocol: • Higher Speed: • USB 1 : up to 1.5 Mbit/s • USB 2 : up to 480 Mbit/s • USB 3 : up to 5 Gbit/s • Multiple Devices. • Flexible to search and connect to the desired device. • Self-Powered. • Truly Plug & Play. • Hot-Swappable.

  4. USB Communication Protocols Host Side Device Side Application Layer Application Layer Virtual Path LCD RTOS AES Flashing Leds File System

  5. USB Communication Protocols Host Side Device Side Encrypt data Decrypt data Application Layer Application Layer Virtual Path Encrypted data Decrypted data LCD RTOS AES Flashing Leds File System

  6. USB Communication Protocols Host Side Device Side Application Layer Application Layer Virtual Path APIs APIs Class Layer Transfer Layer Virtual Path send receive Connect Disconnect On Device change send receive

  7. USB Communication Protocols Host Side Device Side Application Layer Application Layer Virtual Path send send receive receive Class Layer Transfer Layer Virtual Path

  8. USB Communication Protocols Host Side Device Side Application Layer Application Layer Virtual Path Class Layer Transfer Layer Virtual Path Configuration Layer Windows Libraries Layer Physical Path

  9. USB Communication Protocols Host Side Device Side Application Layer Application Layer Virtual Path Class Layer Transfer Layer Virtual Path Configuration Layer Windows Libraries Layer Physical Path

  10. Initialize Hardware Peripherals Initialize Hardware Peripherals • UDP (USB Device Peripheral) • AIC (Advanced Interrupt Controller) • PIO (Parallel input Output Controller) • PMC (Power Management Controller) Configuration Layer Driver Descriptor Implementation Driver Descriptor Implementation • Driver Descriptor { • Device Descriptor • Configuration Descriptors • Qualifier Descriptor • Other Speed config. Descriptors • Interface Descriptor • class descriptor • String Descriptors • } VBUS configure Check if USB is configured Transfer Send/Receive

  11. ===>Configuration Descriptor<=== ===>Device Descriptor<=== ===>Interface Descriptor<=== =>Smart Card Class Descriptor<= =>HID Class Descriptor<= Driver Descriptor Contain other Descriptors

  12. Initialize Hardware Peripherals Driver Descriptor Implementation • The Device wait until it becomes in the configured state. After receiving acknowledgement from host with the selected configuration and alternate settings. VBUS configure VBUS configure • Configure PMC (Power Management Controller) for VBUS .Enable PIO (Parallel input Output Controller) Interrupt .VBUS is present . Connect . Check if USB is configured Check if USB is configured NO • Now the Device is in the Configured state and ready for transactions. • In HID : Transactions are by Report exchanging. • In Smart Card : Transactions are by bulk messages exchanging. YES Transfer Send/Receive Transfer Send/Receive

  13. USB Device is attached Host determines the exact nature of change by querying the hub. Host waits for 100 ms to allow completion of insertion process

  14. After the 100 ms of insertion, host enables the port and reset it. • enables the port: make the device in Powered state. • reset the port: make the device in Default state. • The obtained power is either:from External Source “self-powered” or from USB port “Bus-powered”

  15. After resetting the port, The device is in it’s default state. Waiting for the host to assign a unique address to him …

  16. Host assign a unique address to the device. Waiting for configuration … Before the Device receives the unique address. It’s default CTRL pipe is accessible via the “Default address”.

  17. Host configures the Device • Host reads the device “descriptors” to obtain: • The max. payload size. • Configuration info. • Based on “the configuration info” and how USB device will be used, Host gives configuration values.

  18. In order to conserve power. USB device automatically enter suspended state when it observe no bus traffic for a specified period. Maintains any internal states, address, configuration. • Hub port is disabled. At any bus activity, the device will wake up and send an electrical signal to the host to re enable the hub port.

More Related