Human interface on SAM L21 Xplained Pro:
Introduction
This example shows how to implement a USB host mass storage on Atmel MCU with USB module.
Startup
After loading firmware, connect the board (EVKxx,XPlain,...) to a U-Disk (FAT/FAT32 are supported). This example creates a file "uhi_msc_test.txt" on all present U-disks.
- Led 0 is on when it's host and there is no device connected
- Led 0 blinks when a device is enumerated and USB in idle mode
- 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 0 is on when a read or write access is on going, and keep on if a LUN test is successful
- Led 0 is off when a LUN test is unsuccessful
- Button SW0 allows to enter the device in suspend mode with remote wakeup feature authorized
- Only SW0 button can be used to wakeup USB device in suspend mode
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/msc/host/
- Thirdparty modules:
thirdparty/fatfs
- 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)