/* Function for writing one word to flash. Unprotected write, which can interfere with radio communication. 
This function DOES NOT use the m_radio_active variable, but will force the write even when the radio is active. To be used only from ble_flash_page_write. */
static void flash_word_unprotected_write(uint32_t *p_address, uint32_t value)
/* Function for writing one word to flash. Unprotected write, which can interfere with radio communication. 
This function DOES NOT use the m_radio_active variable, but will force the write even when the radio is active. To be used only from ble_flash_page_write. */
static void flash_word_unprotected_write(uint32_t *p_address, uint32_t value)
{
    NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos);
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
    {
    }
    *p_address = value;
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
    {
    }
    NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos);
    while (NRF_NVMC->READY == NVMC_READY_READY_Busy)
    {
    }
}