Loading ...
Sorry, an error occurred while loading the content.

57Re: [TMS470_ARM] IAP Flashkeys overwritten, "wrong Keys!"

Expand Messages
  • John M
    Mar 14, 2006
      Sorry it took so long to respond. What version of the tools are you using are they the ones with the CD from TI or from IAR web Site. Also did you modify the linker or flash macro files. Or did you use a different compiler and did you try the demo programs.
      What you did below should not have overwriten the keys.
      There are the TI falsh API routines and a application note on the tI web site.

      hyperikon <Mickey80638@...> wrote:

      I´m developing a system with the TMS470R1B1M. Many Modules are
      working without problems. A few days ago I wanted to programm the
      internal Flash from an application running in the Flash. Up to this
      point I could program the internal Flash with the IAR JTAG without
      problems. But I think I overwrote accidentally the flashkeys, and
      now I get the "Wrong Keys!" error message, when the flashloader in
      the RAM tries to program the internal Falsh memory.

      Is there a possibility to erase the complete internal flash in order
      to reset the 4 flashkeys to ones?

      In the documentation I did not find any hint. The only possibility I
      found is to erase the flash if I know the flashkeys... :)

      Please help!
      Thank you so far..

      I did something like that (explained in the F05 Flash Guide)

      /*Enable Configuration mode => enable writing to flash registers
      (set Bit4 FLCONFIG)*/

      GCR |= 0x10;

      /* select the desired bank to access (either Bank0 or Bank1)*/

        FMMAC2 = (FMMAC2 & ~0x3) + 0x1; 
      /* PROTL1DIS = 1, allow to write to FMBSEA*/

        FMMAC1 |= 0x8000;

      /* select the sector (0..7) to access (of selected BANK)*/
        FMBSEA = 0x00FF;   
        FMBSEB = 0x0000;

        /*write 4 times the flash protection keys, I supposed they are all

        FMPKEY = 0xffffffff;
        FMPKEY = 0xffffffff;
        FMPKEY = 0xffffffff;
        FMPKEY = 0xffffffff;

      /* clears the READOTP + ENPIPE bit*/

        short int *fp = (short int *) 0x80000; //pointer to Bank1 Sector0

        *fp = 0x0010; //write "Programm" command
        *fp = 0x1234; //write the desired half word (16 Bit)

        while((FMMSTAT & 0x100 )== 0x100); // while busy wait..

      Yahoo! Mail
      Use Photomail to share photos without annoying attachments.

    • Show all 4 messages in this topic