Erase Flash

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Erase Flash

1,470件の閲覧回数
DavidoBG
Contributor II
My Program contains two sections
A first section for SW application
A second section for Bootloader.
 
So my segment definition is :
SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
    Z_RAM                    =  READ_WRITE   0x0060 TO 0x00FF;
    RAM                      =  READ_WRITE   0x0100 TO 0x025F;
    ROM                      =  READ_ONLY    0xE000 TO 0xF7AD;
    BOOTLOADER               =  READ_ONLY    0xF800 TO 0xFFBF;
    ROM1                     =  READ_ONLY    0xFFC0 TO 0xFFCD;
   
 /* INTVECTS                 =  READ_ONLY    0xFFCE TO 0xFFFF; Reserved for Interrupt Vectors */
END
 
In my bootloader program i have an erase fonction. I would like erase E000->E200. But it is not possible except if i change ROM                      =  READ_ONLY    0xE000 TO 0xF7AD;
to
ROM                      =  READ_ONLY    0xE200 TO 0xF7AD; So i can erase.
But if i change this segment, my applicaztion SW begin @ E200 instead of E000.
 
In fact, i would like erase a page containing efficient informations between E000->E200.
Do you have any idea about my issue?
 
david
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

439件の閲覧回数
DavidoBG
Contributor II
forget my first post, It OK, issue about refresh memory.
 
But  i have an another question about erase and write flash.
It is mandatory to run erase and write fonction (explain in doonstack.h) in RAM? It is possible to do a same king of function in C and in ROM execution?
 
David
0 件の賞賛
返信

439件の閲覧回数
peg
Senior Contributor IV
Hi David,

Yes it is necessary to run from RAM because while the FLASH array has the high voltage connected (for programming) the entire array is inaccessible.
If your device has more than one FLASH array then you may run from the other one.
It is usually implemented in assembler to assist in minimising the amount of RAM required.

We don't go to all this trouble just to amuse ourselves!

0 件の賞賛
返信