AnsweredAssumed Answered

How to read STR73x Flash Protection Registers?

Question asked by grimes.robert on Sep 10, 2015
Hi,

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

01.#define FLASHPR_BASE  0x8010DFB0
02.#define FLASH_NVWPR   ((volatile uint32_t*)(FLASHPR_BASE + 0))
03.#define FLASH_NVAPR0  ((volatile uint32_t*)(FLASHPR_BASE + 8))
04.#define FLASH_NVAPR1  ((volatile uint32_t*)(FLASHPR_BASE + 12))
05. 
06.uint32_t readStatusValue()
07.{
08.  return *FLASH_NVAPR1;    // Crashes
09.}

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, but I don't know how to clear that. 

Any ideas?
Thanks!

Outcomes