Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ASF USB host vendor

Jumper setup on SAM4L_EK :

Introduction

This example shows how to implement a USB host vendor on Atmel MCU with USB module.

Startup

After loading firmware, connect the board (EVKxx,Xplain,...) to a board that runs USB device vendor example. This example transmit and receives on all endpoints enumerated.

  • Connect PA06 and usb (VBus detect)
  • Connect PB05 and usb (ID detect)
  • Connect PC07 and usb (VBus error detect)
  • Connect PC08 and usb (VBus control)

Human interface on SAM4L_EK :

  • Led 0 is on when it's host and there is no device connected
  • Led 0 blinks when a device is enumerated and Vendor interface enabled
    • The blink is slow (1s) with low speed device
    • The blink is normal (0.5s) with full speed device
    • The blink is fast (0.25s) with high speed device
  • LED backlight is on when Vendor test is success
  • LED backlight blinks when Vendor test is unsuccess

About example

The example uses the following module groups:

  • Basic modules: Startup, board, clock, interrupt, power management
  • USB host stack and MSC modules:
    services/usb/
    services/usb/uhc/
    services/usb/class/vendor/host/
  • Specific implementation:
    • main.c,
      initializes clock
      initializes interrupt
      manages UI
    • specific implementation for each target "./examples/product_board/":
      • conf_foo.h configuration of each module
      • ui.c implement of user's interface (buttons, leds)