If I write to the MWU REGIONENCLR register and immediately access memory that was previously watch enabled an event is still generated. If I delay a small amount (tested with 1us) before accessing the memory then the event is not generated. The datasheet does not seem to indicate a delay is required. How much delay is required?
This can be reproduced after enabling a softdevice by running the following code:
NRF_MWU->REGIONENCLR = ((MWU_REGIONENCLR_RGN0WA_Clear << MWU_REGIONENCLR_RGN0WA_Pos) | (MWU_REGIONENCLR_PRGN0WA_Clear << MWU_REGIONENCLR_PRGN0WA_Pos NRF_NVMC->CONFIG=1;