2009-03-20 12:49 AM
2009-03-08 06:22 PM
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 Thanks2009-03-11 08:20 PM
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.2009-03-20 12:49 AM
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