cancel
Showing results for 
Search instead for 
Did you mean: 

How to read STR73x Flash Protection Registers?

rgrimes
Associate II
Posted on September 10, 2015 at 16:47

Hi,

I am trying to read the Flash protection registers using something like the following:


#define FLASHPR_BASE 0x8010DFB0

#define FLASH_NVWPR ((volatile uint32_t*)(FLASHPR_BASE + 0))

#define FLASH_NVAPR0 ((volatile uint32_t*)(FLASHPR_BASE + 8))

#define FLASH_NVAPR1 ((volatile uint32_t*)(FLASHPR_BASE + 12))


uint32_t readStatusValue()

{

return *FLASH_NVAPR1; // Crashes

}

As indicated, line 8 breaks. I did read in the Flash Programming manual that the (read only) LOCK bit needs to be clear before attempting to read these registers, butI don't know how to clear that. Any ideas? Thanks!
0 REPLIES 0