Pular para o conteúdo principal
Knowledgebase
Home
Renesas Brasil - Knowledgebase

How does the Flash access window work?

"Last Updated" copy

Question:

How does the Flash access window work?

Answer:

The Flash access window establishes an area within the Flash memory within which writes are allowed.

 

If you set up an access window for 0x00020000 to 0x003FFFFF, for example, and try to write outside of this area, perhaps into the interrupt vector table, the write will fail. This could happen when trying to run the debugger and the debugger would disconnect.

 

In order to reset the access window you would need to create a simple app that does a Flash Open and then an AccessWindowClear. This removes the Accesswindow from ROM.

You must link your simple app such that EVERYTHING is in 0x00020000 - 0x003FFFFF.

Alternatively, you could link your simple app to run from RAM. To do this you need to change the linker script to look something like this:
Change the linker script to link into RAM. ie.
FLASH (rx) : ORIGIN = 0x1FFE0000, LENGTH = 0x0010000
RAM (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 0x0090000

You then need to tell the debugger where the reset vector and vtable are: (paste these commands into the Debugger\Startup Tab - Run Commands window at the bottom.
set $sp = *0x1FFE0000
set $pc = *0x1FFE0004
set {int}0xe000ed08 = 0x1FFE0000

Download and run your app. If you do it correctly it should remove the Access Window. You might want to stay away from the using the AccessWindow until you are certain it's going to do what you want.
 

Suitable Products
SSP