AT91SAM9261 and GPIO under WinCE 6.0 / C#

This forum is for users of Atmel's SAM Series and who are interested in using WinCE OS.

Moderator: nferre

Posts: 4
Joined: Thu Aug 05, 2010 2:21 pm

AT91SAM9261 and GPIO under WinCE 6.0 / C#

Tue Sep 21, 2010 7:50 am


since WinCE 6.0 there is no longer the possibility to create direct pointer to the GPIO register. So I need a suitable driver to set/read the IO pins of my AT91SAM9261 controller, right? I have searched for such drivers on my WinCe (evaluation) installation but I can't find them. I found drivers for USB, UART, SPI, Network... but what driver for this problem I have to use? Btw. I create the software with C# and the .NET Compact Framework.

Best Regards

Posts: 1
Joined: Tue Apr 21, 2009 12:27 pm

Re: AT91SAM9261 and GPIO under WinCE 6.0 / C#

Tue Sep 21, 2010 9:01 am


though I am not familiar with the AT91SAM9261 CPU I assume that it does have a similar BSP structure as the AT91SAM9263-EK BSP that we are using.

The BSP offers a GPIO driver based on the Stream Driver Interface.

You have to add the GPIO driver from the BSP items catalog to your OS Design and rebuild the image.

Once the image is up and running on your board you can use standard file IO functions, i.e. CreateFile, DeviceIoControl and CloseHandle to control the driver.

These functions can easily be PInvoked from the .NET platform.
You might want to check out OpenNetCF. They offer a managed Stream Driver Interface class that wrapps all functions needed to communicate with a Stream Interface Driver.

For reference on the DeviceIoControl codes and the structures used as parameters refer to the GPIO drivers source Code.

After installing the BSP the main code should be located under



Return to “WinCE”

Who is online

Users browsing this forum: No registered users and 1 guest