完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,我真的迷上了这个。我记得有一段时间,它是有点工作(我进入缓存一致性故障,但基本闪存写入工作…)我的小问题是:我尝试发出一个NOP重置/清除错误标志:NVMCONBITS。WREEN=0;NVMCONBITS.NVMOP=0;NVMKEY=0x0;NVMKEY=0XAA99 665;NVM;NVMKEY=0x55 66 .99;NVMCONSET=1和lt;lt;15;也尝试(这只是一个库的片段):NVMCON=OP;& lt;-这里OP= 0x4000;NVMKEY=0xAA96955;NVMKEY=0x55 66 99 AA;NVMCONSETSET 0x8000;一些库/实例加载NVMKEY=0x0;第一,一些没有。我尝试了两种方式。第四,但我总是把Wrrr设置为一次我设置WR。可能是我的一些配置设置阻止闪光灯工作吗?我不使用DMA,也不中断。(也尝试了DMA/Its禁用它们的代码,但结果相同……如果有人知道我应该在哪里寻找问题,请让我知道。THX,爱德华·艾尔利克
以上来自于百度翻译 以下为原文 Hi, I've got really stuck with this one. And i remember there was a time when it was somewhat working (i got into cache coherency trouble, but the basic flash write was working...) My little problem is this: I try to send out a NOP to reset/clear error flags: NVMCONbits.WREN = 0; NVMCONbits.NVMOP = 0; NVMKEY = 0x0; NVMKEY = 0xAA996655; NVMKEY = 0x556699AA; NVMCONSET = 1 << 15; also tried (this is just the snippet from a library): NVMCON = 0; NVMCON = op; <-here op = 0x4000; NVMKEY = 0xaa996655; NVMKEY = 0x556699aa; NVMCONSET = 0x8000; Some libraries/examples load NVMKEY=0x0; first, some doesn't. I tried both ways back and forth, but i ALWAYS get WRERR set to one once i set WR. Could it be that some of my configuration settings preventing flash to work? I use no DMA and no Interrupts. (also tried the code which has DMA/Ints disable in them but same results... If someone has some idea where should i look for problems, please let me know. thx, Edo |
|
相关推荐
3个回答
|
|
|
从另一个论坛帖子:HTTP://www. McCHIP.COM/FUMMS/M43533.ASPX
以上来自于百度翻译 以下为原文 from another forum post: http://www.microchip.com/forums/m487533.aspx |
|
|
|
|
|
THX,尝试它(实际上我的代码确实清除了WREN单独设置操作),但它不工作,无论哪种方式,我甚至不试图擦除或写入任何NVM…我只是尝试发送NOP命令,但它失败了…-去年我就这样跑了,但是现在它不跑了。
以上来自于百度翻译 以下为原文 Thx, Tried it (actually my code does clear the WREN separately from setting the operation), but it doesn't work either way. And i don't even try to erase or write any NVM... i just try to send the NOP command, and it fails... :-( Last year i had this somehow running, but now it refuses to run. Edo |
|
|
|
|
|
嗨,问题解决了……首先,当使用MPLAB X IDE时,我没有看到正确的结果。我正在调试代码,错误被设置了,不管是否有错误……问题不是在清除WREEN,而是无法启用它。这是我尝试的第一件事…只有我能看到正确的结果…最后我用模拟器尝试它并没有给出错误(但是崩溃),所以我在启用WR之后设置断点,变为PKOB,并且幸运的是,在NoP命令和VoILA之后启用了WREN,错误标志是CLE。应收账。。。我甚至粘贴了代码,从第一个删除了WREEN集,所以它生成并出错,并检查NoP是否清除了错误标志,它确实是这样。问题是在我身上,我习惯了调试器不干扰结果的其他平台,IDE不会崩溃,如果您这样做的话。设备内存加载。Sthx,爱德华·艾尔利克
以上来自于百度翻译 以下为原文 Hi, Problem solved.... First of all, i didn't see correct results when using the MPLAB X IDE. I was debugging the code and the error got set regardless if there was an error or not... The problem wasn't clearing WREN, it was not enabling it. Which was the very first thing i tried... ..only i would see the correct results... Eventually i tried it with the simulator and it didn't gave the error (but crashed), so then i set a breakpoint after enabling WR, changed to PKOB and was lucky enough that the WREN was enabled after the NOP command was given and voila, the error flag is clear... I even pasted the code under, removed WREN set from the first one so it generates and error, and checked if the NOP clears the error flag, and it did. And the problem is in me, i got used to other platforms where the debugger doesn't interfere with the results, and the IDE doesn't crash if you do a device memory load. :S thx, Edo |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1124浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 02:46 , Processed in 0.626191 second(s), Total 79, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2711