Hi,

I am basically new to WinCE environment so I would really appreciate if any
one of you could help me to sort out my problem.

I am using Intel PXA270 and BSP is MainstoneII in WinCE5.0. I want to make
my GPIO 14 as active output high. So I have changed GPIO's in
xlli_mainstone_defs.inc and mainstone.inc

GPIO's that I changed are GPDR0 as 0xC010C000 ( for output), GPSR0 as
0x00004000 ( for active high). My GAFR0_L is 0x84000000 as well.

But these values are not configuring my GPIO 14 as high as I measured
signal. Later on, I tried to print GPIO's values on hyper terminal but it
showing GPSR0 still as 0x00000000. I donot know where else do I need to
change for make it active high?

Thanks in advance.

Kind Regards,
Sandeep

Re: GPIO configuration in WinCE5.0 by Silver

Silver
Fri Jul 21 16:10:16 CDT 2006

GPSR is a write only register, read GPLR instead.

Also read back all of the GPIO space registers to determine that they
are really set as you think they should be.

e.g. Verify GAFR0_L has bits 29:28 = 0b00 and GPDR0 has bit 14 = 1

Are the GPIO registers setup by the bootloader and not your CE BSP? If
so you may need to update your bootloader to reflect the changes made in
the def file.

One more thing, is something else in your BSP attempting to use GPIO 14
for another purpose?




Sandeep wrote:
> Hi,
>
> I am basically new to WinCE environment so I would really appreciate if any
> one of you could help me to sort out my problem.
>
> I am using Intel PXA270 and BSP is MainstoneII in WinCE5.0. I want to make
> my GPIO 14 as active output high. So I have changed GPIO's in
> xlli_mainstone_defs.inc and mainstone.inc
>
> GPIO's that I changed are GPDR0 as 0xC010C000 ( for output), GPSR0 as
> 0x00004000 ( for active high). My GAFR0_L is 0x84000000 as well.
>
> But these values are not configuring my GPIO 14 as high as I measured
> signal. Later on, I tried to print GPIO's values on hyper terminal but it
> showing GPSR0 still as 0x00000000. I donot know where else do I need to
> change for make it active high?
>
> Thanks in advance.
>
> Kind Regards,
> Sandeep

Re: GPIO configuration in WinCE5.0 by Martin

Martin
Sat Jul 22 05:04:55 CDT 2006

The changes made to xlli_mainstone_defs.inc will only affect the bootloader
(assuming you have not modified EBOOT in any way). The Kernel startup code
skips the xlli_GPIO_init function in the Kernel if it is passed control
from the bootloader. So you have to re-program the bootloader for the change
to have any affect.

If you want to change GPIO settings within your application/driver/OAL code
look at the functions in xlli_gpio.c for example XllpGpioSetDirectionOut ()
to set a GPIO to output, there are plenty of examples of its use in the
MainstoneII BSP.

Regards

Martin




Re: GPIO configuration in WinCE5.0 by Bruce

Bruce
Wed Jul 26 16:34:33 CDT 2006

Also, make sure the GPCR is not clearing the bit.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Martin Howell" <martin@mchconsultancy.co.uk> wrote in message
news:O$HJLZXrGHA.4540@TK2MSFTNGP05.phx.gbl...
> The changes made to xlli_mainstone_defs.inc will only affect the
> bootloader (assuming you have not modified EBOOT in any way). The Kernel
> startup code skips the xlli_GPIO_init function in the Kernel if it is
> passed control from the bootloader. So you have to re-program the
> bootloader for the change to have any affect.
>
> If you want to change GPIO settings within your application/driver/OAL
> code look at the functions in xlli_gpio.c for example
> XllpGpioSetDirectionOut () to set a GPIO to output, there are plenty of
> examples of its use in the MainstoneII BSP.
>
> Regards
>
> Martin
>
>
>