完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我使用的是在50 MHz下运行的DSPIC33 FJ64 GS606,一个基于Microchip的引导加载程序示例的引导加载程序。该过程涉及擦除应用程序存储器空间,然后加载一行程序数据(64个指令,192个字节),并使用RTSP程序行命令将数据写入闪存。使用16位CRC在输入上验证行数据,如果正确,行被编程。编程继续,直到所有行被加载和编程。引导加载程序将使用另一个16位CRC检查应用程序区域的完整性,如果正确,则跳转到应用程序。引导加载程序偶尔会失败,并且在检查之后,我会发现通常一行,有时几行没有编程。它们仍然处于擦除状态,读取为0x00 FFFFFF。我的应用程序占用约130行。在500个程序行尝试中,失败率大约为1。我使用以下的汇编程序来擦除页和程序行函数:这部分的单元耐久性至少是10000个擦除/写入周期,并且我还没有接近超过这个值。我已经检查了这部分的勘误表,没有提到RTSP问题。这个问题在几个不同的程序集上被观察到,几乎相同的失败率。在尝试的程序行事件之后,我将添加一个检查函数来尝试捕获这个失败模式。有人看到过这种行为,或者对我有什么建议?谢谢,文斯
以上来自于百度翻译 以下为原文 I am using the dsPIC33FJ64GS606 running at 50 MHz, with a boot loader based on one of the boot loader examples from Microchip. The process involves erasing the application memory space, then loading one row of program data (64 instructions, 192 bytes) and using the RTSP Program Row command to write the data to the Flash. Row data is verified on input using a 16 bit CRC, and if correct the row is programmed. The programming continues until all rows are loaded and programmed. The boot loader will then check the integrity of the application area using another 16 bit CRC, and jump to the application if correct. The boot loader will occasionally fail, and upon examination I will find that usually one, and sometimes several, rows did not program. They will still be in the erased state, read as 0x00FFFFFF. My application program occupies about 130 rows. Failure rate is about 1 failed row in 500 Program Row attempts. I am using the following assembly routine for the Erase Page and Program Row functions: _FlashCmd: mov W0,NVMCON push SR ;save int status and disable mov 0x00e0,W0 ior SR 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 flashcmdwait: btsc NVMCON,#WR ;Wait for write end bra flashcmdwait Cell endurance for this part is a minimum of 10,000 Erase/Write cycles, and I have not come close to exceeding this value. I have checked the errata for this part, and see not mention of RTSP issues. This problem is observed on several different assemblies, at approximately the same failure rate. I will be adding a checking function after the attempted Program Row event to try to capture this failure mode. Has anyone seen this behavior, or have any suggestions for me? Thanks, Vince |
|
相关推荐
9个回答
|
|
|
除了没有恢复SR的代码(大概在下面的某个地方),它看起来还行。很容易检查闪存质量。如果你在同一部分上重复它,那么“坏”行应该编程好。这可能是一些与数据相关的问题,比如你在别处写,因为地址已经损坏。也可能是bean擦除问题-它写得好,但是它作为其他擦除的一部分被擦除。失败的行和擦除页之间是否有任何关系(例如,失败的行始终是页面中的第一个,或者总是最后一个)?也可能是(但不太可能)的问题,比如需要额外的NOP。
以上来自于百度翻译 以下为原文 Except that there's no code to restore SR (which presumably is somewhere down below), it looks ok. It is very easy to check flash quality. If you repeat it on the same part, the "bad" row should program Ok. This might be some data related problem, such as you write it elsewhere because the address is corrupt. Could also be an erase problem - it writes ok but then it gets erased as a part of other erase. Is there any relation between the failed rows and erase pages (e.g. the failed row is always the first in the page, or always the last)? Could also be (but rather unlikely) a timing issue, such as an extra nop required. |
|
|
|
|
|
诺斯盖伊-对,“流行SR”没有进入我的切割/粘贴。它在那里。我相信数据是正确写的,因为使用“行指针”来开发地址,然后它被用来获取下一行,并且正确地发生。擦除操作只发生在引导加载程序的开始,此时完成。未闪烁的行似乎是随机的,可能发生在程序空间中的任何地方。我已经在引导加载程序中进行了检查,以验证行是闪烁的,并且这似乎会捕获任何错误。我在程序序列中尝试了额外的NOP,但这没有任何效果。谢谢您的答复。我可能得交一张票,文斯
以上来自于百度翻译 以下为原文 @NorthGuy - Right, the 'pop SR' did not make it into my cut/paste. It is there. I believe the data is being written correctly because a 'row pointer' is used to develop the address, and it is subsequently used to get the next row and that happens correctly. The erase operation only occurs at the start of the boot loader, and is complete by this time. The un-flashed row seems to be random, could happen anywhere in program space. I have put a check in the boot loader to verify that the row was flashed, and this seems to catch any errors. I tried an extra nop in the program sequence, but this did not have any effect. Thanks for your reply. I may have to submit a ticket. Vince |
|
|
|
|
|
这是否发生在相同的十六进制文件中?还是在开发过程中使用“增量”的HEX文件?您检查行是否完全“空”(所有192字节)?有时我有十六进制文件是“碎片”。在这种情况下,你可以有一个以上的序列以相同的“行”为目标。对于简单的编程算法来说,它可能会在块结束时用编程字节结束(而再次擦除)。这会引发一些想法吗?
以上来自于百度翻译 以下为原文 Does this happen with the ever-same HEX-file? Or with "incremental" HEX-files during development? Did you check that the rows are completely "empty" (all 192 bytes)? I sometimes had HEX-files that were "fragmented". In such cases you could have more than a single sequence targeting the same "row". Which might - for simple programming algorithms - end up with programmed bytes at the end of the block while the beginning is erased (again). Does this trigger some thoughts? |
|
|
|
|
|
我认为用Microchip提交一张罚单是个好主意。我们通过ICSP进行了DSIC33 FJ64 GS610的大量测试,虽然没有达到50MHz,但我们没有发现任何问题。
以上来自于百度翻译 以下为原文 I think it's a good idea to file a ticket with Microchip. We made lots of tests with dsPIC33FJ64GS610 through ICSP and we haven't found any problems, although it wasn't at 50MHz. |
|
|
|
|
|
检查你的时钟设置与规范中的“编程规范”(70152h)!有一些关于重要寄存器设置的章节。你可以很容易地搜索“64 GS”(我怀疑“特征后缀”很重要)。
以上来自于百度翻译 以下为原文 Check your clock settings vs. the specifications in the "Programming Specification" (70152H)! There's some chapter about important register settings. You may easily search for "64GS" (I doubt that the "feature suffix" matters). |
|
|
|
|
|
DU000 00 01—是的,同样的十六进制文件。是的,行是完全空的,代码没有被分解。未编程的行是随机的。看来,处理器使用内部FRC进行编程,因为擦除和写入时间以FRC频率或FRC频率给出。“编程规范”似乎与ICSP有关。谢谢你的想法。文斯
以上来自于百度翻译 以下为原文 @du00000001 - Yes, same HEX file. Yes, rows are completely empty, code is not broken up. Un-programmed row is random. It appears that the processor uses the internal FRC for programming, since the erase and write times are given in terms or the FRC frequency. The "Programming Specification" seems to be related to the ICSP. Thanks for your ideas. Vince |
|
|
|
|
|
虽然它们引用了ICSP编程,但“默认值”表当然不适用于ICSP,而是用于自编程。并且更确切地说,时钟设置将导致1、8 MHz周围的一些时钟或MIPS。
以上来自于百度翻译 以下为原文 Though they refer to ICSP programming, the "default value" tables certainly do NOT serve for ICSP but for self-programming. And rather sure that the clock settings will result in some clock or MIPS around the 1,8 Mhz. |
|
|
|
|
|
如果CRC不正确会发生什么?是否再次要求该行,或者跳过该行并继续下一行?
以上来自于百度翻译 以下为原文 What happens if the CRC is not correct? Does it ask for the row again, or just skip that row and carry on with the next one? |
|
|
|
|
|
我重新阅读编程规范,除了配置位设置以外,我看不到任何时钟参数的引用。FRM部分5。Flash编程仅在内部FRC方面讨论写入/擦除时间。我无法控制那个时钟,除了我不使用的调谐器位。@ QHB,如果行CRC不正确,引导加载器将再次请求行数据。NVMCON寄存器中有一个“写入序列错误平面位”。我想知道这个位是否表明写行序列没有发生。
以上来自于百度翻译 以下为原文 @du00000001 - I re-read the Programming Specification, and I don't see any reference to clock parameters other than the configuration bit settings. The FRM Section 5. Flash Programming discusses the write / erase times in terms of the internal FRC only. I have no control over that clock, other than the tuning bits, which I am not using. @qhb - The boot loader will ask for the row data again if the row CRC was incorrect. There is a 'Write Sequence Error Flat bit' in the NVMCON register. I am wondering if that bit may indicate that the write row sequence did not happen. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1122浏览 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 00:17 , Processed in 0.913351 second(s), Total 88, Slave 71 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1119