Hi, today I created a prototype board with a TMS320LF2402. After I finally managed to get the serial bootloader running I accidantly changed the password by loading the new hex file into the flash. I wanted to test the board with a very simple prgramm I found on a germany universities website. It was originally writen for the LF2407. Now I have to find out what words have been written to 0x40-0x43 right? This is the beginning of the hex file I used: 0040 //start address 00fa //size 0040 //start address 0000 bf08 //1st word of password? 8000 //2nd word of password? bf09 //3rd word? 8000 //4th word? be42 bf00 be47 bf80 013a b801 e388 004e 7a89 0052 7a89 00be 7a89 00b4 I tried the password as shown above but it didn't work. Password.h looks like this: PASSWD1 .set bf08h PASSWD2 .set 8000h PASSWD3 .set bf09h PASSWD4 .set 8000h I can't figure out what's wrong. It would be great if someone has a solution to this. Thanks P.S. is there some example code for the LF2402? Do I need a special include file or can I use the one for LF2407? The link to the site where I found the code is http://www.fh-zwickau.de/tutorial/dsp/ Martin
LF2402 Flash Password
Started by ●January 2, 2004
Reply by ●January 4, 20042004-01-04
Hi Martin I did the same thing with that code about a year ago. Its a pain aye, couldn't understand at the time why I could only program once. I forget exactly what I did to fix it but I was using the serial flash programing code, the plugin is probably easier. I think I had to change the password in the serial loader, password.h, and then recompile the serial loader. Then write code that writes 00000's or fffff's to the space, reprogram it to unlock it. After that it was just a matter of avoiding useing that space and restoring the serial loader. You sound like your on the right track. The 2402A is the same to code for as the 2407A apart from the different memory mapping, you will need to change your .cmd file to reflect the new layout, something like this: MEMORY { PAGE 0: /* Program Memory */ VECS: origin = 00000h, length = 00040h /* internal FLASH */ FLASH: origin = 00044h, length = 01fBBh /* 2000-45 internal FLASH */ PAGE 1: /* Data Memory */ B2: org=00060h, len=00020h /* internal DARAM */ B0: org=00200h, len=00100h /* internal DARAM */ B1: org=00300h, len=00100h /* internal DARAM */ SARAM: org=00800h, len=00200h /* internal SARAM */ } /* end of MEMORY */ etc... (you should check this, cut and paste from old file) The only other differences are the ones you will notice now that you are running from a flash only part, like only being able to have only one hardware breakpoint, slow programming, probably not be able to step code, memory initialisation problem etc Hope it goes well for you though Tony McKay