cancel
Showing results for 
Search instead for 
Did you mean: 

STR731 flash progarmming problem

anilwpatil
Associate II
Posted on March 20, 2009 at 08:49

STR731 flash progarmming problem

3 REPLIES 3
anilwpatil
Associate II
Posted on March 09, 2009 at 02:22

Hi,

I am using STR731 controller for my project. I have issue with flash memory. I was trying to read/write internal flah memory of controller and suddenly download to my board stop working. Now i cannot erase the flash nor programe it. I am using ULINK 2 debugger for downlaoding. I am sure that i havent enable the flash protection but in my code i have disabled write protection for sector so that i can write to particular sectors, then i started sequence and commneted FLASH_WaitForLastTask(); function and after that my board stops working

/* Disable write protection */

/* Set the set protection bit */

FLASHR->CR0 |= 0x01000000;

/* Set the write protection register address */

FLASHR->AR = FLASH_NVWPAR_ADDRESS;

/* Data to be programmed to the protection register */

FLASHR->DR0 |= 0xF8 ;

/* Start the sequence */

FLASHR->CR0 |= 0x80000000;

//FLASH_WaitForLastTask();

Can you please tell me how i can again erase and download progaram to the STR731 CONTROLLER because it is not allowing me to reprogram it again. How I can recover the flash memory. i will appreciate your quick

Thanks

ibtissem
Associate II
Posted on March 12, 2009 at 04:20

Hi,

It seems that you have load a ''bad code''into your onchip flash. I think that the unique solution for your problem is to load/execute a simple program into your RAM memory to disable protection of Flash. After(without powering off your target board) you try to load your program in your flash.

Please keep me informed.

Best Regards,

Ibtissem.

anilwpatil
Associate II
Posted on March 20, 2009 at 08:49

Hi Ibtissem,

thanks for your response but to execute code from RAM in my case according to system boot mode, i need to first download a boot code (of 128 byte) via serial port(as mentioned in datasheet) then that boot code in turn download my application code to flash memory.

Now the problem is i dont have that 128 boot code that i download to str731 :( moreever i searched in all the forum but no success.

can you suggest any other alternative or solution to my problem

thanks

Kir