2007-04-22 05:35 AM
problem to erase sector B1F0 and B1F1. application + bootloader
2007-04-19 02:45 AM
Hi,
I am working with STR712 IAR environment. I have a bootloader at sector B0F0 I success to burn my application.The application starts at sector B0F1 . If I change the switches + reset, the application is running and it seems to work well. The problem: Data application are saved at sectors B1F0 and B1F1. Writing/erasing those sectors stuck the application. 1. I declared flash functions __ramfunc, in order to run from the RAM 2. I disable B1F0 and B1F1 protection. 3. I do not have any problem in debug/ jlink mode. 4. I do not have any problem to burn the application by the bootloader. Any idea ? Thanks Nir2007-04-19 03:27 AM
One thing comes to mind. After power-up, the very first write to flash is special: reads from BOTH banks of flash are not allowed. Consult the flash programming manual for details.
Regards, - mike2007-04-19 03:37 AM
Hi Mike,
Do you mean Debug/Readout protection ? Thanks Nir2007-04-19 04:47 AM
No. Open the 'STR7 Family Flash Programming' manual Revision 4, read paragraph 2.3.2 'Executing the first Write operation from RAM'.
2007-04-19 04:50 AM
Hello Nir,
Are you sure that the B1F0 and B1F1 are write unprotected correctly before writing/erasing them? Could you please: - send me your unprotect routine? - tell me what do you mean by ''Writing/erasing those sectors stuck the application''? Regards, Najoua.2007-04-22 02:36 AM
Hi,
I added __ramfunc decleration to the flash functions. Even so in the ''MAP'' file, flash functions are located in the RAM. As I understand flash functions should be located in the ROM and only after the first calling, they should be copied to the RAM. (__ramfunc) I did not found anything suspicious in the xcl file. Any idea what may cause it ? Thanks Nir2007-04-22 02:44 AM
Hi Najoua,
1. I use IAR function #define FLASH_B1F0 0x00010000 #define FLASH_B1F1 0x00020000 FLASH_WritePrConfig( FLASH_B1F0 | FLASH_B1F1 ,DISABLE); 2. When I declare __ramfun my application stop working, even that I disabled all the flash R/W - I suspect about the function maping - since they located in the RAM. Thanks Nir Regards Nir2007-04-22 05:35 AM
Hi,
1. Am I need to add a code at startup that will copy from code_id to code_i ? what about after remaping thr ram ? 2. Am I need to copy DATA_ID at starup ? Thanks Nir