Utility of protecting flash ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Utility of protecting flash ?

4,601 Views
Gizzzmo
Contributor I
I've seen the FPROT byte in the datasheet but i wonder what's his utility. Is it necessary to protect some areas of the flash ?

Thx
Labels (1)
0 Kudos
5 Replies

601 Views
rhinoceroshead
Contributor I
It's there so you can erase the Flash without erasing a bootloader (if you use one), and also so that you don't accidentally erase your program if you have buggy code that erases Flash.
0 Kudos

601 Views
rhinoceroshead
Contributor I
You can do anything except program and erase Flash in the addresses protected by the FPROT register.
 
You CAN still erase that Flash if you use the BDM.
0 Kudos

601 Views
Gizzzmo
Contributor I
This protection works if the code is executed from the flash ? from the ram ?

If i disable the protection will the interrupt vector table still be write protected ?

Thx
0 Kudos

601 Views
rhinoceroshead
Contributor I
This protection works regardless of where code is being executed from.  If you disable this protection, the interrupt vector table is NOT write protected and can be programmed using the Flash programming algorithm for that particular device.
0 Kudos

601 Views
Gizzzmo
Contributor I
To be more accurate, i want to know what can't i do in a protected area.
0 Kudos