完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嘿,伙计们,我看了很久以后就把头发拔掉了。也许有人对尝试什么有一些想法。好吧,让我们来看看这个悲伤的故事。我试图用这个例子来为我的DSPIC33 EP128GM604实现一个串行引导加载程序:HTTPS://Github. COM/KCaluWee/DSPIC33 E-Bootloader得到引导加载程序,主应用程序将通过串行闪存并跳转到我的应用程序代码。成功!然后我改变了我的应用程序源代码并试图重新闪存。这就是事情下山的地方。应用程序代码传输串行罚款和应用程序代码启动…但举止怪异。我做了一些内存比较,很明显Bootloader并没有删除导致我的奇怪程序行为的应用程序内存页的第一行。为了排除对擦除的任何外部影响,我创建了一个简单的裸程序,只需将数据写入页面即可。然后试图清除它。我仍然看到同样的行为。我已经附上了下面的代码以及第一行似乎没有擦除的代码比较。任何想法都会被感激的。谢谢,乔恩
MX.TXT(4.14 KB)-下载120次 以上来自于百度翻译 以下为原文 Hey Guys, I am pulling out my hair after looking at this for way to long. Maybe someone has some ideas on what to try. Ok, lets get down to the sob story. I was trying to implement a serial bootloader for my dsPIC33EP128GM604 using this example as a reference: https://github.com/kcaluwae/dspic33e-bootloader I got the bootloader working and the main application would flash via serial and jump to my application code. Success! Then I changed my application source code and tried to re-flash. This is where things went downhill. The application code transferred over serial fine and the application code fired up..... but was acting weird. I did some memory compares and it was obvious that the bootloader was not erasing the first row of the application memory pages which was leading to my strange program behavior. To rule out any external influences on the erase I created a simple bare bones program that just writes data to a page and then tries to clear it. I still see the same behavior. I have attached the code below as well as a code comparison on where the first row does not seem to erase. Any thoughts would be appreciated. Thanks, Jon Attached Image(s) Attachment(s) memory.txt (3.97 KB) - downloaded 135 times main.txt (4.14 KB) - downloaded 120 times |
|
相关推荐
6个回答
|
|
将擦除与另一个Bootloader进行比较。您查看了数据表中的擦除指令吗?在擦除时请确保您在正确的页面上。http://WW.Microchip…com / En/AppNOTE/01157A.PDF
以上来自于百度翻译 以下为原文 Compare the Erase to another Bootloader. Did you looks at the erase instructions in the Data sheet? Make sure you are on the correct page when you erase. http://ww1.microchip.com/...en/AppNotes/01157a.pdf |
|
|
|
我确实看到了擦除指令以及其他几个例子。每个人似乎都有一些不同的口味,他们如何加载地址,所以我尝试了一些。所有的结果都是一样的。我相信我是在正确的页面上。我为内存地址设置变量。然后,将该变量用于页面写入(它按预期的方式写入正确的位置),然后使用相同的变量立即执行页面擦除。还有其他想法吗?
以上来自于百度翻译 以下为原文 I did look at the erase instructions as well as several other examples. Everyone seems to have a little different flavor of how they load the address so I tried a few. All with the same results. I do believe I am on the correct page. I set a variable for the memory address. I then use that variable for the page write (which gets written as expected to the correct location) and then use that same variable to do the page erase immediately following. Any other ideas? |
|
|
|
在进行擦除之前,您是否正确等待页面写入完成?
以上来自于百度翻译 以下为原文 Are you correctly waiting for the page write to complete before doing the erase? |
|
|
|
阅读数据表,看起来没有必要。但它是免费测试,所以我做到了。同样的问题。
以上来自于百度翻译 以下为原文 Reading the data sheet it looks like that is not necessary..... but it was free to test so I did. Same problem. |
|
|
|
什么版本的MPLAB?对吗?我想你是在看照片。
以上来自于百度翻译 以下为原文 What Version of Mplab? Is that correct? I assume you are reading back the PIC. |
|
|
|
MPLAB X V3.55 XC16 V1.31这是我用ICD 3和IPE V3.55进行测试的过程:在MPLAB XRASE MICROLIKE软件程序中构建软件等待几秒钟读取内存输出十六进制比较
以上来自于百度翻译 以下为原文 MPLAB X v3.55 xc16 v1.31 This is the process I am using to test with my ICD 3 and IPE v3.55:
|
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
738浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
636浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 06:17 , Processed in 1.108962 second(s), Total 54, Slave 47 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号