目前我正在做一个tm4c1294单片机远程升级的功能,功能上已经能正常升级了,但是使用测试连续升级几十次升级总是会出现死机情况,断电重启后又能正常工作,请问有可能是什么原因导致的,同时我参考usb_stick_update的范例程序,里面的烧录flash是将最初的8字节数据留到最后再写入,请问这么做有什么特别的用处吗?因为我是直接从头写入
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
目前我正在做一个tm4c1294单片机远程升级的功能,功能上已经能正常升级了,但是使用测试连续升级几十次升级总是会出现死机情况,断电重启后又能正常工作,请问有可能是什么原因导致的,同时我参考usb_stick_update的范例程序,里面的烧录flash是将最初的8字节数据留到最后再写入,请问这么做有什么特别的用处吗?因为我是直接从头写入
在程序中有说明
// In order to prevent a partially programmed imaged (due to some // error occurring while programming), the first two locations are // not programmed until all of the rest of the image has been // successfully loaded into the flash. This way if there is some error, // the updater will detect that a user application is not present and // will not attempt to run it. // // For the first block, do not program the first two word locations // (8 bytes). These two words will be programmed later, after // everything else.
主要是因为若是前8 bytes不写的话,期间如果出现一些错误,更新程序将检测到用户应用程序不存在,并且不会尝试运行它。