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

Forum Post: RE: Recovering erased BSL

$
0
0
Thank you for your reply. What I am trying to do is I am building a custom BSL firmware update UI that can have bunch of options and one of the options is to enable/disable JTAG for security purpose. To test this feature, I was compiling and running the JTAG enable and disable code in CSS and used FET debugger for disable test and then used USB with BSL firmware update UI(I used TI BSL UI) to flash new code with JTAG enable function. I used the following code for enabling and disabling. I wasn't writing to the main BSL memory location(0x1000 to 0x17FB). I was writing to the JTAG fuse memory location (0x17FC to 0x17FF). char A; A=85; //0x55->for disable 0x00--> for enable Flash_WDptrA = (char*)0x17FC; SYSBSLC = 0; // enable and unlock BSL segment 3 while(FCTL3&BUSY); // Check BUSY flag FCTL1 = FWKEY + WRT; // Set WRT bit for write operation FCTL3 = FWKEY; // Clear Lock bit for (i=0; i<4; i++){ while(FCTL3&BUSY); // Check BUSY flag *Flash_WDptrA++ = A; //printf("%d: 0x%02X\n", i,A); } while(FCTL3&BUSY); // Check BUSY flag FCTL1 = FWKEY; // Clear WRT bit FCTL3 = FWKEY + LOCK; // Set LOCK bit It worked the first time. Second time it didn't work. I was trying to disable the JTAG again, but I wasn't able to do it. The mem readback from 0x17FC-0x17FF remained constant and never changed no matter how many times I write to it (I even power cycle the board). I tired with FET debugger and CSS and even with USB using BSL firmware update UI. So I follow some suggestion on the TI's fourm to enable the read/write access to BSL under project properties (as I have posted the screenshot on my other post: e2e.ti.com/.../1899068 After this seetings I was able to disable the JTAG (I used FET debugger to program it). Now to enable it again I used USB firmware update UI and it stopped responding. This time I wasn't able to get into BSL using the USB and the switch on the board. I am getting a new chip and this time I want to make sure that I don't blew up this one too :) So I wanted to know how can I safely enable and disable the JTAG without touching the BSL (which I thought what the above code is already doing, but I guess somehow BSL code got corrupted). I wanted to know what might have cause this issue. If it's BSL mem data then how it got erased? I need to know these things so that it wont happen next time. Sorry I have written lot of things above. I hope this time I was able to explain it better. Please let me know if you want to know somethingelse. One more question: Does TI have some examle source code on JTAG enable/disable feature? Thanks, Deepak

Viewing all articles
Browse latest Browse all 62309

Trending Articles



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