Eli Arad

Unprotect the flash in 84789 to create a boot loader

Discussion created by Eli Arad on Aug 14, 2012

Hi All,

 

I tried again yesterday to develop the bootloader.

And again the chip damaged after many times it prompt that the chip is secure.

 

Code warrior release the lock maybe 10 times but on the 11 try the chip is dead.

 

I tried the following:

 

I added a section in the linker file:

.pFlashConfig   (RX) :  ORIGIN=0x000200,  LENGTH=0x000008  # 16 bytes reserved for IFR     

 

      .FlashConfig : {

                  WRITEH(0xFFFF);   # 0

                  WRITEH(0xFFFF); # 1

                  WRITEH(0xFFFF); # 2

                  WRITEH(0xFFFF); # 3

                  WRITEH(0xFFFF); # 4

                  WRITEH(0xFFFF); # 5

                  WRITEH(0xFFFF);   # 6, security byte

            #     WRITEH(0xFFBE);   # 6, security byte

                  WRITEH(0xFFFF); # 7

            } >.pFlashConfig

 

But id did not helped.

 

I am trying to do the following to create a boot loader:

 

Having two programs , one above the other where the bootloader is locating at address 0 and the operational program is locating at address 0x2000.

 

I managed to put the operational program at 0x2000. And the bootloader at 0.

 

The bootloader application is already works with the host via SPI and download the S record into the bootloader.

 

The bootloader now has two things left to do:

 

1)       Erase and write the S record into the flash memory (  the 0x2000 application)

2)      Reset and jump to start the program that was downloaded.

 

When I am trying to erase the flash the chip is hang because of security issue.

I need help from you is how to unlock the write protection to flash.

What are the steps , code , I need to do , add in order to successfully write to flash.

 

Thanks,

Eli

Outcomes