Windows Embedded Blog bsquare
   
 
windows embedded blog
April 7th, 2008 SD vs. MMC
May 9th, 2008 Adapting the Sample Host Controller
May 14th, 2008 Understanding Critical Section Deadlocks in Windows CE 6
More > > > > > >
 
 
Windows Embedded Blog questions
 
Windows Embedded Blog experts
 
Windows Embedded Blog updates
Email:

 

. . . . . . . . . . . . . . . . . . . . . .
RETURN TO BLOG HOME

VISIT WWW.BSQUARE.COM

  May 9th, 2008
___________________________________________
Adapting the Sample Host Controller

This is the third in a series of posts about SD architecture. If you’re not familiar with the technology, start with my SD 101 post.

The BSQUARE SDIO Hx1.2 Host DDK gives you an easy way to add SDIO capabilities to your embedded device, including support for multiple SD slots. Adapting it for your device requires just a few steps.

Configuring interrupts
The first step in adapting the host controller for your system is to configure the interrupt number. The number varies from system to system – even between systems using the same processor. Fortunately, configuration is easy. It involves changing a registry key.

Verify both slots are working
This step is more involved than it sounds. Some developers just plug memory cards into both slots, pronounce the test a success, and are surprised when they uncover issues later.

The problem is that while memory cards and SDIO cards are the same physically, they use different resources. Only SDIO devices trigger interrupts. It’s important that in your testing that you trigger those interrupts as well, as doing that can expose issues in your drivers.

Add power management code
Power management is not included in the reference controller driver. This gives you the flexibility to customize power management for your device.

However you choose to implement power management, you should not cut power to the SD slot. Cutting power to the card causes it to go into an uninitialized state. When you restore power, you have to re-initialize the card.

For multimedia applications, cutting power to the card is especially problematic. If you’re playing a media clip from the SD card when it was powered down, it may not resume at the same place when power is restored. And the user would also have to wait for the SD drivers to re-load.

. . . . . . . . . . . . . . . . . . . . . . .
Raymond Yip
Senior Software Engineer
Professional Engineering Services
BSQUARE Corporation | Contact Me!