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  [ 2 posts ] 
Author Message
 Post subject: INREG16 use problem in AT91SAM9261 BSP 1.7
PostPosted: Sat Jun 13, 2009 3:34 am 
Offline

Joined: Sat Jun 13, 2009 3:28 am
Posts: 2
I use "INREG16" to Read data From FPGA,which connected to ARM NC0.
but the return value is wrong. And the "INREG16" work correct in BSP1.5.


Top
 Profile  
 
 Post subject: Re: INREG16 use problem in AT91SAM9261 BSP 1.7
PostPosted: Sat Jun 13, 2009 3:38 am 
Offline

Joined: Sat Jun 13, 2009 3:28 am
Posts: 2
the relation code:
UINT16* g_pRam = NULL;
UINT16 HPI_Addr;

PHYSICAL_ADDRESS pa;
pa.LowPart = (DWORD)(0x10000000);
pa.HighPart = 0x00000000;
g_pRam = (UINT16*)MmMapIoSpace(pa, (DWORD)(RAM_SIZE), false);

extern "C"
DWORD RAM_Read(DWORD dwData, LPVOID pBuf, DWORD Len)
{
*((UINT16*)pBuf) = INREG16((UINT16*)(g_pRam+HPI_Addr));//INREG32
return TRUE;
}


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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: