This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't change ERASEPROTECT.DISABLE value

If I write a value to ERASEPROTECT.DISABLE -- which itself works, as I'm fully able to perform the mass erase by writing the same value using the debugger -- I can't seem to write a new value to the register during the same boot. It presumably isn't flash-based, since it needs to be written each boot. Is this specifically being prevented by the core? Is there a way to "reset" the value and write a new one, assuming ERASEPROTECT.LOCK hasn't been set?

Parents
  • Hello, 

    I've found the following in modules\hal\nordic\nrfx\mdk\nrf9160.h

    /**
      * @brief CTRLAPPERI_ERASEPROTECT [ERASEPROTECT] (Unspecified)
      */
    typedef struct {
      __IOM uint32_t  LOCK;                         /*!< (@ 0x00000000) Lock register ERASEPROTECT.DISABLE from being
                                                                        written until next reset                                   */
      __IOM uint32_t  DISABLE;                      /*!< (@ 0x00000004) Disable ERASEPROTECT and perform ERASEALL                  */
    } CTRLAPPERI_ERASEPROTECT_Type;                 /*!< Size = 8 (0x8)    

    Kind regards,
    Øyvind

  • Right, but I'm not setting the LOCK bit at all, so I would expect to be able to write to DISABLE more than once. I was just trying to understand if it was able to be written to more than once, since it seems like a straightforward register.

    I suppose I haven't checked, but is LOCK automatically set if I write to DISABLE?

Reply Children
No Data
Related