In my last post I touched on Galileo's shield interface implementation. Having experimented with a few shields sitting in my drawer, I realized that the implementation of the Arduino shield interface creates a bit of a challenge. So before you assume that a shield is plug-and-play do your homework. Like with a vintage car they may need some tender loving care.
Here are a few key criteria that you want to check:
- Does my shield draw a lot of current: the Cypress CY8C9540A 40-Bit I/O Expander is only capable of driving 15/25mA instead of 40/50mA
- Are you accessing some of the shield pins at a high rate? Without special tricks, the Galileo can only toggle an IO pin at 477 kHz (see also Galileo FAQ and Forum post on this subject).
- Does the driver directly access Atmel's registers? This can be either the IO-port registers, Interrupt, Pulse Width Modulator (PWM) or Timer registers.
- Does it use any AVR libraries? These libraries are exposing the Atmel AVR hardware to the programmer and are therefore a sure sign that you are in for some work to port the Arduino software libraries to the Galileo platform. Search for "#include <avr/" to see how many AVR hardware specific libraries are used.
Well written software libraries only use the official Arduino application programmers Interface (API). However, many of the existing shield libraries directly manipulating AVR hardware registers. This is either done out of ignorance for software portability or out of necessity as to push the hardware to its limits. I expect that with the transition away from the 8-bit AVR (ATmega328) micro controller to the more powerfule 32-bit CPUs ( Arduino Due, Arduino Tre, Galileo and Olimex-STM32) this problem will gradually subside.
Also note that as of this writing the following Arduino Libraries are supported:
Check the Release Notes on Intel's site for the latest status.