Skip to content

Hardware Abstraction Layer

Oleg Mazurov edited this page Oct 12, 2015 · 2 revisions

A great variety of embedded USB SIE can be seen in the wild these days. SIE is an abbreviation for "Serial Interface Engine", a term to describe a USB peripheral controller, either external (venerable MAX3421E) or internal to the MCU (available from almost any major MCU manufacturer). Even though any SIE comes with manufacturer-provided USB stack and included examples typically compile and run just fine the post-examples' development is often difficult and migrating code between MCU platforms of different manufacturers is even more difficult. To alleviate this, UHS3 contains Hardware Abstraction Layer (HAL) allowing for code reuse between dissimilar MCUs. As long as HAL for an MCU exists the library and any application code will work on this MCU.

Each SIE has its own hardware implementation and interrupt controller of the host MCU adds another piece of proprietary hardware; because of that, a HAL is rather large and complex. The layer provides the following functionality:

  1. Power-on initialization of the peripheral
  2. Handling of USB bus events
  3. USB transfers
  4. An interrupt handler taking part in USB loop - a task dealing with device attach/detach events.

Clone this wiki locally