Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: AT91SAM9261 PIO setting
PostPosted: Fri Dec 01, 2006 6:53 am 
Offline

Joined: Fri Dec 01, 2006 4:30 am
Posts: 11
Hi~ I wrote a AP in Platform Builder5.0 to read PIO_A register status.
But it can't work. I checked sam9261 datasheet for memory mapping. PIOA address is FFFF F400~FFFF F600. In Microsoft WinCE define for Virtual memory mapping, 3~4G address is not used. Could you offer how to do when I would like to set PIO and read it's status?
PS. The attached file is TEST code (TEST.exe and SPI.dll) I compiled them and put into winCE via activesync, then executed TEST.exe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 11, 2006 5:57 pm 
Offline

Joined: Fri May 14, 2004 9:58 am
Posts: 183
Location: France - USA
Dear Bryan,
You don't need to use Virtualalloc and virtualCopy. Look at the MmMapIoSpace function.

The second thing is that you can't write a 0 in the PDR register.
If you want to use a pin as a PIO, you must write a 1 in the corresponding bit in PER, if you want to use it as a peripheral, write a 1 in PDR.

What do you want to do exactly?

Vincent

_________________
Adeneo Embedded
http://www.adeneo-embedded.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 2:13 pm 
Offline

Joined: Fri Dec 01, 2006 4:30 am
Posts: 11
Hi~
I have changed to use MmMapIoSpace function to set.
I included "ceddk.h" for MmMapIoSpace function.
But I got a error message as below:

BUILD: [01:0000000037:ERRORE] SPI.obj : error LNK2019: unresolved external symbol MmMapIoSpace referenced in function "int __cdecl SPI_piotest(void)" (?SPI_piotest@@YAHXZ)

BUILD: [01:0000000038:ERRORE] obj\ARMV4I\retail\SPI.dll : fatal error LNK1120: 1 unresolved externals

I add "ceddk.lib" into source file and compiled. I got another error message as below:

BUILD: [00:0000000009:ERRORE] \WINCE500\PBWorkspaces\AT91SAM9261EK_DEMOBIN_V150\SPI\: Invalid entry in sources file: ceddk.lib.

which step I lost?

PS.The attached file is the source code.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 11:09 am 
Offline

Joined: Mon Jun 04, 2007 8:31 am
Posts: 6
Hi,

I got the similar situation. After I included "ceddk.h" and added "ceddk.lib" to the project to compile, the builder returned the error message as below:

BUILD: [01:0000000041:ERRORE] NMAKE : U1073: don't know how to make 'C:\WINCE500\PBWorkspaces\AT91RM9200EK_Tutorial\WINCE500\AT91RM9200EK_BIN_ARMV4I\cesysgen\sdk\lib\ARMV4I\debug\ceddk.lib'
BUILD: [01:0000000043:ERRORE] NMAKE.EXE -i -c BUILDMSG=Stop. LINKONLY=1 NOPASS0=1 MAKEDLL=1 failed - rc = 2

I have added a link to the lib file and provided the path for the builder to build.

Does anyone know how to solve this? Thanks!!!

Kim


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: