完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
在使用PIC32 MZ2048 EC144的EBI时,我得到了运行时的ExpExcess,这毫无意义。我有一个Epson图形控制器,根据HARMony配置映射到外部地址0x2000000,因此我可以直接地址配置寄存器和显示RAM的速度和代码e项目是使用MPLAB X V3.40,XC32 V1.42,Harmony V1.09,Real ICE调试器。在Harmony中,代码在项目中,编译良好,并且在启动时执行。当在EBI配置之后逐步通过项目时,当我试图从构造的指针读取时,即使它看起来是正确的,也会一直获得运行时异常(对于t.我尝试读取两个寄存器)但是第一次调用GetReg时总是抛出异常。这非常类似于PIC32MZ手册的EBI部分中所示的代码,并且EBI运行地址0x20000000应该是一个有效地址。我还附上了和谐的EBI配置。
以上来自于百度翻译 以下为原文 I am getting Runtime Exeptions when using the EBI on a PIC32MZ2048ECH144 which make no sense. I have an Epson graphics controller mapped to external address 0x2000000 according the Harmony configuration so I can directly address the configuration registers and display RAM for speed and code e The project is using MPLAB X V3.40, XC32 V1.42, Harmony V1.09, Real ICE debugger. The EBI has been configured in Harmony, code is in the project, compiles fine, and is executed on startup. When I step thru the project after EBI configuration I keep getting Runtime Exceptions when I attempt to read from the constructed pointer even though it appears to be correct (0x20000000 and 0x20000002 for the two registers I am trying to read) but the exception keeps getting thrown the first time GetReg is called. // base addresses for controller registers and display RAM on EBI bus #define PIXEL_BASE_ADDRESS 0x20200000 // address bit A21 turned on M/~R on #define REG_BASE_ADDRESS 0x20000000 // address bit A21 turned off M/~R off uint16_t * pixelRamPtr; uint16_t * registerPtr; //DEBUG uint16_t regID_0, regID_1; void WriteRegister(uint16_t index, uint16_t value) { registerPtr = (uint16_t *) (const) (REG_BASE_ADDRESS + (uint32_t) index); *registerPtr = value; } uint16_t GetReg(uint16_t index) { registerPtr = (uint16_t *) (const) (REG_BASE_ADDRESS + (uint32_t) index); return *registerPtr; } void ResetDevice(void) { regID_0 = GetReg(REG0000_PRODUCT_ID_0); regID_1 = GetReg(REG0002_PRODUCT_ID_1); } This is very similiar to the code shown in the EBI section of the PIC32MZ manuals, and with the EBI running an address of 0x20000000 should be a valid address. I have also attached the EBI configuration from Harmony Attached Image(s) |
|
相关推荐
5个回答
|
|
嗯,我看了,但我讨厌我的意思,你能展示你的真实密码吗?
以上来自于百度翻译 以下为原文 Ahem, I watched it, but I hate that thing I meant, can you show your real code? |
|
|
|
是的,我认为工具包名称是一个矛盾的术语…因此,在遍历两个文件夹(AHEM)之后,这里是初始化代码:(关于嵌入代码的答复的“论坛故障”)/ /附有“外周/EBI/PLBEI EBI.H”字样的“/外周/EBI/PLEBYEB.H”字样,包括“系统/内存/ EBI/SysMyEngy EbIIIA.H.”LUnsixSysMeMyLyMyByIa初始化(Value)摘要:初始化EBI控制器注释:*/Value SysMeMyLyEbIIa初始化(Value){/*配置EBI引脚*//*全局PIN控件,由EBI*/PLEBY-EBIOBEnEngEnababelEET(EbIIAIDO0,TRUE);/*启用地址引脚*/PiBieBeBi* AddiSpReNeababl BITSSET(EbIIAIDIO0,EBIOBEADADDRIN PU21);/*数据字节启用*/PLEBY-EBIADATAENABABLET(EBIAI IDO0,TRUE,TRUE);//BICOSX PIN配置*/PLIBEYEBICHIPStRUNCTABLE(EBIAI IDO0,TRUE,FALSE,FALSE,FALSE,FALSE);/*B/EBBS0和/EBIBS1启用*/PLEBY-EBIYBYTELSETPITSET(EBIAI IDO0 0,TRU)/*/eBiWe和/eBeEe是禁用的*/PiBixEbIOrthOutOutOutoPosikSub(EbIIOIDIO0,false,false);/*eByDy1启用但不倒置*/PLEBY-ErdYyPyp1配置集(EbIIAIDO0,TRUE,FALSE);/* EBIRDYx是边缘敏感*/PLEBY-eBiRead yPySnPosiSSET(EbIIAIDO0,false);/*初始化EBI为MEMEBICS0*//*安装EBICS0*//*安装EBICS0*/PLIB_EBI_Base地址集(EBI_ID_0,0,0,0x20000000);/*安装EBIMSK0*/*EBI_ID_0,0,0,0000XXX0000000000000000000);//*安装EBIMSK0*/PLIB_EBI_EBIBI_EBI_EBI_EBI_EBI_Memor_Memor_存储器特征特性设置设置(EBI_ID_ID_ID_ID_0,0,0,0,0,0,SRAM,SRAM,MEBI,MEMOAM,MEMOMMEMO,MEMO,MEDE*/PLIB_EBI_ReadyModeSet(EBI_ID_0,true,false,false);PLIB_EBI_MemoryPagingSet(EBI_ID_0,0,false,PAGE_WORD32);PLIB_EBI_MemoryTimingConfigSet(EBI_ID_0,0,0,0,0,0,0,0,1);
以上来自于百度翻译 以下为原文 Yeah, I think that toolsuite name is a contradiction in terms ... so after traversing a folder ot two (ahem) here is the initialization code: (forum glitches on replies with embedded code, oy) // ***************************************************************************** // ***************************************************************************** // Header Includes // ***************************************************************************** // ***************************************************************************** #include "peripheral/ebi/plib_ebi.h" #include "system/memory/ebi/sys_memory_ebi_static.h" /******************************************************************************* Function: void SYS_MEMORY_EBI_Initialize(void) Summary: Initializes EBI Controller Remarks: */ void SYS_MEMORY_EBI_Initialize(void) { /* Configure EBI Pins */ /* Global Pin Control by EBI */ PLIB_EBI_ControlEnableSet(EBI_ID_0, true); /* Enable Address Pins */ PLIB_EBI_AddressPinEnableBitsSet(EBI_ID_0, EBI_EBIADDR_PIN21); /* Data Byte Enables */ PLIB_EBI_DataEnableSet(EBI_ID_0, true, true); /* /EBICSx Pin Configuration */ PLIB_EBI_ChipSelectEnableSet (EBI_ID_0, true, false, false, false); /* /EBIBS0 and /EBIBS1 enabled */ PLIB_EBI_ByteSelectPinSet(EBI_ID_0, true, true); /* /EBIWE and /EBIOE are disabled */ PLIB_EBI_WriteOutputControlSet (EBI_ID_0, false, false); /* EBIRDY1 Enabled but not Inverted */ PLIB_EBI_ReadyPin1ConfigSet (EBI_ID_0, true, false); /* EBIRDYx is edge sensitive */ PLIB_EBI_ReadyPinSensSet (EBI_ID_0, false); /* Initiialize EBI for Memory on EBICS0 */ /* Setup EBICS0 */ PLIB_EBI_BaseAddressSet(EBI_ID_0, 0, 0x20000000); /* Setup EBIMSK0 */ PLIB_EBI_MemoryCharacteristicsSet(EBI_ID_0, 0, SRAM, MEMORY_SIZE_4MB, CS_TIMING_0); /* Setup EBISMT0 */ /* Setup EBISMT0->RDYMODE */ PLIB_EBI_ReadyModeSet(EBI_ID_0, true, false, false); PLIB_EBI_MemoryPagingSet(EBI_ID_0, 0, false, PAGE_WORD32); PLIB_EBI_MemoryTimingConfigSet(EBI_ID_0, 0, 0, 0, 0, 0, 0, 1); /* Setup EBISMCON->SMWIDTH0 */ PLIB_EBI_StaticMemoryWidthRegisterSet(EBI_ID_0, 0, MEMORY_WIDTH_16BIT); } |
|
|
|
哦,好吧,那么我很抱歉,你在第一篇文章中说你已经“遵循了EBI FRM文档中的示例”(左右),并且那个示例确实使用了虚拟地址——所以我跳过了这个!作为参考,这是我的线程:HTTP://www. McCHIP.COM/FUMMS/M952532.ASPX
以上来自于百度翻译 以下为原文 Oh ok then I am sorry, you said in first post that you had "followed the example in the EBI FRM document" (or so) and that example does indeed use Virtual Addresses - so I had skipped this! for a reference, this was my thread: http://www.microchip.com/forums/m952532.aspx |
|
|
|
是的,我错过了外部ram基地址是0xC0000000……更糟糕的是,我在运行调试器,这也有问题吗?是时候打开我的小UART调试端口,让它给我发送文本,看看有什么工作了,sheesh除了第一段代码,这个项目进行得非常好;-)Larry;
以上来自于百度翻译 以下为原文 Yeah, I missed that the external ram base address was 0xC0000000 ... And to make things worse, I am running through the debugger, that has issues too? Time to turn on my little UART debug port and have it send me text to see what is working, sheesh Other than this first piece of code this project is going extremely well ;-) Larry |
|
|
|
正如我常说的,我更喜欢一个UART调试到一个调试器…
以上来自于百度翻译 以下为原文 As I always say, I prefer MUCH MORE a UART debug to a Debugger... |
|
|
|
只有小组成员才能发言,加入小组>>
5231 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3200 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
770浏览 1评论
658浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
587浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
668浏览 0评论
570浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-19 02:15 , Processed in 1.487292 second(s), Total 85, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号