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

56Re: IAP Flashkeys overwritten, "wrong Keys!"

Expand Messages
  • tms470man
    Mar 14, 2006
    • 0 Attachment
      TI supplies the Flash API routines and a application note to program
      the flash in system. Do not attempt to create you own routines.

      Since this part has the memory security if you over wrote the flash
      key you would have over writen the MSM keys as well. So check you did
      not change the flash macro file or the linker to a different
      configuration. Try one of the demo programs.


      tms470man





      --- In TMS470_ARM@yahoogroups.com, "hyperikon" <Mickey80638@...>



      wrote:
      >
      > Hi,
      >
      > 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..
      > Mick
      >
      >
      >
      > 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
      > ones..*/
      >
      > FMPKEY = 0xffffffff;
      > FMPKEY = 0xffffffff;
      > FMPKEY = 0xffffffff;
      > FMPKEY = 0xffffffff;
      >
      > /* clears the READOTP + ENPIPE bit*/
      >
      > FMREGOPT &= ~(READOTP+ENPIPE);
      >
      > 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..
      >
    • Show all 4 messages in this topic