完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我想在我的DSPIC33中把引导安全段添加到我的Bootloader中。我激活了引导段,下面的问题是,当我试图擦除内存页时,设备重置自己。擦除功能是这样的,我认为这是因为BWRPYWrPrExtExtEon块EV。即使是从同一个区段写入请求也尝试使用BWRPYWrPrExtExtOffOf,而不是重置本身,设备停止工作,我不能调试它,但是它停止打开和关闭通常闪烁的LED。即使我把设备关闭和打开,它也不再运行(就像程序被完全擦除一样)。CycGrGron寄存器也没有给出任何关于配置BWRPSYWRP保护程序的重置原因的提示,你能帮助我吗?我显然错过了什么,但是看不到什么。谢谢你的时间。
以上来自于百度翻译 以下为原文 Hi everyone, i wanted to add a boot secure segment to my bootloader in my dspic33f. i activate the boot segment with the following /* Boot Segment Configuration Register Byte RBS_NO_RAM No Boot RAM BSS_MEDIUM_FLASH_STD Standard Security, Medium-sized Boot Flash BWRP_WRPROTECT_ON Boot segment is write-protected */ _FBS(BWRP_WRPROTECT_ON & BSS_MEDIUM_FLASH_STD & RBS_NO_RAM ); the problem is that now when i try to erase a memory page the device reset itself. The erase function is this .section *,code,boot _Erase: push TBLPAG mov W2,NVMCON mov w0,TBLPAG ; Init Pointer to page to be erased tblwtl w1,[w1] ; Dummy write to select the row mov #0x55,W0 ;Unlock sequence - interrupts need to be off mov W0,NVMKEY mov #0xAA,W0 mov W0,NVMKEY bset NVMCON,#WR nop ;Required nop I thought i was due to the fact that BWRP_WRPROTECT_ON blocks every write request even from the same segment butI also tried to use BWRP_WRPROTECT_OFF and instead of resetting itself, the device stop working, i'm not able to debug it but it stop turning on and off the leds that normally keep blinking. Even if i turn the device off and on again it doesn't run anymore (like if the program was completely erased). Also checking RCON register does not give any hint on the reset reason of the configuration BWRP_WRPROTECT_ON Can you help me? i'm clearly missing something but can't see what. Thank you for your time |
|
相关推荐
1个回答
|
|
删除页面时,我使用Value0x4042,意思是“擦除代码存储器或执行内存页”。我的BL启动广告地址0x400,我尝试擦除第一个内存页面(0x0-0x3FE)和从0x2000开始的页面,因此在擦除期间应该有问题。我不KN。悲伤的感觉:
以上来自于百度翻译 以下为原文 still have the problem. to delete the page i use the value 0x4042 which means "Erase a page of code memory or executive memory". My BL starts ad address 0x400 and i try to erase the first memory page (0x0 - 0x3FE) and the pages strating from 0x2000, so it should have problems during erasing. I don't know what to think sad: |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2036 浏览 8 评论
1956 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3217 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2264 浏览 5 评论
781浏览 1评论
676浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
602浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
684浏览 0评论
581浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 12:30 , Processed in 1.488702 second(s), Total 48, Slave 42 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号