阅读:1401回复:7
9052 Local Adress,我的电脑属性资源中有三个,我该用哪个呢?
资源如下:
内存范围:DF000000-DF00007F 输入输出范围:B800-B87F B400-B403 B000-B0FF 内存范围:DE800000-DE81FFFF 应用程式让我输入local address, 我应该使用哪个地址呢?好象哪个都不行,搞糊涂了, 我用过: 0xB800 0xB410 0xB810 ... 应用程式如下,总是出现write 错误. void TestDirectSlave( HANDLE hDevice ) { U8 Revision; U16 i; U32 ChipType; U32 LocalAddress; U32 BufferDest[0x1]; U32 BufferSrc[0x1]; IOP_SPACE IopSpace; RETURN_CODE rc; printf("\n"); printf(" WARNING: There is no safeguard mechanism to protect against invalid\n" " local bus addresses. Please be careful when selecting local\n" " addresses to transfer data to/from. System crashes will result\n" " if an invalid address is accessed.\n"); printf("\n\n"); printf("Please enter a valid local address --> "); scanf("%x", &LocalAddress); PlxChipTypeGet( hDevice, &ChipType, &Revision ); // Setup parameters for test IopSpace = 0; switch (ChipType) { case 0x9050: case 0x9052: IopSpace = IopSpace0; break; case 0x9030: case 0x9080: case 0x9054: IopSpace = IopSpace0; break; case 0x0480: IopSpace = IopSpace1; break; } // First test without remapping printf(" Without Remapping: Space %d, 32-bit, offset = 0\n", IopSpace); printf(" Preparing buffers............ "); for (i=0; i < (sizeof(BufferSrc) >> 2); i++) BufferSrc = 0x55aaff00; memset( BufferDest, 0, sizeof(BufferDest) ); printf("Ok\n"); printf(" Writing Data to Local Bus.... "); rc = PlxBusIopWrite( hDevice, IopSpace, LocalAddress, FALSE, // No Re-map BufferSrc, sizeof(BufferSrc), BitSize32 ); if (rc != ApiSuccess) { printf("*ERROR* - Write failed, code = %d\n", rc); return; } printf("Ok\n"); |
|
|
沙发#
发布于:2004-07-29 08:40
哪位大侠帮看看啊,
实在是不知道问题在哪里呢? 出错图片如下: |
|
|
板凳#
发布于:2004-07-29 15:44
都到哪里去了,怎么就没人指点一下呢?
|
|
|
地板#
发布于:2004-07-29 17:34
应该用第三个,前两个是9052自己内部寄存器用的。
劝你先用windriver之类可以简单操作端口的应用程序调试 |
|
|
地下室#
发布于:2004-07-29 19:16
是用B000吗?
我用的是DS2.7,也可以吧. 从没做过driver.请不要见笑. |
|
|
5楼#
发布于:2004-07-30 09:54
内存范围E800000-DE81FFFF
应该是这个 那两个只有ff大小的空间应该是9052内部用的 我的意思是你不要先自己写驱动程序,先找个软件直接操作端口好了 [编辑 - 7/30/04 by winter] |
|
|
6楼#
发布于:2004-07-30 11:27
我用DS2.7能直接进行端口操纵吗?
没用过windriver. 也可以用debug吗. 我的卡有6个8bit port可以使用,就是地址搞不清楚. |
|
|
7楼#
发布于:2004-07-30 18:29
好象不对啊,怎么回事. :(
|
|
|