Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Recovering erased BSL

$
0
0
Your code to change the JTAG Fuse bytes has one limitation that you were not aware of and that started your problems. That code is capable or changing the JTAG Fuse bytes from 0xFFFFFFFF into anything else (including 0x55555555). It is also capable or changing the JTAG Fuse bytes from 0xx55555555 into 0x00000000. But it cannot change from 0x00000000 into anything else. This is a fundamental property of Flash memory and is fully explained in the User's Guide. But the real damage is actually caused by trying other things after you found you cannot change the 0x00000000. I am not familiar with CCS and other fancy tools. Whenever I tried to use them, I end up like Charlie Chaplin in Modern Times. I only understand how the hardware works. This is what I would do: (A) While both JTAG and BSL are still working, I would write a small program to unlock the BSL protection and dump the contends of location 0x1600 to 0x17FB. I would lock up the protection after that and try to convert the dump into source code of a constant array of 508 bytes (or 254 words, or 127 double-words). (B) I would then write the program to be loaded by BSL in order to enable the JTAG. Inside this program, I would include a constant array that was obtained in (A) above. This program essentially unlocks the BSL protection, erase the Section at location 0x1600 to 0x17FF, and copies the constant array to locations 0x1600 to 0x17FB. This leaves the BSL code unchanged (because it was erased and copied back) but the JTAG Fuse erased and not altered by the copying. But it is not that simple, it should take extra steps so that even if the system crashed (e.g., due to power glitch) in the middle of it, it can still recover from with no harm done. I would do the above with the most primitive tools that I know how to use rather then use fancy tool which I have no idea what it does. (I prefer to use my bare hand if I could get away with that.) You can use whatever you are comfortable to use to achieve the same objective. If it is in simple and straight c, I may be able to read it and help. But if it involves "Drivers", "Wares", and other canned stuff, I am out.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>