This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AT91 GPIO read problem

I'm fairly new to AT91 and have been trying to use the platform macros to setup and read some GPIOs on an Olimex AT91SAM7S256 based board.

They provide their board pre-flashed with a demo program (no source) and you can press the micro switches to toggle/activate various board features using the program. The switches are externally pulled up.

With ecos, I can configure any gpio as an output and set it high or low without any problems, but when it comes to reading a pin's value it seems to always return 0 regardless of the logic level on it.

cyg_bool value

'value' is always 0. I've tried a couple of different boards in case the first one has been damaged somehow and different pins in case there is a perculiarity with a particular mulifunction pin.

 cyg_uint32 pdsr;
The pdsr status register never seems to change its value when the external logic level is changed.
The only example I can find is in the AT91 usb driver on the power pin.

Does anybody familiar with the AT91 have any ideas what school boy type error I might be making?



Before posting, please read the FAQ:
and search the list archive:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]