/**
 * @file sdr_app_ipc.c
 *
 * @brief This file has the functions related to IPC message encode/decode
 *        for IPCs to communicate with TC-TM manager, OBC and other SW layers
 *
 * @copyright Copyright 2023 Antaris, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
/*********************************************************************/
#include "sdr_app_ipc.h"
#include "exo_common.h"
#include "logger.h"
#include "sdr_app_main.h"
#include "exo_tctm_ipc.h"
#include "nvm.h"

/** Radio ID for SDR application */
extern uint8_t PLACE_IN_EXT_RAM_MEM sdr_app_radio_id ;
/** Telecommand sequence number for SDR application */  
extern uint16_t PLACE_IN_EXT_RAM_MEM sdr_app_tc_seq_no ;
/** Number of SDRs */
extern uint8_t PLACE_IN_EXT_RAM_MEM num_sdr;
/** SDR configuration array */
extern s_sdr_cfg PLACE_IN_EXT_RAM_MEM sdr_app_cfg[MAX_SDR_CFG];
/** SDR timer configurations array */
extern s_sdr_tmr_cfg PLACE_IN_EXT_RAM_MEM sdr_tmr[MAX_SDR_CFG];
/** SDR RSSI configurations array */  
extern s_sdr_rssi_cfg PLACE_IN_EXT_RAM_MEM sdr_rssi_cfg[MAX_SDR_CFG];
/** SDR telemetry configurations array */
extern s_sdr_tm_cfg PLACE_IN_EXT_RAM_MEM sdr_tm_cfg[MAX_SDR_CFG];
/** SDR sensor configurations array */
extern s_sdr_sens_cfg PLACE_IN_EXT_RAM_MEM sdr_sens_cfg[MAX_SDR_CFG];

/** Maximum number of radio NVM configurations */  
#define MAX_NUM_RADIO_NVM 4
/** SDR NVM configuration array */
s_sdr_nvm_cfg PLACE_IN_EXT_RAM_MEM sdr_nvm_param[MAX_NUM_RADIO_NVM];

/**
 * @brief Abstracted API for COMMS layer that sends message payload
 *   to destination thread using os IPC functionalities
 * @brief Send IPC message from SDR application 
 *
 * This function sends an IPC message with the given ID to the specified destination task.
 *
 * @param msg_id IPC message ID
 * @param dest Destination task ID
 */
void sdr_app_send_ipc(uint16_t msg_id, uint16_t dest)
{
    os_itc_msg_handle_t sdr_app_ipc;
    sdr_app_ipc.Msg_id = msg_id;
    sdr_app_ipc.src_entity = SDR_APP;

    sdr_app_ipc.pld.pld_ptr = NULL;

    os_itc_msg_send(&sdr_app_ipc, dest, os_send_itc_wait);
}

/**
 * @brief This API for sdr_app layer that sends message payload
 * to destination thread using os IPC functionalities
 * @brief Send IPC message with payload from SDR application
 * 
 * This function sends an IPC message with the given ID and payload to the 
 * specified destination task.

Building obj/src/pcal6408a_gpio_expander.o
Building obj/src/mcp23008_gpio_expander.o
Building obj/src/pca9673_gpio_expander.o
Building obj/src/eps_gpio_exp.o
Building obj/src/eps_simu.o
Building obj/src/eps.o
Building obj/src/eps_pgood.o
 *
 * @param msg_id IPC message ID 
 * @param dest Destination task ID
 * @param pld_size Size of payload in bytes
 * @param pld_ptr Pointer to payload data
 */
void sdr_app_send_ipc_pld(uint16_t msg_id, uint16_t dest, uint16_t pld_size, uint8_t *pld_ptr)
{
    os_itc_msg_handle_t sdr_app_ipc;
    sdr_app_ipc.Msg_id = msg_id;
    sdr_app_ipc.src_entity = SDR_APP;
    sdr_app_ipc.Msg_len = pld_size;
    sdr_app_ipc.pld.pld_ptr = (uint8_t *)os_malloc(pld_size);

    os_memcpy(sdr_app_ipc.pld.pld_ptr,pld_ptr, pld_size);

    os_itc_msg_send(&sdr_app_ipc, dest, os_send_itc_wait);
}


/**
 * @brief This API for sdr_app layer that sends message payload
 * to destination thread using os IPC functionalities
 * @brief Send IPC message with custom TX payload from SDR application
 *
 * This function sends an IPC message with the given radio ID and payload
 * to the specified destination task for custom transmission.
 * 
 * @param radio_id Radio ID
 * @param dest Destination task ID  
 * @param pld_size Size of payload in bytes
 * @param pld_ptr Pointer to payload data
 */
void sdr_app_send_ipc_pld_custom_tx(uint16_t radio_id, uint16_t dest, uint16_t pld_size, uint8_t *pld_ptr)
{
    os_itc_msg_handle_t sdr_app_ipc;
    sdr_app_ipc.pld_info = radio_id;
    sdr_app_ipc.src_entity = SDR_APP;
    sdr_app_ipc.Msg_len = pld_size;
    sdr_app_ipc.pld.pld_ptr = (uint8_t *)os_malloc(pld_size);

    os_memcpy(sdr_app_ipc.pld.pld_ptr,pld_ptr, pld_size);

    os_itc_msg_send(&sdr_app_ipc, dest, os_wait_forever);
}
/**
 * @brief This function handles the sdr_app telecommand, telemetry set response
 * @brief Handle telemetry set response
 *
 * This function handles a telemetry set response IPC message,
 * sending an ack/nack based on the status.
 *
 * @param msg_id IPC message ID
 * @param status Status of set operation
 */
void sdr_app_tc_tm_set_rsp_hdlr(uint16_t msg_id, int32_t status)
{
    uint8_t *pld = NULL;

    os_itc_msg_handle_t sdr_app_ipc;             ///< COMMS state transmit message

    //Init IPC
    sdr_app_ipc.src_entity= SDR_APP;

    sdr_app_ipc.pld.pld_ptr = (uint8_t *)os_malloc(5);

    pld = sdr_app_ipc.pld.pld_ptr;

    //Extract the sequence number
    os_memcpy(pld, &sdr_app_tc_seq_no, sizeof(uint16_t));
    os_memcpy(&pld[TM_RADIO_MOD_IDX], &sdr_app_radio_id, sizeof(uint8_t));

    /*
     * Append the TM_CTRL data. 0x70 represents enable
     * encryption, authentication and message type as
     * response. Refer TC/TM manager document for more
     * information
     */
    pld[TM_CTRL_DATA_IDX] = TM_DEFAULT_CTRL_DATA;
    pld[TM_PLD_IDX] = status;

    sdr_app_ipc.Msg_id = msg_id;
    sdr_app_ipc.Msg_len = 1;

    DEBUG_CPRINT(("[sdr_app] TM response sent"));
    log_id(LOG_INFO_L1,LOG_COMMS,__SBAND__TM_RESPONSE_SENT);

    status = os_itc_msg_send(&sdr_app_ipc,TM_STORAGE,os_send_itc_wait);
}

/**
 * @brief This function handles the sdr_app telecommand, telemetry get response
 *
 * @brief Handle telemetry get response  
 *
 * This function handles a telemetry get response IPC message,
 * sending the requested telemetry data.
 *
 * @param msg_id IPC message ID
 * @param status Status of get operation
 * @param size Size of telemetry data in bytes 
 * @param tm_pld Pointer to telemetry data
 */
void sdr_app_tc_tm_get_rsp_hdlr(uint16_t msg_id,int32_t status, uint16_t size, uint8_t *tm_pld)
{
    uint8_t *pld = NULL;

    os_itc_msg_handle_t sdr_app_ipc;             ///< COMMS state transmit message

    //Init IPC
    sdr_app_ipc.src_entity= SDR_APP;

    sdr_app_ipc.pld.pld_ptr = (uint8_t *)os_malloc(size + 5);

    pld = sdr_app_ipc.pld.pld_ptr;

    //Extract the sequence number
    os_memcpy(pld, &sdr_app_tc_seq_no, sizeof(uint16_t));
    os_memcpy(&pld[TM_RADIO_MOD_IDX], &sdr_app_radio_id, sizeof(uint8_t));

    /*
     * Append the TM_CTRL data. 0x70 represents enable
     * encryption, authentication and message type as
     * response. Refer TC/TM manager document for more
     * information
     */
    pld[TM_CTRL_DATA_IDX] = TM_DEFAULT_CTRL_DATA;
    sdr_app_ipc.Msg_id = msg_id;
    sdr_app_ipc.Msg_len = size;

    os_memcpy(&pld[TM_PLD_IDX],tm_pld, size);

    DEBUG_CPRINT(("[sdr_app] TM pld response sent"));
    log_id(LOG_INFO_L1,LOG_COMMS,__sdr_app__TM_PLD_RESPONSE_SENT);

    status = os_itc_msg_send(&sdr_app_ipc, TM_STORAGE, os_send_itc_wait);
}

/**
 * @brief Write SDR configuration to NVM
 * 
 * This function writes the full SDR configuration from RAM
 * to non-volatile memory.
 */
void comms_sdr_cfg_nvm_write(void)
{
    sdr_nvm_param[1].sdr_sts = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_sts;
    sdr_nvm_param[1].sdr_dplx_typ = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_dplx_typ;
    sdr_nvm_param[1].sdr_num_rx = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_num_rx;
    sdr_nvm_param[1].sdr_num_tx = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_num_tx;
    sdr_nvm_param[1].comb_rx_support = sdr_app_cfg[sdr_nvm_param[1].radio_id].comb_rx_support;
    sdr_nvm_param[1].comb_tx_support = sdr_app_cfg[sdr_nvm_param[1].radio_id].comb_tx_support;
    sdr_nvm_param[1].min_freq = sdr_app_cfg[sdr_nvm_param[1].radio_id].min_freq;
    sdr_nvm_param[1].max_freq = sdr_app_cfg[sdr_nvm_param[1].radio_id].max_freq;
    sdr_nvm_param[1].beacon_normal_enb_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].beacon_enb_tmr;
    sdr_nvm_param[1].beacon_normal_prd_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].beacon_prd_tmr;
    sdr_nvm_param[1].beacon_normal_rep_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].beacon_rep_tmr;
    sdr_nvm_param[1].sdr_normal_tm_tx_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tm_tx_tmr;
    sdr_nvm_param[1].sdr_normal_tx_on_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tx_on_tmr;
    sdr_nvm_param[1].sdr_normal_rx_on_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_rx_on_tmr;
    sdr_nvm_param[1].tx_data_rep_cnt = sdr_tmr[sdr_nvm_param[1].radio_id].tx_data_rep_cnt;
    sdr_nvm_param[1].sdr_tm_read_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tm_read_tmr;
    sdr_nvm_param[1].short_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[1].radio_id].short_rx_on_tmr;
    sdr_nvm_param[1].long_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[1].radio_id].long_rx_on_tmr;
    sdr_nvm_param[1].tm_auto_read_sts = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_auto_read_sts;
    sdr_nvm_param[1].tm_read_depth = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_read_depth;
    sdr_nvm_param[1].tm_short_store_dur = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_short_store_dur;
    sdr_nvm_param[1].tm_long_store_dur = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_long_store_dur;

    sdr_nvm_param[2].sdr_sts = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_sts;
    sdr_nvm_param[2].sdr_dplx_typ = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_dplx_typ;
    sdr_nvm_param[2].sdr_num_rx = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_num_rx;
    sdr_nvm_param[2].sdr_num_tx = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_num_tx;
    sdr_nvm_param[2].comb_rx_support = sdr_app_cfg[sdr_nvm_param[2].radio_id].comb_rx_support;
    sdr_nvm_param[2].comb_tx_support = sdr_app_cfg[sdr_nvm_param[2].radio_id].comb_tx_support;
    sdr_nvm_param[2].min_freq = sdr_app_cfg[sdr_nvm_param[2].radio_id].min_freq;
    sdr_nvm_param[2].max_freq = sdr_app_cfg[sdr_nvm_param[2].radio_id].max_freq;
    sdr_nvm_param[2].min_freq_rx = sdr_app_cfg[sdr_nvm_param[2].radio_id].min_freq_rx;
    sdr_nvm_param[2].max_freq_rx = sdr_app_cfg[sdr_nvm_param[2].radio_id].max_freq_rx;
    sdr_nvm_param[2].beacon_normal_enb_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].beacon_enb_tmr;
    sdr_nvm_param[2].beacon_normal_prd_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].beacon_prd_tmr;
    sdr_nvm_param[2].beacon_normal_rep_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].beacon_rep_tmr;
    sdr_nvm_param[2].sdr_normal_tm_tx_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tm_tx_tmr;
    sdr_nvm_param[2].sdr_normal_tx_on_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tx_on_tmr;
    sdr_nvm_param[2].sdr_normal_rx_on_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_rx_on_tmr;
    sdr_nvm_param[2].tx_data_rep_cnt = sdr_tmr[sdr_nvm_param[2].radio_id].tx_data_rep_cnt;
    sdr_nvm_param[2].sdr_tm_read_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tm_read_tmr;
    sdr_nvm_param[2].valid_rssi_cnt = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].valid_rssi_cnt;
    sdr_nvm_param[2].inv_rssi_cnt = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].inv_rssi_cnt;
    sdr_nvm_param[2].rssi_min = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_min;
    sdr_nvm_param[2].rssi_typ = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_typ;
    sdr_nvm_param[2].rssi_prd_tmr = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_prd_tmr;
    sdr_nvm_param[2].short_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].short_rx_on_tmr;
    sdr_nvm_param[2].long_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].long_rx_on_tmr;
    sdr_nvm_param[2].tm_auto_read_sts = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_auto_read_sts;
    sdr_nvm_param[2].tm_read_depth = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_read_depth;
    sdr_nvm_param[2].tm_short_store_dur = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_short_store_dur;
    sdr_nvm_param[2].tm_long_store_dur = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_long_store_dur;

    sdr_nvm_param[2].temp_sens_typ_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_typ_thrs;
    sdr_nvm_param[2].temp_sens_min_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_min_thrs;
    sdr_nvm_param[2].temp_sens_max_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_max_thrs;
    sdr_nvm_param[2].temp_sens_typ_thrs[1] = sdr_sens_cfg[sdr_nvm_param[1].radio_id].temp_sensor[1].temp_sens_typ_thrs;
    sdr_nvm_param[2].temp_sens_min_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_min_thrs;
    sdr_nvm_param[2].temp_sens_max_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_max_thrs;
    sdr_nvm_param[2].temp_sens_typ_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_typ_thrs;
    sdr_nvm_param[2].temp_sens_min_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_min_thrs;
    sdr_nvm_param[2].temp_sens_max_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_max_thrs;

    sdr_nvm_param[2].volt_sens_typ_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[3] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[3] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[3] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[4] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[4] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[4] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[5] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[5] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[5] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_max_thrs;

    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_SDR,(uint8_t*)&num_sdr);
    nvm_parameter_write(NVM_DATA,SDR_CFG_RADIO_ID_2,(uint8_t*)&sdr_nvm_param[1].radio_id);
    nvm_parameter_write(NVM_DATA,SDR_CFG_STS_2,(uint8_t*)&sdr_nvm_param[1].sdr_sts);
    nvm_parameter_write(NVM_DATA,SDR_CFG_DUPLEX_TYPE_2,(uint8_t*)&sdr_nvm_param[1].sdr_dplx_typ);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_RX_2,(uint8_t*)&sdr_nvm_param[1].sdr_num_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_TX_2,(uint8_t*)&sdr_nvm_param[1].sdr_num_tx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_RX_SUPPORT_2,(uint8_t*)&sdr_nvm_param[1].comb_rx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_TX_SUPPORT_2,(uint8_t*)&sdr_nvm_param[1].comb_tx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_2,(uint8_t*)&sdr_nvm_param[1].min_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_2,(uint8_t*)&sdr_nvm_param[1].max_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_RX_2,(uint8_t*)&sdr_nvm_param[1].min_freq_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_RX_2,(uint8_t*)&sdr_nvm_param[1].max_freq_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_RESERVED_2,(uint8_t*)&sdr_nvm_param[1].rsvd);


sdr_nvm_param[1].beacon_normal_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_enb_tmr,MIN_BEACON_NORMAL_ENB_TMR,MAX_BEACON_NORMAL_ENB_TMR,DEFAULT_BEACON_NORMAL_ENB_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_ENB_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_enb_tmr);
        

sdr_nvm_param[1].beacon_normal_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_prd_tmr,MIN_BEACON_NORMAL_PRD_TMR,MAX_BEACON_NORMAL_PRD_TMR,DEFAULT_BEACON_NORMAL_PRD_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_prd_tmr);

sdr_nvm_param[1].beacon_normal_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_rep_tmr,MIN_BEACON_NORMAL_REP_TMR,MAX_BEACON_NORMAL_REP_TMR,DEFAULT_BEACON_NORMAL_REP_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_REP_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_rep_tmr);


sdr_nvm_param[1].beacon_safe_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_safe_enb_tmr,MIN_BEACON_SAFE_ENB_TMR,MAX_BEACON_SAFE_ENB_TMR,DEFAULT_BEACON_SAFE_ENB_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_SAFE_ENB_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_safe_enb_tmr);


sdr_nvm_param[1].beacon_safe_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_safe_prd_tmr,MIN_BEACON_SAFE_PRD_TMR,MAX_BEACON_SAFE_PRD_TMR,DEFAULT_BEACON_SAFE_PRD_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_SAFE_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_safe_prd_tmr);

sdr_nvm_param[1].beacon_safe_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_safe_rep_tmr,MIN_BEACON_SAFE_REP_TMR,MAX_BEACON_SAFE_REP_TMR,DEFAULT_BEACON_SAFE_REP_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_SAFE_REP_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_safe_rep_tmr);

sdr_nvm_param[1].sdr_normal_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_tm_tx_tmr,MIN_SDR_NORMAL_TM_TX_TMR,MAX_SDR_NORMAL_TM_TX_TMR,DEFAULT_SDR_NORMAL_TM_TX_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TM_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_tm_tx_tmr);


sdr_nvm_param[1].sdr_normal_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_tx_on_tmr,MIN_SDR_NORMAL_TX_ON_TMR,MAX_SDR_NORMAL_TX_ON_TMR,DEFAULT_SDR_NORMAL_TX_ON_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_tx_on_tmr);

sdr_nvm_param[1].sdr_normal_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_rx_on_tmr,MIN_SDR_NORMAL_RX_ON_TMR,MAX_SDR_NORMAL_RX_ON_TMR,DEFAULT_SDR_NORMAL_RX_ON_TMR_2); 
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_rx_on_tmr);



sdr_nvm_param[1].sdr_safe_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tm_tx_tmr,MIN_SDR_SAFE_TM_TX_TMR,MAX_SDR_SAFE_TM_TX_TMR,DEFAULT_SDR_SAFE_TM_TX_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TM_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_tm_tx_tmr);


sdr_nvm_param[1].sdr_safe_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tx_on_tmr,MIN_SDR_SAFE_TX_ON_TMR,MAX_SDR_SAFE_TX_ON_TMR,DEFAULT_SDR_SAFE_TX_ON_TMR_2);   
nvm_parameter_write(NVM_DATA,SDR_SAFE_TX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_tx_on_tmr);


sdr_nvm_param[1].sdr_safe_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_rx_on_tmr,MIN_SDR_SAFE_RX_ON_TMR,MAX_SDR_SAFE_RX_ON_TMR,DEFAULT_SDR_SAFE_RX_ON_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_rx_on_tmr);


sdr_nvm_param[1].tx_data_rep_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tx_data_rep_cnt,MIN_TX_DATA_REP_CNT,MAX_TX_DATA_REP_CNT,DEFAULT_TX_DATA_REP_CNT_2);    
    nvm_parameter_write(NVM_DATA,SDR_TX_DATA_REP_CNT_2,(uint8_t*)&sdr_nvm_param[1].tx_data_rep_cnt);


sdr_nvm_param[1].sdr_tm_read_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_tm_read_tmr,MIN_SDR_TM_READ_TMR,MAX_SDR_TM_READ_TMR,DEFAULT_SDR_TM_READ_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_READ_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_tm_read_tmr);
    nvm_parameter_write(NVM_DATA,SDR_VALID_RSSI_CNT_2,(uint8_t*)&sdr_nvm_param[1].valid_rssi_cnt);
    nvm_parameter_write(NVM_DATA,SDR_INV_RSSI_CNT_2,(uint8_t*)&sdr_nvm_param[1].inv_rssi_cnt);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_MIN_2,(uint8_t*)&sdr_nvm_param[1].rssi_min);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_TYPE_2,(uint8_t*)&sdr_nvm_param[1].rssi_typ);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].rssi_prd_tmr);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_SHORT_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].short_rx_on_tmr);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_LONG_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].long_rx_on_tmr);
    nvm_parameter_write(NVM_DATA,SDR_TM_AUTO_READ_STS_2,(uint8_t*)&sdr_nvm_param[1].tm_auto_read_sts);


 
sdr_nvm_param[1].tm_read_depth=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_read_depth,MIN_TM_READ_DEPTH,MAX_TM_READ_DEPTH,DEFAULT_TM_READ_DEPTH);
nvm_parameter_write(NVM_DATA,SDR_TM_PERIODICITY_2,(uint8_t*)&sdr_nvm_param[1].tm_read_depth);

 sdr_nvm_param[1].tm_short_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_short_store_dur,MIN_TM_SHORT_STORE_DUR,MAX_TM_SHORT_STORE_DUR,DEFAULT_TM_SHORT_STORE_DUR);
    nvm_parameter_write(NVM_DATA,SDR_TM_SHORT_STORAGE_DURATION_2,(uint8_t*)&sdr_nvm_param[1].tm_short_store_dur);


sdr_nvm_param[1].tm_long_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_long_store_dur,MIN_TM_LONG_STORE_DUR,MAX_TM_LONG_STORE_DUR,DEFAULT_TM_LONG_STORE_DUR);
    nvm_parameter_write(NVM_DATA,SDR_TM_LONG_STORAGE_DURATION_2,(uint8_t*)&sdr_nvm_param[1].tm_long_store_dur);

    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[5]);

    nvm_parameter_write(NVM_DATA,SDR_CFG_RADIO_ID_3,(uint8_t*)&sdr_nvm_param[2].radio_id);
    nvm_parameter_write(NVM_DATA,SDR_CFG_STS_3,(uint8_t*)&sdr_nvm_param[2].sdr_sts);
    nvm_parameter_write(NVM_DATA,SDR_CFG_DUPLEX_TYPE_3,(uint8_t*)&sdr_nvm_param[2].sdr_dplx_typ);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_RX_3,(uint8_t*)&sdr_nvm_param[2].sdr_num_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_TX_3,(uint8_t*)&sdr_nvm_param[2].sdr_num_tx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_RX_SUPPORT_3,(uint8_t*)&sdr_nvm_param[2].comb_rx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_TX_SUPPORT_3,(uint8_t*)&sdr_nvm_param[2].comb_tx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_3,(uint8_t*)&sdr_nvm_param[2].min_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_3,(uint8_t*)&sdr_nvm_param[2].max_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_RX_3,(uint8_t*)&sdr_nvm_param[2].min_freq_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_RX_3,(uint8_t*)&sdr_nvm_param[2].max_freq_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_RESERVED_3,(uint8_t*)&sdr_nvm_param[2].rsvd);



sdr_nvm_param[2].beacon_normal_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_enb_tmr,MIN_BEACON_NORMAL_ENB_TMR,MAX_BEACON_NORMAL_ENB_TMR,DEFAULT_BEACON_NORMAL_ENB_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_ENB_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_enb_tmr);


sdr_nvm_param[2].beacon_normal_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_prd_tmr,MIN_BEACON_NORMAL_PRD_TMR,MAX_BEACON_NORMAL_PRD_TMR,DEFAULT_BEACON_NORMAL_PRD_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_prd_tmr);
    

sdr_nvm_param[2].beacon_normal_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_rep_tmr,MIN_BEACON_NORMAL_REP_TMR,MAX_BEACON_NORMAL_REP_TMR,DEFAULT_BEACON_NORMAL_REP_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_REP_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_rep_tmr);
 
sdr_nvm_param[2].beacon_safe_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_safe_enb_tmr,MIN_BEACON_SAFE_ENB_TMR,MAX_BEACON_SAFE_ENB_TMR,DEFAULT_BEACON_SAFE_ENB_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_SAFE_ENB_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_safe_enb_tmr);
  

  sdr_nvm_param[2].beacon_safe_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_safe_prd_tmr,MIN_BEACON_SAFE_PRD_TMR,MAX_BEACON_SAFE_PRD_TMR,DEFAULT_BEACON_SAFE_PRD_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_SAFE_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_safe_prd_tmr);
   

 sdr_nvm_param[2].beacon_safe_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_safe_rep_tmr,MIN_BEACON_SAFE_REP_TMR,MAX_BEACON_SAFE_REP_TMR,DEFAULT_BEACON_SAFE_REP_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_SAFE_REP_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_safe_rep_tmr);
 

sdr_nvm_param[2].sdr_normal_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_tm_tx_tmr,MIN_SDR_NORMAL_TM_TX_TMR,MAX_SDR_NORMAL_TM_TX_TMR,DEFAULT_SDR_NORMAL_TM_TX_TMR_3);   
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TM_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_tm_tx_tmr);
    

sdr_nvm_param[2].sdr_normal_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_tx_on_tmr,MIN_SDR_NORMAL_TX_ON_TMR,MAX_SDR_NORMAL_TX_ON_TMR,DEFAULT_SDR_NORMAL_TX_ON_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_tx_on_tmr);

sdr_nvm_param[2].sdr_normal_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_rx_on_tmr,MIN_SDR_NORMAL_RX_ON_TMR,MAX_SDR_NORMAL_RX_ON_TMR,DEFAULT_SDR_NORMAL_RX_ON_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_rx_on_tmr);

 sdr_nvm_param[2].sdr_safe_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_tm_tx_tmr,MIN_SDR_SAFE_TM_TX_TMR,MAX_SDR_SAFE_TM_TX_TMR,DEFAULT_SDR_SAFE_TM_TX_TMR_3); 
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TM_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_tm_tx_tmr);
    
sdr_nvm_param[2].sdr_safe_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_tx_on_tmr,MIN_SDR_SAFE_TX_ON_TMR,MAX_SDR_SAFE_TX_ON_TMR,DEFAULT_SDR_SAFE_TX_ON_TMR_3);    
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_tx_on_tmr);
    
  
sdr_nvm_param[2].sdr_safe_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_rx_on_tmr,MIN_SDR_SAFE_RX_ON_TMR,MAX_SDR_SAFE_RX_ON_TMR,DEFAULT_SDR_SAFE_RX_ON_TMR_3);  
    nvm_parameter_write(NVM_DATA,SDR_SAFE_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_rx_on_tmr);
    
 sdr_nvm_param[2].tx_data_rep_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tx_data_rep_cnt,MIN_TX_DATA_REP_CNT,MAX_TX_DATA_REP_CNT,DEFAULT_TX_DATA_REP_CNT_3);
    nvm_parameter_write(NVM_DATA,SDR_TX_DATA_REP_CNT_3,(uint8_t*)&sdr_nvm_param[2].tx_data_rep_cnt);
    
sdr_nvm_param[2].sdr_tm_read_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_tm_read_tmr,MIN_SDR_TM_READ_TMR,MAX_SDR_TM_READ_TMR,DEFAULT_SDR_TM_READ_TMR_3);    
    nvm_parameter_write(NVM_DATA,SDR_RSSI_READ_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_tm_read_tmr);
    
sdr_nvm_param[2].valid_rssi_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].valid_rssi_cnt,MIN_VALID_RSSI_CNT,MAX_VALID_RSSI_CNT,DEFAULT_VALID_RSSI_CNT_3);
    nvm_parameter_write(NVM_DATA,SDR_VALID_RSSI_CNT_3,(uint8_t*)&sdr_nvm_param[2].valid_rssi_cnt);
    
sdr_nvm_param[2].inv_rssi_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].inv_rssi_cnt,MIN_INV_RSSI_CNT,MAX_INV_RSSI_CNT,DEFAULT_INV_RSSI_CNT_3);
    nvm_parameter_write(NVM_DATA,SDR_INV_RSSI_CNT_3,(uint8_t*)&sdr_nvm_param[2].inv_rssi_cnt);
    
    sdr_nvm_param[2].rssi_min=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].rssi_min,MIN_RSSI_MIN,MAX_RSSI_MIN,DEFAULT_RSSI_MIN_3);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_MIN_3,(uint8_t*)&sdr_nvm_param[2].rssi_min);
    
sdr_nvm_param[2].rssi_typ=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].rssi_typ,MIN_RSSI_TYP,MAX_RSSI_TYP,DEFAULT_RSSI_TYP_3);    
    nvm_parameter_write(NVM_DATA,SDR_RSSI_TYPE_3,(uint8_t*)&sdr_nvm_param[2].rssi_typ);
    
    
 sdr_nvm_param[2].rssi_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].rssi_prd_tmr,MIN_RSSI_PRD_TMR,MAX_RSSI_PRD_TMR,DEFAULT_RSSI_PRD_TMR_3);   
    nvm_parameter_write(NVM_DATA,SDR_RSSI_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].rssi_prd_tmr);
    
 sdr_nvm_param[2].short_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].short_rx_on_tmr,MIN_SHORT_RX_ON_TMR,MAX_SHORT_RX_ON_TMR,DEFAULT_SHORT_RX_ON_TMR_3);   
    nvm_parameter_write(NVM_DATA,SDR_RSSI_SHORT_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].short_rx_on_tmr);
    
sdr_nvm_param[2].long_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].long_rx_on_tmr,MIN_LONG_RX_ON_TMR,MAX_LONG_RX_ON_TMR,DEFAULT_LONG_RX_ON_TMR_3);    
    nvm_parameter_write(NVM_DATA,SDR_RSSI_LONG_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].long_rx_on_tmr);
    
    
sdr_nvm_param[2].tm_auto_read_sts=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_auto_read_sts,MIN_TM_AUTO_READ_STS,MAX_TM_AUTO_READ_STS,DEFAULT_TM_AUTO_READ_STS_3);    
    nvm_parameter_write(NVM_DATA,SDR_TM_AUTO_READ_STS_3,(uint8_t*)&sdr_nvm_param[2].tm_auto_read_sts);
    
sdr_nvm_param[2].tm_read_depth=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_read_depth,MIN_TM_READ_DEPTH,MAX_TM_READ_DEPTH,DEFAULT_TM_READ_DEPTH);
    nvm_parameter_write(NVM_DATA,SDR_TM_PERIODICITY_3,(uint8_t*)&sdr_nvm_param[2].tm_read_depth);
    
 sdr_nvm_param[2].tm_short_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_short_store_dur,MIN_TM_SHORT_STORE_DUR,MAX_TM_SHORT_STORE_DUR,DEFAULT_TM_SHORT_STORE_DUR);   
    nvm_parameter_write(NVM_DATA,SDR_TM_SHORT_STORAGE_DURATION_3,(uint8_t*)&sdr_nvm_param[2].tm_short_store_dur);
    
sdr_nvm_param[2].tm_long_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_long_store_dur,MIN_TM_LONG_STORE_DUR,MAX_TM_LONG_STORE_DUR,DEFAULT_TM_LONG_STORE_DUR);   
    nvm_parameter_write(NVM_DATA,SDR_TM_LONG_STORAGE_DURATION_3,(uint8_t*)&sdr_nvm_param[2].tm_long_store_dur);
    
 sdr_nvm_param[2].temp_sens_typ_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[0],MIN_TEMP_SENS_TYP_THRS_0,MAX_TEMP_SENS_TYP_THRS_0,DEFAULT_TEMP_SENS_TYP_THRS_0);   
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[0]);
    
 sdr_nvm_param[2].temp_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[1],MIN_TEMP_SENS_TYP_THRS_1,MAX_TEMP_SENS_TYP_THRS_1,DEFAULT_TEMP_SENS_TYP_THRS_1);   
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[1]);
    
sdr_nvm_param[2].temp_sens_typ_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[2],MIN_TEMP_SENS_TYP_THRS_2,MAX_TEMP_SENS_TYP_THRS_2,DEFAULT_TEMP_SENS_TYP_THRS_2);    
nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[2]);
    
    
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[4]); 
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[5]); 
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[0]); 
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[1]);  
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[2]);   
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[4]); 
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[5]);
 

sdr_nvm_param[2].temp_sens_max_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[0],MIN_TEMP_SENS_MAX_THRS_0,MAX_TEMP_SENS_MAX_THRS_0,DEFAULT_TEMP_SENS_MAX_THRS_0);   
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[0]);
   

sdr_nvm_param[2].temp_sens_max_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[1],MIN_TEMP_SENS_MAX_THRS_1,MAX_TEMP_SENS_MAX_THRS_1,DEFAULT_TEMP_SENS_MAX_THRS_1);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[1]);
  

sdr_nvm_param[2].temp_sens_max_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[2],MIN_TEMP_SENS_MAX_THRS_2,MAX_TEMP_SENS_MAX_THRS_2,DEFAULT_TEMP_SENS_MAX_THRS_2);  
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[2]);
    
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[5]);
   

sdr_nvm_param[2].volt_sens_typ_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[0],MIN_VOLT_SENS_TYP_THRS_0,MAX_VOLT_SENS_TYP_THRS_0,DEFAULT_VOLT_SENS_TYP_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[0]);
  
 sdr_nvm_param[2].volt_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[1],MIN_VOLT_SENS_TYP_THRS_1,MAX_VOLT_SENS_TYP_THRS_1,DEFAULT_VOLT_SENS_TYP_THRS_1); 
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[1]);


sdr_nvm_param[2].volt_sens_typ_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[2],MIN_VOLT_SENS_TYP_THRS_2,MAX_VOLT_SENS_TYP_THRS_2,DEFAULT_VOLT_SENS_TYP_THRS_2);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[2]);
  
sdr_nvm_param[2].volt_sens_typ_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[3],MIN_VOLT_SENS_TYP_THRS_3,MAX_VOLT_SENS_TYP_THRS_3,DEFAULT_VOLT_SENS_TYP_THRS_3);  
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[3]);
    
 
sdr_nvm_param[2].volt_sens_typ_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[4],MIN_VOLT_SENS_TYP_THRS_4,MAX_VOLT_SENS_TYP_THRS_4,DEFAULT_VOLT_SENS_TYP_THRS_4);   
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[4]);
    

sdr_nvm_param[2].volt_sens_typ_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[5],MIN_VOLT_SENS_TYP_THRS_5,MAX_VOLT_SENS_TYP_THRS_5,DEFAULT_VOLT_SENS_TYP_THRS_5);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[5]);
   

sdr_nvm_param[2].volt_sens_min_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[0],MIN_VOLT_SENS_MIN_THRS_0,MAX_VOLT_SENS_MIN_THRS_0,DEFAULT_VOLT_SENS_MIN_THRS_0); 
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[0]);
  
sdr_nvm_param[2].volt_sens_min_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[1],MIN_VOLT_SENS_MIN_THRS_1,MAX_VOLT_SENS_MIN_THRS_1,DEFAULT_VOLT_SENS_MIN_THRS_1);  
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[1]);
    

sdr_nvm_param[2].volt_sens_min_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[2],MIN_VOLT_SENS_MIN_THRS_2,MAX_VOLT_SENS_MIN_THRS_2,DEFAULT_VOLT_SENS_MIN_THRS_2);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[2]);
sdr_nvm_param[2].volt_sens_min_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[3],MIN_VOLT_SENS_MIN_THRS_3,MAX_VOLT_SENS_MIN_THRS_3,DEFAULT_VOLT_SENS_MIN_THRS_3);    
nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[3]);  
sdr_nvm_param[2].volt_sens_min_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[4],MIN_VOLT_SENS_MIN_THRS_4,MAX_VOLT_SENS_MIN_THRS_4,DEFAULT_VOLT_SENS_MIN_THRS_4); 
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[4]);
    
sdr_nvm_param[2].volt_sens_min_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[5],MIN_VOLT_SENS_MIN_THRS_5,MAX_VOLT_SENS_MIN_THRS_5,DEFAULT_VOLT_SENS_MIN_THRS_5);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[5]);
    

sdr_nvm_param[2].volt_sens_max_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[0],MIN_VOLT_SENS_MAX_THRS_0,MAX_VOLT_SENS_MAX_THRS_0,DEFAULT_VOLT_SENS_MAX_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[0]);


    sdr_nvm_param[2].volt_sens_max_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[1],MIN_VOLT_SENS_MAX_THRS_1,MAX_VOLT_SENS_MAX_THRS_1,DEFAULT_VOLT_SENS_MAX_THRS_1);    
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[1]);    
    sdr_nvm_param[2].volt_sens_max_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[2],MIN_VOLT_SENS_MAX_THRS_2,MAX_VOLT_SENS_MAX_THRS_2,DEFAULT_VOLT_SENS_MAX_THRS_2);   
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[2]);    
    sdr_nvm_param[2].volt_sens_max_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[3],MIN_VOLT_SENS_MAX_THRS_3,MAX_VOLT_SENS_MAX_THRS_3,DEFAULT_VOLT_SENS_MAX_THRS_3);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[3]);
    sdr_nvm_param[2].volt_sens_max_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[4],MIN_VOLT_SENS_MAX_THRS_4,MAX_VOLT_SENS_MAX_THRS_4,DEFAULT_VOLT_SENS_MAX_THRS_4);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[4]);


sdr_nvm_param[2].volt_sens_max_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[5],MIN_VOLT_SENS_MAX_THRS_5,MAX_VOLT_SENS_MAX_THRS_5,DEFAULT_VOLT_SENS_MAX_THRS_5);    
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[5]);
    
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[5]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[3]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[4]);
    nvm_parameter_write(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[5]);
}

/**
 * @brief Write SDR status to NVM
 *
 * This function writes only the SDR status fields 
 * to non-volatile memory.
 */ 
void comms_sdr_cfg_nvm_write_sdr_sts(void)
{
    sdr_nvm_param[1].sdr_sts = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_sts;
    sdr_nvm_param[2].sdr_sts = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_sts;

    nvm_parameter_write(NVM_DATA,SDR_CFG_STS_2,(uint8_t*)&sdr_nvm_param[1].sdr_sts);
    nvm_parameter_write(NVM_DATA,SDR_CFG_STS_3,(uint8_t*)&sdr_nvm_param[2].sdr_sts);
}

/**
 * @brief Write SDR configuration to NVM 
 *
 * This function writes the SDR configuration fields
 * from RAM to non-volatile memory.
 */
void comms_sdr_cfg_nvm_write_sdr_cfg(void)
{
    sdr_nvm_param[1].sdr_sts = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_sts;
    sdr_nvm_param[1].sdr_dplx_typ = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_dplx_typ;
    sdr_nvm_param[1].sdr_num_rx = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_num_rx;
    sdr_nvm_param[1].sdr_num_tx = sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_num_tx;
    sdr_nvm_param[1].comb_rx_support = sdr_app_cfg[sdr_nvm_param[1].radio_id].comb_rx_support;
    sdr_nvm_param[1].comb_tx_support = sdr_app_cfg[sdr_nvm_param[1].radio_id].comb_tx_support;
    sdr_nvm_param[1].min_freq = sdr_app_cfg[sdr_nvm_param[1].radio_id].min_freq;
    sdr_nvm_param[1].max_freq = sdr_app_cfg[sdr_nvm_param[1].radio_id].max_freq;

    sdr_nvm_param[2].sdr_sts = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_sts;
    sdr_nvm_param[2].sdr_dplx_typ = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_dplx_typ;
    sdr_nvm_param[2].sdr_num_rx = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_num_rx;
    sdr_nvm_param[2].sdr_num_tx = sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_num_tx;
    sdr_nvm_param[2].comb_rx_support = sdr_app_cfg[sdr_nvm_param[2].radio_id].comb_rx_support;
    sdr_nvm_param[2].comb_tx_support = sdr_app_cfg[sdr_nvm_param[2].radio_id].comb_tx_support;
    sdr_nvm_param[2].min_freq = sdr_app_cfg[sdr_nvm_param[2].radio_id].min_freq;
    sdr_nvm_param[2].max_freq = sdr_app_cfg[sdr_nvm_param[2].radio_id].max_freq;
    sdr_nvm_param[2].min_freq_rx = sdr_app_cfg[sdr_nvm_param[2].radio_id].min_freq_rx;
    sdr_nvm_param[2].max_freq_rx = sdr_app_cfg[sdr_nvm_param[2].radio_id].max_freq_rx;

    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_SDR,(uint8_t*)&num_sdr);
    nvm_parameter_write(NVM_DATA,SDR_CFG_RADIO_ID_2,(uint8_t*)&sdr_nvm_param[1].radio_id);
    nvm_parameter_write(NVM_DATA,SDR_CFG_STS_2,(uint8_t*)&sdr_nvm_param[1].sdr_sts);
    nvm_parameter_write(NVM_DATA,SDR_CFG_DUPLEX_TYPE_2,(uint8_t*)&sdr_nvm_param[1].sdr_dplx_typ);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_RX_2,(uint8_t*)&sdr_nvm_param[1].sdr_num_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_TX_2,(uint8_t*)&sdr_nvm_param[1].sdr_num_tx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_RX_SUPPORT_2,(uint8_t*)&sdr_nvm_param[1].comb_rx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_TX_SUPPORT_2,(uint8_t*)&sdr_nvm_param[1].comb_tx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_2,(uint8_t*)&sdr_nvm_param[1].min_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_2,(uint8_t*)&sdr_nvm_param[1].max_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_RX_2,(uint8_t*)&sdr_nvm_param[1].min_freq_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_RX_2,(uint8_t*)&sdr_nvm_param[1].max_freq_rx);
    
    nvm_parameter_write(NVM_DATA,SDR_CFG_RADIO_ID_3,(uint8_t*)&sdr_nvm_param[2].radio_id);
    nvm_parameter_write(NVM_DATA,SDR_CFG_STS_3,(uint8_t*)&sdr_nvm_param[2].sdr_sts);
    nvm_parameter_write(NVM_DATA,SDR_CFG_DUPLEX_TYPE_3,(uint8_t*)&sdr_nvm_param[2].sdr_dplx_typ);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_RX_3,(uint8_t*)&sdr_nvm_param[2].sdr_num_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_NUM_TX_3,(uint8_t*)&sdr_nvm_param[2].sdr_num_tx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_RX_SUPPORT_3,(uint8_t*)&sdr_nvm_param[2].comb_rx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_COMBINED_TX_SUPPORT_3,(uint8_t*)&sdr_nvm_param[2].comb_tx_support);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_3,(uint8_t*)&sdr_nvm_param[2].min_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_3,(uint8_t*)&sdr_nvm_param[2].max_freq);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MIN_FREQUENCY_RX_3,(uint8_t*)&sdr_nvm_param[2].min_freq_rx);
    nvm_parameter_write(NVM_DATA,SDR_CFG_MAX_FREQUENCY_RX_3,(uint8_t*)&sdr_nvm_param[2].max_freq_rx);
}

/**
 * @brief Write timer configuration to NVM
 * 
 * This function writes the SDR timer configuration
 * from RAM to non-volatile memory.
 */
void comms_sdr_cfg_nvm_write_tmr_cfg(void)
{
    sdr_nvm_param[1].beacon_normal_enb_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].beacon_enb_tmr;
    sdr_nvm_param[1].beacon_normal_prd_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].beacon_prd_tmr;
    sdr_nvm_param[1].beacon_normal_rep_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].beacon_rep_tmr;
    sdr_nvm_param[1].sdr_normal_tm_tx_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tm_tx_tmr;
    sdr_nvm_param[1].sdr_normal_tx_on_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tx_on_tmr;
    sdr_nvm_param[1].sdr_normal_rx_on_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_rx_on_tmr;
    sdr_nvm_param[1].tx_data_rep_cnt = sdr_tmr[sdr_nvm_param[1].radio_id].tx_data_rep_cnt;
    sdr_nvm_param[1].sdr_tm_read_tmr = sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tm_read_tmr;

    sdr_nvm_param[2].beacon_normal_enb_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].beacon_enb_tmr;
    sdr_nvm_param[2].beacon_normal_prd_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].beacon_prd_tmr;
    sdr_nvm_param[2].beacon_normal_rep_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].beacon_rep_tmr;
    sdr_nvm_param[2].sdr_normal_tm_tx_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tm_tx_tmr;
    sdr_nvm_param[2].sdr_normal_tx_on_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tx_on_tmr;
    sdr_nvm_param[2].sdr_normal_rx_on_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_rx_on_tmr;
    sdr_nvm_param[2].tx_data_rep_cnt = sdr_tmr[sdr_nvm_param[2].radio_id].tx_data_rep_cnt;
    sdr_nvm_param[2].sdr_tm_read_tmr = sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tm_read_tmr;


sdr_nvm_param[1].beacon_normal_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_enb_tmr,MIN_BEACON_NORMAL_ENB_TMR,MAX_BEACON_NORMAL_ENB_TMR,DEFAULT_BEACON_NORMAL_ENB_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_ENB_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_enb_tmr);

sdr_nvm_param[1].beacon_normal_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_prd_tmr,MIN_BEACON_NORMAL_PRD_TMR,MAX_BEACON_NORMAL_PRD_TMR,DEFAULT_BEACON_NORMAL_PRD_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_prd_tmr);


sdr_nvm_param[1].beacon_normal_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_rep_tmr,MIN_BEACON_NORMAL_REP_TMR,MAX_BEACON_NORMAL_REP_TMR,DEFAULT_BEACON_NORMAL_REP_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_REP_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_rep_tmr);


sdr_nvm_param[1].sdr_normal_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_tm_tx_tmr,MIN_SDR_NORMAL_TM_TX_TMR,MAX_SDR_NORMAL_TM_TX_TMR,DEFAULT_SDR_NORMAL_TM_TX_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TM_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_tm_tx_tmr);


sdr_nvm_param[1].sdr_normal_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_tx_on_tmr,MIN_SDR_NORMAL_TX_ON_TMR,MAX_SDR_NORMAL_TX_ON_TMR,DEFAULT_SDR_NORMAL_TX_ON_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_tx_on_tmr);


    sdr_nvm_param[1].sdr_normal_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_rx_on_tmr,MIN_SDR_NORMAL_RX_ON_TMR,MAX_SDR_NORMAL_RX_ON_TMR,DEFAULT_SDR_NORMAL_RX_ON_TMR_2); 
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_rx_on_tmr);

    sdr_nvm_param[1].sdr_safe_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tm_tx_tmr,MIN_SDR_SAFE_TM_TX_TMR,MAX_SDR_SAFE_TM_TX_TMR,DEFAULT_SDR_SAFE_TM_TX_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TM_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_tm_tx_tmr);
    sdr_nvm_param[1].sdr_safe_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tx_on_tmr,MIN_SDR_SAFE_TX_ON_TMR,MAX_SDR_SAFE_TX_ON_TMR,DEFAULT_SDR_SAFE_TX_ON_TMR_2);    
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_tx_on_tmr);
    sdr_nvm_param[1].sdr_safe_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_rx_on_tmr,MIN_SDR_SAFE_RX_ON_TMR,MAX_SDR_SAFE_RX_ON_TMR,DEFAULT_SDR_SAFE_RX_ON_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_rx_on_tmr);


sdr_nvm_param[1].tx_data_rep_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tx_data_rep_cnt,MIN_TX_DATA_REP_CNT,MAX_TX_DATA_REP_CNT,DEFAULT_TX_DATA_REP_CNT_2);
    nvm_parameter_write(NVM_DATA,SDR_TX_DATA_REP_CNT_2,(uint8_t*)&sdr_nvm_param[1].tx_data_rep_cnt);

sdr_nvm_param[1].sdr_tm_read_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_tm_read_tmr,MIN_SDR_TM_READ_TMR,MAX_SDR_TM_READ_TMR,DEFAULT_SDR_TM_READ_TMR_2);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_READ_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_tm_read_tmr);
    

sdr_nvm_param[2].beacon_normal_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_enb_tmr,MIN_BEACON_NORMAL_ENB_TMR,MAX_BEACON_NORMAL_ENB_TMR,DEFAULT_BEACON_NORMAL_ENB_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_ENB_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_enb_tmr);

sdr_nvm_param[2].beacon_normal_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_prd_tmr,MIN_BEACON_NORMAL_PRD_TMR,MAX_BEACON_NORMAL_PRD_TMR,DEFAULT_BEACON_NORMAL_PRD_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_prd_tmr);


sdr_nvm_param[2].beacon_normal_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_rep_tmr,MIN_BEACON_NORMAL_REP_TMR,MAX_BEACON_NORMAL_REP_TMR,DEFAULT_BEACON_NORMAL_REP_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_BEACON_NORMAL_REP_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_rep_tmr);


    sdr_nvm_param[2].sdr_normal_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_tm_tx_tmr,MIN_SDR_NORMAL_TM_TX_TMR,MAX_SDR_NORMAL_TM_TX_TMR,DEFAULT_SDR_NORMAL_TM_TX_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TM_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_tm_tx_tmr);
    sdr_nvm_param[2].sdr_normal_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_tx_on_tmr,MIN_SDR_NORMAL_TX_ON_TMR,MAX_SDR_NORMAL_TX_ON_TMR,DEFAULT_SDR_NORMAL_TX_ON_TMR_3);    
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_TX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_tx_on_tmr);
    sdr_nvm_param[2].sdr_normal_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_rx_on_tmr,MIN_SDR_NORMAL_RX_ON_TMR,MAX_SDR_NORMAL_RX_ON_TMR,DEFAULT_SDR_NORMAL_RX_ON_TMR_3); 
    nvm_parameter_write(NVM_DATA,SDR_NORMAL_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_rx_on_tmr);


sdr_nvm_param[2].sdr_safe_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tm_tx_tmr,MIN_SDR_SAFE_TM_TX_TMR,MAX_SDR_SAFE_TM_TX_TMR,DEFAULT_SDR_SAFE_TM_TX_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TM_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_tm_tx_tmr);

sdr_nvm_param[2].sdr_safe_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_tx_on_tmr,MIN_SDR_SAFE_TX_ON_TMR,MAX_SDR_SAFE_TX_ON_TMR,DEFAULT_SDR_SAFE_TX_ON_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_TX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_tx_on_tmr);

sdr_nvm_param[2].sdr_safe_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_rx_on_tmr,MIN_SDR_SAFE_RX_ON_TMR,MAX_SDR_SAFE_RX_ON_TMR,DEFAULT_SDR_SAFE_RX_ON_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_SAFE_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_rx_on_tmr);


sdr_nvm_param[2].tx_data_rep_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tx_data_rep_cnt,MIN_TX_DATA_REP_CNT,MAX_TX_DATA_REP_CNT,DEFAULT_TX_DATA_REP_CNT_3);
    nvm_parameter_write(NVM_DATA,SDR_TX_DATA_REP_CNT_3,(uint8_t*)&sdr_nvm_param[2].tx_data_rep_cnt);

sdr_nvm_param[2].sdr_tm_read_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_tm_read_tmr,MIN_SDR_TM_READ_TMR,MAX_SDR_TM_READ_TMR,DEFAULT_SDR_TM_READ_TMR_3);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_READ_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_tm_read_tmr);

}

/**
 * @brief Write RSSI configuration to NVM
 *
 * This function writes the SDR RSSI configuration 
 * from RAM to non-volatile memory.
 */
void comms_sdr_cfg_nvm_write_rssi_cfg(void)
{
    sdr_nvm_param[1].short_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[1].radio_id].short_rx_on_tmr;
    sdr_nvm_param[1].long_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[1].radio_id].long_rx_on_tmr;

    sdr_nvm_param[2].valid_rssi_cnt = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].valid_rssi_cnt;
    sdr_nvm_param[2].inv_rssi_cnt = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].inv_rssi_cnt;
    sdr_nvm_param[2].rssi_min = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_min;
    sdr_nvm_param[2].rssi_typ = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_typ;
    sdr_nvm_param[2].rssi_prd_tmr = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_prd_tmr;
    sdr_nvm_param[2].short_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].short_rx_on_tmr;
    sdr_nvm_param[2].long_rx_on_tmr = sdr_rssi_cfg[sdr_nvm_param[2].radio_id].long_rx_on_tmr;

    nvm_parameter_write(NVM_DATA,SDR_VALID_RSSI_CNT_2,(uint8_t*)&sdr_nvm_param[1].valid_rssi_cnt);
    nvm_parameter_write(NVM_DATA,SDR_INV_RSSI_CNT_2,(uint8_t*)&sdr_nvm_param[1].inv_rssi_cnt);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_MIN_2,(uint8_t*)&sdr_nvm_param[1].rssi_min);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_TYPE_2,(uint8_t*)&sdr_nvm_param[1].rssi_typ);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].rssi_prd_tmr);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_SHORT_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].short_rx_on_tmr);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_LONG_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].long_rx_on_tmr);

    nvm_parameter_write(NVM_DATA,SDR_VALID_RSSI_CNT_3,(uint8_t*)&sdr_nvm_param[2].valid_rssi_cnt);
    nvm_parameter_write(NVM_DATA,SDR_INV_RSSI_CNT_3,(uint8_t*)&sdr_nvm_param[2].inv_rssi_cnt);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_MIN_3,(uint8_t*)&sdr_nvm_param[2].rssi_min);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_TYPE_3,(uint8_t*)&sdr_nvm_param[2].rssi_typ);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].rssi_prd_tmr);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_SHORT_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].short_rx_on_tmr);
    nvm_parameter_write(NVM_DATA,SDR_RSSI_LONG_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].long_rx_on_tmr);
}

/**
 * @brief Write telemetry configuration to NVM
 *
 * This function writes the SDR telemetry configuration
 * from RAM to non-volatile memory. 
 */
void comms_sdr_cfg_nvm_write_tm_cfg(void)
{
    sdr_nvm_param[1].tm_auto_read_sts = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_auto_read_sts;
    sdr_nvm_param[1].tm_read_depth = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_read_depth;
    sdr_nvm_param[1].tm_short_store_dur = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_short_store_dur;
    sdr_nvm_param[1].tm_long_store_dur = sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_long_store_dur;

    sdr_nvm_param[2].tm_auto_read_sts = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_auto_read_sts;
    sdr_nvm_param[2].tm_read_depth = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_read_depth;
    sdr_nvm_param[2].tm_short_store_dur = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_short_store_dur;
    sdr_nvm_param[2].tm_long_store_dur = sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_long_store_dur;

    nvm_parameter_write(NVM_DATA,SDR_TM_AUTO_READ_STS_2,(uint8_t*)&sdr_nvm_param[1].tm_auto_read_sts);

sdr_nvm_param[1].tm_read_depth=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_read_depth,MIN_TM_READ_DEPTH,MAX_TM_READ_DEPTH,DEFAULT_TM_READ_DEPTH);
    nvm_parameter_write(NVM_DATA,SDR_TM_PERIODICITY_2,(uint8_t*)&sdr_nvm_param[1].tm_read_depth);

sdr_nvm_param[1].tm_short_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_short_store_dur,MIN_TM_SHORT_STORE_DUR,MAX_TM_SHORT_STORE_DUR,DEFAULT_TM_SHORT_STORE_DUR);
    nvm_parameter_write(NVM_DATA,SDR_TM_SHORT_STORAGE_DURATION_2,(uint8_t*)&sdr_nvm_param[1].tm_short_store_dur);

sdr_nvm_param[1].tm_long_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_long_store_dur,MIN_TM_LONG_STORE_DUR,MAX_TM_LONG_STORE_DUR,DEFAULT_TM_LONG_STORE_DUR);
    nvm_parameter_write(NVM_DATA,SDR_TM_LONG_STORAGE_DURATION_2,(uint8_t*)&sdr_nvm_param[1].tm_long_store_dur);
    
    nvm_parameter_write(NVM_DATA,SDR_TM_AUTO_READ_STS_3,(uint8_t*)&sdr_nvm_param[2].tm_auto_read_sts);


sdr_nvm_param[2].tm_read_depth=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_read_depth,MIN_TM_READ_DEPTH,MAX_TM_READ_DEPTH,DEFAULT_TM_READ_DEPTH);
    nvm_parameter_write(NVM_DATA,SDR_TM_PERIODICITY_3,(uint8_t*)&sdr_nvm_param[2].tm_read_depth);

sdr_nvm_param[2].tm_short_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_short_store_dur,MIN_TM_SHORT_STORE_DUR,MAX_TM_SHORT_STORE_DUR,DEFAULT_TM_SHORT_STORE_DUR);
    nvm_parameter_write(NVM_DATA,SDR_TM_SHORT_STORAGE_DURATION_3,(uint8_t*)&sdr_nvm_param[2].tm_short_store_dur);


sdr_nvm_param[2].tm_long_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_long_store_dur,MIN_TM_LONG_STORE_DUR,MAX_TM_LONG_STORE_DUR,DEFAULT_TM_LONG_STORE_DUR);
    nvm_parameter_write(NVM_DATA,SDR_TM_LONG_STORAGE_DURATION_3,(uint8_t*)&sdr_nvm_param[2].tm_long_store_dur);    
}

/**
 * @brief Write sensor configuration to NVM
 * 
 * This function writes the SDR sensor configuration
 * from RAM to non-volatile memory.
 */
void comms_sdr_cfg_nvm_write_sens_cfg(void)
{
    sdr_nvm_param[2].temp_sens_typ_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_typ_thrs;
    sdr_nvm_param[2].temp_sens_min_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_min_thrs;
    sdr_nvm_param[2].temp_sens_max_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_max_thrs;
    sdr_nvm_param[2].temp_sens_typ_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_typ_thrs;
    sdr_nvm_param[2].temp_sens_min_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_min_thrs;
    sdr_nvm_param[2].temp_sens_max_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_max_thrs;
    sdr_nvm_param[2].temp_sens_typ_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_typ_thrs;
    sdr_nvm_param[2].temp_sens_min_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_min_thrs;
    sdr_nvm_param[2].temp_sens_max_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_max_thrs;

    sdr_nvm_param[2].volt_sens_typ_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[0] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[1] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[2] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[3] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[3] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[3] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[4] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[4] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[4] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_max_thrs;
    sdr_nvm_param[2].volt_sens_typ_thrs[5] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_typ_thrs;
    sdr_nvm_param[2].volt_sens_min_thrs[5] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_min_thrs;
    sdr_nvm_param[2].volt_sens_max_thrs[5] = sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_max_thrs;

sdr_nvm_param[2].temp_sens_typ_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[0],MIN_TEMP_SENS_TYP_THRS_0,MAX_TEMP_SENS_TYP_THRS_0,DEFAULT_TEMP_SENS_TYP_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[0]);

    sdr_nvm_param[2].temp_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[1],MIN_TEMP_SENS_TYP_THRS_1,MAX_TEMP_SENS_TYP_THRS_1,DEFAULT_TEMP_SENS_TYP_THRS_1);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[1]);
   sdr_nvm_param[2].temp_sens_typ_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[2],MIN_TEMP_SENS_TYP_THRS_2,MAX_TEMP_SENS_TYP_THRS_2,DEFAULT_TEMP_SENS_TYP_THRS_2);     
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[2]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[0]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[1]);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[2]);

sdr_nvm_param[2].temp_sens_max_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[1],MIN_TEMP_SENS_MAX_THRS_0,MAX_TEMP_SENS_MAX_THRS_0,DEFAULT_TEMP_SENS_MAX_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[0]);

sdr_nvm_param[2].temp_sens_max_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[1],MIN_TEMP_SENS_MAX_THRS_1,MAX_TEMP_SENS_MAX_THRS_1,DEFAULT_TEMP_SENS_MAX_THRS_1);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[1]);

sdr_nvm_param[2].temp_sens_max_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[2],MIN_TEMP_SENS_MAX_THRS_2,MAX_TEMP_SENS_MAX_THRS_2,DEFAULT_TEMP_SENS_MAX_THRS_2);
    nvm_parameter_write(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[2]);

sdr_nvm_param[2].volt_sens_typ_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[0],MIN_VOLT_SENS_TYP_THRS_0,MAX_VOLT_SENS_TYP_THRS_0,DEFAULT_VOLT_SENS_TYP_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[0]);

sdr_nvm_param[2].volt_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[1],MIN_VOLT_SENS_TYP_THRS_1,MAX_VOLT_SENS_TYP_THRS_1,DEFAULT_VOLT_SENS_TYP_THRS_1);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[1]);

sdr_nvm_param[2].volt_sens_typ_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[2],MIN_VOLT_SENS_TYP_THRS_2,MAX_VOLT_SENS_TYP_THRS_2,DEFAULT_VOLT_SENS_TYP_THRS_2);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[2]);

sdr_nvm_param[2].volt_sens_typ_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[3],MIN_VOLT_SENS_TYP_THRS_3,MAX_VOLT_SENS_TYP_THRS_3,DEFAULT_VOLT_SENS_TYP_THRS_3);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[3]);


    sdr_nvm_param[2].volt_sens_typ_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[4],MIN_VOLT_SENS_TYP_THRS_4,MAX_VOLT_SENS_TYP_THRS_4,DEFAULT_VOLT_SENS_TYP_THRS_4);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[4]);
    sdr_nvm_param[2].volt_sens_typ_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[5],MIN_VOLT_SENS_TYP_THRS_5,MAX_VOLT_SENS_TYP_THRS_5,DEFAULT_VOLT_SENS_TYP_THRS_5);    
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[5]);
    sdr_nvm_param[2].volt_sens_min_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[0],MIN_VOLT_SENS_MIN_THRS_0,MAX_VOLT_SENS_MIN_THRS_0,DEFAULT_VOLT_SENS_MIN_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[0]);

sdr_nvm_param[2].volt_sens_min_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[1],MIN_VOLT_SENS_MIN_THRS_1,MAX_VOLT_SENS_MIN_THRS_1,DEFAULT_VOLT_SENS_MIN_THRS_1);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[1]);

sdr_nvm_param[2].volt_sens_min_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[2],MIN_VOLT_SENS_MIN_THRS_2,MAX_VOLT_SENS_MIN_THRS_2,DEFAULT_VOLT_SENS_MIN_THRS_2);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[2]);

sdr_nvm_param[2].volt_sens_min_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[3],MIN_VOLT_SENS_MIN_THRS_3,MAX_VOLT_SENS_MIN_THRS_3,DEFAULT_VOLT_SENS_MIN_THRS_3);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[3]);

sdr_nvm_param[2].volt_sens_min_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[4],MIN_VOLT_SENS_MIN_THRS_4,MAX_VOLT_SENS_MIN_THRS_4,DEFAULT_VOLT_SENS_MIN_THRS_4);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[4]);

sdr_nvm_param[2].volt_sens_min_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[5],MIN_VOLT_SENS_MIN_THRS_5,MAX_VOLT_SENS_MIN_THRS_5,DEFAULT_VOLT_SENS_MIN_THRS_5);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[5]);

sdr_nvm_param[2].volt_sens_max_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[0],MIN_VOLT_SENS_MAX_THRS_0,MAX_VOLT_SENS_MAX_THRS_0,DEFAULT_VOLT_SENS_MAX_THRS_0);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[0]);

sdr_nvm_param[2].volt_sens_max_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[1],MIN_VOLT_SENS_MAX_THRS_1,MAX_VOLT_SENS_MAX_THRS_1,DEFAULT_VOLT_SENS_MAX_THRS_1);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[1]);

sdr_nvm_param[2].volt_sens_max_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[2],MIN_VOLT_SENS_MAX_THRS_2,MAX_VOLT_SENS_MAX_THRS_2,DEFAULT_VOLT_SENS_MAX_THRS_2);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[2]);

sdr_nvm_param[2].volt_sens_max_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[3],MIN_VOLT_SENS_MAX_THRS_3,MAX_VOLT_SENS_MAX_THRS_3,DEFAULT_VOLT_SENS_MAX_THRS_3);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[3]);

sdr_nvm_param[2].volt_sens_max_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[4],MIN_VOLT_SENS_MAX_THRS_4,MAX_VOLT_SENS_MAX_THRS_4,DEFAULT_VOLT_SENS_MAX_THRS_4);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[4]);

sdr_nvm_param[2].volt_sens_max_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[5],MIN_VOLT_SENS_MAX_THRS_5,MAX_VOLT_SENS_MAX_THRS_5,DEFAULT_VOLT_SENS_MAX_THRS_5);
    nvm_parameter_write(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[5]);
}

/**
 * @brief Read SDR configuration from NVM
 *
 * This function reads the SDR configuration from 
 * non-volatile memory into RAM.
 */
void comms_sdr_cfg_nvm_read(void)
{

    nvm_parameter_read(NVM_DATA,SDR_CFG_NUM_SDR,(uint8_t*)&num_sdr);
    DEBUG_CPRINT(("\nSDR_CFG_NUM_SDR: %d\n",num_sdr));
    nvm_parameter_read(NVM_DATA,SDR_CFG_RADIO_ID_2,(uint8_t*)&sdr_nvm_param[1].radio_id);
    DEBUG_CPRINT(("\nSDR_CFG_RADIO_ID_2: %d\n",sdr_nvm_param[1].radio_id));
    nvm_parameter_read(NVM_DATA,SDR_CFG_STS_2,(uint8_t*)&sdr_nvm_param[1].sdr_sts);
    DEBUG_CPRINT(("\nSDR_CFG_STS_2: %d\n",sdr_nvm_param[1].sdr_sts));
    nvm_parameter_read(NVM_DATA,SDR_CFG_DUPLEX_TYPE_2,(uint8_t*)&sdr_nvm_param[1].sdr_dplx_typ);
    DEBUG_CPRINT(("\nSDR_CFG_DUPLEX_TYPE_2: %d\n",sdr_nvm_param[1].sdr_dplx_typ));
    nvm_parameter_read(NVM_DATA,SDR_CFG_NUM_RX_2,(uint8_t*)&sdr_nvm_param[1].sdr_num_rx);
    DEBUG_CPRINT(("\nSDR_CFG_NUM_RX_2: %d\n",sdr_nvm_param[1].sdr_num_rx));
    nvm_parameter_read(NVM_DATA,SDR_CFG_NUM_TX_2,(uint8_t*)&sdr_nvm_param[1].sdr_num_tx);
    DEBUG_CPRINT(("\nSDR_CFG_NUM_TX_2: %d\n",sdr_nvm_param[1].sdr_num_tx));
    nvm_parameter_read(NVM_DATA,SDR_CFG_COMBINED_RX_SUPPORT_2,(uint8_t*)&sdr_nvm_param[1].comb_rx_support);
    DEBUG_CPRINT(("\nSDR_CFG_COMBINED_RX_SUPPORT_2: %d\n",sdr_nvm_param[1].comb_rx_support));
    nvm_parameter_read(NVM_DATA,SDR_CFG_COMBINED_TX_SUPPORT_2,(uint8_t*)&sdr_nvm_param[1].comb_tx_support);
    DEBUG_CPRINT(("\nSDR_CFG_COMBINED_TX_SUPPORT_2: %d\n",sdr_nvm_param[1].comb_tx_support));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MIN_FREQUENCY_2,(uint8_t*)&sdr_nvm_param[1].min_freq);
    DEBUG_CPRINT(("\nSDR_CFG_MIN_FREQUENCY_2: %d\n",sdr_nvm_param[1].min_freq));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MAX_FREQUENCY_2,(uint8_t*)&sdr_nvm_param[1].max_freq);
    DEBUG_CPRINT(("\nSDR_CFG_MAX_FREQUENCY_2: %d\n",sdr_nvm_param[1].max_freq));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MIN_FREQUENCY_RX_2,(uint8_t*)&sdr_nvm_param[1].min_freq_rx);
    DEBUG_CPRINT(("\nSDR_CFG_MIN_FREQUENCY_RX_2: %d\n",sdr_nvm_param[1].min_freq_rx));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MAX_FREQUENCY_RX_2,(uint8_t*)&sdr_nvm_param[1].max_freq_rx);
    DEBUG_CPRINT(("\nSDR_CFG_MAX_FREQUENCY_RX_2: %d\n",sdr_nvm_param[1].max_freq_rx));
    nvm_parameter_read(NVM_DATA,SDR_BEACON_NORMAL_ENB_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_enb_tmr);
    sdr_nvm_param[1].beacon_normal_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_enb_tmr,MIN_BEACON_NORMAL_ENB_TMR,MAX_BEACON_NORMAL_ENB_TMR,DEFAULT_BEACON_NORMAL_ENB_TMR_2);
    DEBUG_CPRINT(("\nSDR_BEACON_NORMAL_ENB_TMR_2: %d\n",sdr_nvm_param[1].beacon_normal_enb_tmr));
    nvm_parameter_read(NVM_DATA,SDR_BEACON_NORMAL_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_prd_tmr);  
    sdr_nvm_param[1].beacon_normal_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_prd_tmr,MIN_BEACON_NORMAL_PRD_TMR,MAX_BEACON_NORMAL_PRD_TMR,DEFAULT_BEACON_NORMAL_PRD_TMR_2);
    DEBUG_CPRINT(("\nSDR_BEACON_NORMAL_PRD_TMR_2: %d\n",sdr_nvm_param[1].beacon_normal_prd_tmr));
    nvm_parameter_read(NVM_DATA,SDR_BEACON_NORMAL_REP_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_normal_rep_tmr);   
    sdr_nvm_param[1].beacon_normal_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_normal_rep_tmr,MIN_BEACON_NORMAL_REP_TMR,MAX_BEACON_NORMAL_REP_TMR,DEFAULT_BEACON_NORMAL_REP_TMR_2);
    DEBUG_CPRINT(("\nSDR_BEACON_NORMAL_REP_TMR_2: %d\n",sdr_nvm_param[1].beacon_normal_rep_tmr));
    nvm_parameter_read(NVM_DATA,SDR_BEACON_SAFE_ENB_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_safe_enb_tmr);
    sdr_nvm_param[1].beacon_safe_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_safe_enb_tmr,MIN_BEACON_SAFE_ENB_TMR,MAX_BEACON_SAFE_ENB_TMR,DEFAULT_BEACON_SAFE_ENB_TMR_2);
    DEBUG_CPRINT(("\nSDR_BEACON_SAFE_ENB_TMR_2: %d\n",sdr_nvm_param[1].beacon_safe_enb_tmr));
    nvm_parameter_read(NVM_DATA,SDR_BEACON_SAFE_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_safe_prd_tmr);
    sdr_nvm_param[1].beacon_safe_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_safe_prd_tmr,MIN_BEACON_SAFE_PRD_TMR,MAX_BEACON_SAFE_PRD_TMR,DEFAULT_BEACON_SAFE_PRD_TMR_2);
    DEBUG_CPRINT(("\nSDR_BEACON_SAFE_PRD_TMR_2: %d\n",sdr_nvm_param[1].beacon_safe_prd_tmr));
    nvm_parameter_read(NVM_DATA,SDR_BEACON_SAFE_REP_TMR_2,(uint8_t*)&sdr_nvm_param[1].beacon_safe_rep_tmr);
    sdr_nvm_param[1].beacon_safe_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].beacon_safe_rep_tmr,MIN_BEACON_SAFE_REP_TMR,MAX_BEACON_SAFE_REP_TMR,DEFAULT_BEACON_SAFE_REP_TMR_2);
    DEBUG_CPRINT(("\nSDR_BEACON_SAFE_REP_TMR_2: %d\n",sdr_nvm_param[1].beacon_safe_rep_tmr));


    nvm_parameter_read(NVM_DATA,SDR_NORMAL_TM_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_tm_tx_tmr);  
sdr_nvm_param[1].sdr_normal_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_tm_tx_tmr,MIN_SDR_NORMAL_TM_TX_TMR,MAX_SDR_NORMAL_TM_TX_TMR,DEFAULT_SDR_NORMAL_TM_TX_TMR_2);
    DEBUG_CPRINT(("\nSDR_NORMAL_TM_TMR_2: %d\n",sdr_nvm_param[1].sdr_normal_tm_tx_tmr));



    nvm_parameter_read(NVM_DATA,SDR_NORMAL_TX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_tx_on_tmr); 
    sdr_nvm_param[1].sdr_normal_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_tx_on_tmr,MIN_SDR_NORMAL_TX_ON_TMR,MAX_SDR_NORMAL_TX_ON_TMR,DEFAULT_SDR_NORMAL_TX_ON_TMR_2);
    DEBUG_CPRINT(("\nSDR_NORMAL_TX_ON_TMR_2: %d\n",sdr_nvm_param[1].sdr_normal_tx_on_tmr));



    nvm_parameter_read(NVM_DATA,SDR_NORMAL_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_normal_rx_on_tmr);
    sdr_nvm_param[1].sdr_normal_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_normal_rx_on_tmr,MIN_SDR_NORMAL_RX_ON_TMR,MAX_SDR_NORMAL_RX_ON_TMR,DEFAULT_SDR_NORMAL_RX_ON_TMR_2); 
    DEBUG_CPRINT(("\nSDR_NORMAL_RX_ON_TMR_2: %d\n",sdr_nvm_param[1].sdr_normal_rx_on_tmr));  
    nvm_parameter_read(NVM_DATA,SDR_SAFE_TM_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_tm_tx_tmr); 
    sdr_nvm_param[1].sdr_safe_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tm_tx_tmr,MIN_SDR_SAFE_TM_TX_TMR,MAX_SDR_SAFE_TM_TX_TMR,DEFAULT_SDR_SAFE_TM_TX_TMR_2);
    DEBUG_CPRINT(("\nSDR_SAFE_TM_TMR_2: %d\n",sdr_nvm_param[1].sdr_safe_tm_tx_tmr));
    nvm_parameter_read(NVM_DATA,SDR_SAFE_TX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_tx_on_tmr);
sdr_nvm_param[1].sdr_safe_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tx_on_tmr,MIN_SDR_SAFE_TX_ON_TMR,MAX_SDR_SAFE_TX_ON_TMR,DEFAULT_SDR_SAFE_TX_ON_TMR_2);
    DEBUG_CPRINT(("\nSDR_SAFE_TX_ON_TMR_2: %d\n",sdr_nvm_param[1].sdr_safe_tx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_SAFE_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_safe_rx_on_tmr); 
  sdr_nvm_param[1].sdr_safe_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_rx_on_tmr,MIN_SDR_SAFE_RX_ON_TMR,MAX_SDR_SAFE_RX_ON_TMR,DEFAULT_SDR_SAFE_RX_ON_TMR_2);
DEBUG_CPRINT(("\nSDR_SAFE_RX_ON_TMR_2: %d\n",sdr_nvm_param[1].sdr_safe_rx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_TX_DATA_REP_CNT_2,(uint8_t*)&sdr_nvm_param[1].tx_data_rep_cnt);
sdr_nvm_param[1].tx_data_rep_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tx_data_rep_cnt,MIN_TX_DATA_REP_CNT,MAX_TX_DATA_REP_CNT,DEFAULT_TX_DATA_REP_CNT_2);
    DEBUG_CPRINT(("\nSDR_TX_DATA_REP_CNT_2: %d\n",sdr_nvm_param[1].tx_data_rep_cnt));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_READ_TMR_2,(uint8_t*)&sdr_nvm_param[1].sdr_tm_read_tmr);  
sdr_nvm_param[1].sdr_tm_read_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_tm_read_tmr,MIN_SDR_TM_READ_TMR,MAX_SDR_TM_READ_TMR,DEFAULT_SDR_TM_READ_TMR_2);
    DEBUG_CPRINT(("\nSDR_RSSI_READ_TMR_2: %d\n",sdr_nvm_param[1].sdr_tm_read_tmr));
    nvm_parameter_read(NVM_DATA,SDR_VALID_RSSI_CNT_2,(uint8_t*)&sdr_nvm_param[1].valid_rssi_cnt);
    DEBUG_CPRINT(("\nSDR_VALID_RSSI_CNT_2: %d\n",sdr_nvm_param[1].valid_rssi_cnt));
    nvm_parameter_read(NVM_DATA,SDR_INV_RSSI_CNT_2,(uint8_t*)&sdr_nvm_param[1].inv_rssi_cnt);
    DEBUG_CPRINT(("\nSDR_INV_RSSI_CNT_2: %d\n",sdr_nvm_param[1].inv_rssi_cnt));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_MIN_2,(uint8_t*)&sdr_nvm_param[1].rssi_min);
    DEBUG_CPRINT(("\nSDR_RSSI_MIN_2: %f\n",sdr_nvm_param[1].rssi_min));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_TYPE_2,(uint8_t*)&sdr_nvm_param[1].rssi_typ);
    DEBUG_CPRINT(("\nSDR_RSSI_TYPE_2: %f\n",sdr_nvm_param[1].rssi_typ));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_PRD_TMR_2,(uint8_t*)&sdr_nvm_param[1].rssi_prd_tmr);
    DEBUG_CPRINT(("\nSDR_RSSI_PRD_TMR_2: %d\n",sdr_nvm_param[1].rssi_prd_tmr));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_SHORT_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].short_rx_on_tmr);
    DEBUG_CPRINT(("\nSDR_RSSI_SHORT_RX_ON_TMR_2: %d\n",sdr_nvm_param[1].short_rx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_LONG_RX_ON_TMR_2,(uint8_t*)&sdr_nvm_param[1].long_rx_on_tmr);
    DEBUG_CPRINT(("\nSDR_RSSI_LONG_RX_ON_TMR_2: %d\n",sdr_nvm_param[1].long_rx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_TM_AUTO_READ_STS_2,(uint8_t*)&sdr_nvm_param[1].tm_auto_read_sts);
    DEBUG_CPRINT(("\nSDR_TM_AUTO_READ_STS_2: %d\n",sdr_nvm_param[1].tm_auto_read_sts));
    nvm_parameter_read(NVM_DATA,SDR_TM_PERIODICITY_2,(uint8_t*)&sdr_nvm_param[1].tm_read_depth);
sdr_nvm_param[1].tm_read_depth=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_read_depth,MIN_TM_READ_DEPTH,MAX_TM_READ_DEPTH,DEFAULT_TM_READ_DEPTH);
    DEBUG_CPRINT(("\nSDR_TM_PERIODICITY_2: %d\n",sdr_nvm_param[1].tm_read_depth));
    nvm_parameter_read(NVM_DATA,SDR_TM_SHORT_STORAGE_DURATION_2,(uint8_t*)&sdr_nvm_param[1].tm_short_store_dur);
    sdr_nvm_param[1].tm_short_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_short_store_dur,MIN_TM_SHORT_STORE_DUR,MAX_TM_SHORT_STORE_DUR,DEFAULT_TM_SHORT_STORE_DUR);
    DEBUG_CPRINT(("\nSDR_TM_SHORT_STORAGE_DURATION_2: %d\n",sdr_nvm_param[1].tm_short_store_dur));
    nvm_parameter_read(NVM_DATA,SDR_TM_LONG_STORAGE_DURATION_2,(uint8_t*)&sdr_nvm_param[1].tm_long_store_dur);   
    sdr_nvm_param[1].tm_long_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].tm_long_store_dur,MIN_TM_LONG_STORE_DUR,MAX_TM_LONG_STORE_DUR,DEFAULT_TM_LONG_STORE_DUR);
    DEBUG_CPRINT(("\nSDR_TM_LONG_STORAGE_DURATION_2 %d\n",sdr_nvm_param[1].tm_long_store_dur));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[0]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_2_1 %d\n",sdr_nvm_param[1].temp_sens_typ_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[1]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_2_2 %d\n",sdr_nvm_param[1].temp_sens_typ_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[2]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_2_3 %d\n",sdr_nvm_param[1].temp_sens_typ_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[3]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_2_4 %d\n",sdr_nvm_param[1].temp_sens_typ_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[4]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_2_5 %d\n",sdr_nvm_param[1].temp_sens_typ_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].temp_sens_typ_thrs[5]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_2_6 %d\n",sdr_nvm_param[1].temp_sens_typ_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[0]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_2_1 %d\n",sdr_nvm_param[1].temp_sens_min_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[1]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_2_2 %d\n",sdr_nvm_param[1].temp_sens_min_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[2]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_2_3 %d\n",sdr_nvm_param[1].temp_sens_min_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[3]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_2_4 %d\n",sdr_nvm_param[1].temp_sens_min_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[4]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_2_5 %d\n",sdr_nvm_param[1].temp_sens_min_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].temp_sens_min_thrs[5]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_2_6 %d\n",sdr_nvm_param[1].temp_sens_min_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[0]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_2_1 %d\n",sdr_nvm_param[1].temp_sens_max_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[1]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_2_2 %d\n",sdr_nvm_param[1].temp_sens_max_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[2]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_2_3 %d\n",sdr_nvm_param[1].temp_sens_max_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[3]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_2_4 %d\n",sdr_nvm_param[1].temp_sens_max_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[4]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_2_5 %d\n",sdr_nvm_param[1].temp_sens_max_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].temp_sens_max_thrs[5]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_2_6 %d\n",sdr_nvm_param[1].temp_sens_max_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[0]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_2_1 %d\n",sdr_nvm_param[1].volt_sens_typ_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[1]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_2_2 %d\n",sdr_nvm_param[1].volt_sens_typ_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[2]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_2_3 %d\n",sdr_nvm_param[1].volt_sens_typ_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[3]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_2_4 %d\n",sdr_nvm_param[1].volt_sens_typ_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[4]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_2_5 %d\n",sdr_nvm_param[1].volt_sens_typ_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].volt_sens_typ_thrs[5]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_2_6 %d\n",sdr_nvm_param[1].volt_sens_typ_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[0]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_2_1 %d\n",sdr_nvm_param[1].volt_sens_min_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[1]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_2_2 %d\n",sdr_nvm_param[1].volt_sens_min_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[2]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_2_3 %d\n",sdr_nvm_param[1].volt_sens_min_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[3]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_2_4 %d\n",sdr_nvm_param[1].volt_sens_min_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[4]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_2_5 %d\n",sdr_nvm_param[1].volt_sens_min_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].volt_sens_min_thrs[5]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_2_6 %d\n",sdr_nvm_param[1].volt_sens_min_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[0]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_2_1 %d\n",sdr_nvm_param[1].volt_sens_max_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[1]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_2_2 %d\n",sdr_nvm_param[1].volt_sens_max_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[2]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_2_3 %d\n",sdr_nvm_param[1].volt_sens_max_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[3]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_2_4 %d\n",sdr_nvm_param[1].volt_sens_max_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[4]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_2_5 %d\n",sdr_nvm_param[1].volt_sens_max_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].volt_sens_max_thrs[5]);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_2_6 %d\n",sdr_nvm_param[1].volt_sens_max_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[0]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_2_1 %d\n",sdr_nvm_param[1].cur_sens_typ_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[1]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_2_2 %d\n",sdr_nvm_param[1].cur_sens_typ_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[2]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_2_3 %d\n",sdr_nvm_param[1].cur_sens_typ_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[3]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_2_4 %d\n",sdr_nvm_param[1].cur_sens_typ_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[4]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_2_5 %d\n",sdr_nvm_param[1].cur_sens_typ_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].cur_sens_typ_thrs[5]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_2_6 %d\n",sdr_nvm_param[1].cur_sens_typ_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[0]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_2_1 %d\n",sdr_nvm_param[1].cur_sens_min_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[1]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_2_2 %d\n",sdr_nvm_param[1].cur_sens_min_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[2]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_2_3 %d\n",sdr_nvm_param[1].cur_sens_min_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[3]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_2_4 %d\n",sdr_nvm_param[1].cur_sens_min_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[4]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_2_5 %d\n",sdr_nvm_param[1].cur_sens_min_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].cur_sens_min_thrs[5]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_2_6 %d\n",sdr_nvm_param[1].cur_sens_min_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_1,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[0]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_2_1 %d\n",sdr_nvm_param[1].cur_sens_max_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_2,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[1]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_2_2 %d\n",sdr_nvm_param[1].cur_sens_max_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_3,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[2]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_2_3 %d\n",sdr_nvm_param[1].cur_sens_max_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_4,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[3]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_2_4 %d\n",sdr_nvm_param[1].cur_sens_max_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_5,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[4]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_2_5 %d\n",sdr_nvm_param[1].cur_sens_max_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_2_6,(uint8_t*)&sdr_nvm_param[1].cur_sens_max_thrs[5]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_2_6 %d\n",sdr_nvm_param[1].cur_sens_max_thrs[5]));

    nvm_parameter_read(NVM_DATA,SDR_CFG_RADIO_ID_3,(uint8_t*)&sdr_nvm_param[2].radio_id);
    DEBUG_CPRINT(("\nSDR_CFG_RADIO_ID_3: %d\n",sdr_nvm_param[2].radio_id));
    nvm_parameter_read(NVM_DATA,SDR_CFG_STS_3,(uint8_t*)&sdr_nvm_param[2].sdr_sts);
    DEBUG_CPRINT(("\nSDR_CFG_STS_3: %d\n",sdr_nvm_param[2].sdr_sts));
    nvm_parameter_read(NVM_DATA,SDR_CFG_DUPLEX_TYPE_3,(uint8_t*)&sdr_nvm_param[2].sdr_dplx_typ);
    DEBUG_CPRINT(("\nSDR_CFG_DUPLEX_TYPE_3: %d\n",sdr_nvm_param[2].sdr_dplx_typ));
    nvm_parameter_read(NVM_DATA,SDR_CFG_NUM_RX_3,(uint8_t*)&sdr_nvm_param[2].sdr_num_rx);
    DEBUG_CPRINT(("\nSDR_CFG_NUM_RX_3: %d\n",sdr_nvm_param[2].sdr_num_rx));
    nvm_parameter_read(NVM_DATA,SDR_CFG_NUM_TX_3,(uint8_t*)&sdr_nvm_param[2].sdr_num_tx);
    DEBUG_CPRINT(("\nSDR_CFG_NUM_TX_3: %d\n",sdr_nvm_param[2].sdr_num_tx));
    nvm_parameter_read(NVM_DATA,SDR_CFG_COMBINED_RX_SUPPORT_3,(uint8_t*)&sdr_nvm_param[2].comb_rx_support);
    DEBUG_CPRINT(("\nSDR_CFG_COMBINED_RX_SUPPORT_3: %d\n",sdr_nvm_param[2].comb_rx_support));
    nvm_parameter_read(NVM_DATA,SDR_CFG_COMBINED_TX_SUPPORT_3,(uint8_t*)&sdr_nvm_param[2].comb_tx_support);
    DEBUG_CPRINT(("\nSDR_CFG_COMBINED_TX_SUPPORT_3: %d\n",sdr_nvm_param[2].comb_tx_support));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MIN_FREQUENCY_3,(uint8_t*)&sdr_nvm_param[2].min_freq);
    DEBUG_CPRINT(("\nSDR_CFG_MIN_FREQUENCY_3: %d\n",sdr_nvm_param[2].min_freq));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MAX_FREQUENCY_3,(uint8_t*)&sdr_nvm_param[2].max_freq);
    DEBUG_CPRINT(("\nSDR_CFG_MAX_FREQUENCY_3: %d\n",sdr_nvm_param[2].max_freq));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MIN_FREQUENCY_RX_3,(uint8_t*)&sdr_nvm_param[2].min_freq_rx);
    DEBUG_CPRINT(("\nSDR_CFG_MIN_FREQUENCY_RX_3: %d\n",sdr_nvm_param[2].min_freq_rx));
    nvm_parameter_read(NVM_DATA,SDR_CFG_MAX_FREQUENCY_RX_3,(uint8_t*)&sdr_nvm_param[2].max_freq_rx);
    DEBUG_CPRINT(("\nSDR_CFG_MAX_FREQUENCY_RX_3: %d\n",sdr_nvm_param[2].max_freq_rx));
 
   
    nvm_parameter_read(NVM_DATA,SDR_BEACON_NORMAL_ENB_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_enb_tmr); sdr_nvm_param[2].beacon_normal_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_enb_tmr,MIN_BEACON_NORMAL_ENB_TMR,MAX_BEACON_NORMAL_ENB_TMR,DEFAULT_BEACON_NORMAL_ENB_TMR_3);
    DEBUG_CPRINT(("\nSDR_BEACON_NORMAL_ENB_TMR_3: %d\n",sdr_nvm_param[2].beacon_normal_enb_tmr));


    nvm_parameter_read(NVM_DATA,SDR_BEACON_NORMAL_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_prd_tmr); 
sdr_nvm_param[2].beacon_normal_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_prd_tmr,MIN_BEACON_NORMAL_PRD_TMR,MAX_BEACON_NORMAL_PRD_TMR,DEFAULT_BEACON_NORMAL_PRD_TMR_3);
    DEBUG_CPRINT(("\nSDR_BEACON_NORMAL_PRD_TMR_3: %d\n",sdr_nvm_param[2].beacon_normal_prd_tmr));


    nvm_parameter_read(NVM_DATA,SDR_BEACON_NORMAL_REP_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_normal_rep_tmr); 
sdr_nvm_param[2].beacon_normal_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_normal_rep_tmr,MIN_BEACON_NORMAL_REP_TMR,MAX_BEACON_NORMAL_REP_TMR,DEFAULT_BEACON_NORMAL_REP_TMR_3);
    DEBUG_CPRINT(("\nSDR_BEACON_NORMAL_REP_TMR_3: %d\n",sdr_nvm_param[2].beacon_normal_rep_tmr));
   
    nvm_parameter_read(NVM_DATA,SDR_BEACON_SAFE_ENB_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_safe_enb_tmr);  
sdr_nvm_param[2].beacon_safe_enb_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_safe_enb_tmr,MIN_BEACON_SAFE_ENB_TMR,MAX_BEACON_SAFE_ENB_TMR,DEFAULT_BEACON_SAFE_ENB_TMR_3);
    DEBUG_CPRINT(("\nSDR_BEACON_SAFE_ENB_TMR_3: %d\n",sdr_nvm_param[2].beacon_safe_enb_tmr));    
    nvm_parameter_read(NVM_DATA,SDR_BEACON_SAFE_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_safe_prd_tmr);
sdr_nvm_param[2].beacon_safe_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_safe_prd_tmr,MIN_BEACON_SAFE_PRD_TMR,MAX_BEACON_SAFE_PRD_TMR,DEFAULT_BEACON_SAFE_PRD_TMR_3);
    DEBUG_CPRINT(("\nSDR_BEACON_SAFE_PRD_TMR_3: %d\n",sdr_nvm_param[2].beacon_safe_prd_tmr));

    
    
    nvm_parameter_read(NVM_DATA,SDR_BEACON_SAFE_REP_TMR_3,(uint8_t*)&sdr_nvm_param[2].beacon_safe_rep_tmr);  
sdr_nvm_param[2].beacon_safe_rep_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].beacon_safe_rep_tmr,MIN_BEACON_SAFE_REP_TMR,MAX_BEACON_SAFE_REP_TMR,DEFAULT_BEACON_SAFE_REP_TMR_3);
    DEBUG_CPRINT(("\nSDR_BEACON_SAFE_REP_TMR_3: %d\n",sdr_nvm_param[2].beacon_safe_rep_tmr));
    nvm_parameter_read(NVM_DATA,SDR_NORMAL_TM_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_tm_tx_tmr);
sdr_nvm_param[2].sdr_normal_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_tm_tx_tmr,MIN_SDR_NORMAL_TM_TX_TMR,MAX_SDR_NORMAL_TM_TX_TMR,DEFAULT_SDR_NORMAL_TM_TX_TMR_3);
    DEBUG_CPRINT(("\nSDR_NORMAL_TM_TMR_3: %d\n",sdr_nvm_param[2].sdr_normal_tm_tx_tmr));    
    nvm_parameter_read(NVM_DATA,SDR_NORMAL_TX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_tx_on_tmr);
sdr_nvm_param[2].sdr_normal_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_tx_on_tmr,MIN_SDR_NORMAL_TX_ON_TMR,MAX_SDR_NORMAL_TX_ON_TMR,DEFAULT_SDR_NORMAL_TX_ON_TMR_3);
    DEBUG_CPRINT(("\nSDR_NORMAL_TX_ON_TMR_3: %d\n",sdr_nvm_param[2].sdr_normal_tx_on_tmr));  
    nvm_parameter_read(NVM_DATA,SDR_NORMAL_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_normal_rx_on_tmr);  
sdr_nvm_param[2].sdr_normal_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_normal_rx_on_tmr,MIN_SDR_NORMAL_RX_ON_TMR,MAX_SDR_NORMAL_RX_ON_TMR,DEFAULT_SDR_NORMAL_RX_ON_TMR_3); 
    DEBUG_CPRINT(("\nSDR_NORMAL_RX_ON_TMR_3: %d\n",sdr_nvm_param[2].sdr_normal_rx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_SAFE_TM_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_tm_tx_tmr);
sdr_nvm_param[2].sdr_safe_tm_tx_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[1].sdr_safe_tm_tx_tmr,MIN_SDR_SAFE_TM_TX_TMR,MAX_SDR_SAFE_TM_TX_TMR,DEFAULT_SDR_SAFE_TM_TX_TMR_3);
    DEBUG_CPRINT(("\nSDR_SAFE_TM_TMR_3: %d\n",sdr_nvm_param[2].sdr_safe_tm_tx_tmr));
    
    
    nvm_parameter_read(NVM_DATA,SDR_SAFE_TX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_tx_on_tmr);
sdr_nvm_param[2].sdr_safe_tx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_tx_on_tmr,MIN_SDR_SAFE_TX_ON_TMR,MAX_SDR_SAFE_TX_ON_TMR,DEFAULT_SDR_SAFE_TX_ON_TMR_3);
    DEBUG_CPRINT(("\nSDR_SAFE_TX_ON_TMR_3: %d\n",sdr_nvm_param[2].sdr_safe_tx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_SAFE_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_safe_rx_on_tmr);   
sdr_nvm_param[2].sdr_safe_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_safe_rx_on_tmr,MIN_SDR_SAFE_RX_ON_TMR,MAX_SDR_SAFE_RX_ON_TMR,DEFAULT_SDR_SAFE_RX_ON_TMR_3);
    DEBUG_CPRINT(("\nSDR_SAFE_RX_ON_TMR_3: %d\n",sdr_nvm_param[2].sdr_safe_rx_on_tmr));   
    nvm_parameter_read(NVM_DATA,SDR_TX_DATA_REP_CNT_3,(uint8_t*)&sdr_nvm_param[2].tx_data_rep_cnt);
sdr_nvm_param[2].tx_data_rep_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tx_data_rep_cnt,MIN_TX_DATA_REP_CNT,MAX_TX_DATA_REP_CNT,DEFAULT_TX_DATA_REP_CNT_3);
    DEBUG_CPRINT(("\nSDR_TX_DATA_REP_CNT_3: %d\n",sdr_nvm_param[2].tx_data_rep_cnt));   
    nvm_parameter_read(NVM_DATA,SDR_RSSI_READ_TMR_3,(uint8_t*)&sdr_nvm_param[2].sdr_tm_read_tmr);
sdr_nvm_param[2].sdr_tm_read_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].sdr_tm_read_tmr,MIN_SDR_TM_READ_TMR,MAX_SDR_TM_READ_TMR,DEFAULT_SDR_TM_READ_TMR_3);
    DEBUG_CPRINT(("\nSDR_RSSI_READ_TMR_3: %d\n",sdr_nvm_param[2].sdr_tm_read_tmr));  
    nvm_parameter_read(NVM_DATA,SDR_VALID_RSSI_CNT_3,(uint8_t*)&sdr_nvm_param[2].valid_rssi_cnt);   
    sdr_nvm_param[2].valid_rssi_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].valid_rssi_cnt,MIN_VALID_RSSI_CNT,MAX_VALID_RSSI_CNT,DEFAULT_VALID_RSSI_CNT_3);
    DEBUG_CPRINT(("\nSDR_VALID_RSSI_CNT_3: %d\n",sdr_nvm_param[2].valid_rssi_cnt));    
    nvm_parameter_read(NVM_DATA,SDR_INV_RSSI_CNT_3,(uint8_t*)&sdr_nvm_param[2].inv_rssi_cnt);
sdr_nvm_param[2].inv_rssi_cnt=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].inv_rssi_cnt,MIN_INV_RSSI_CNT,MAX_INV_RSSI_CNT,DEFAULT_INV_RSSI_CNT_3);
    DEBUG_CPRINT(("\nSDR_INV_RSSI_CNT_3: %d\n",sdr_nvm_param[2].inv_rssi_cnt));
nvm_parameter_read(NVM_DATA,SDR_RSSI_MIN_3,(uint8_t*)&sdr_nvm_param[2].rssi_min);  
sdr_nvm_param[2].rssi_min=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].rssi_min,MIN_RSSI_MIN,MAX_RSSI_MIN,DEFAULT_RSSI_MIN_3);
    DEBUG_CPRINT(("\nSDR_RSSI_MIN_3: %f\n",sdr_nvm_param[2].rssi_min));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_TYPE_3,(uint8_t*)&sdr_nvm_param[2].rssi_typ);
sdr_nvm_param[2].rssi_typ=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].rssi_typ,MIN_RSSI_TYP,MAX_RSSI_TYP,DEFAULT_RSSI_TYP_3);
    DEBUG_CPRINT(("\nSDR_RSSI_TYPE_3: %f\n",sdr_nvm_param[2].rssi_typ));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_PRD_TMR_3,(uint8_t*)&sdr_nvm_param[2].rssi_prd_tmr);
   sdr_nvm_param[2].rssi_prd_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].rssi_prd_tmr,MIN_RSSI_PRD_TMR,MAX_RSSI_PRD_TMR,DEFAULT_RSSI_PRD_TMR_3);
    DEBUG_CPRINT(("\nSDR_RSSI_PRD_TMR_3: %d\n",sdr_nvm_param[2].rssi_prd_tmr));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_SHORT_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].short_rx_on_tmr);
    sdr_nvm_param[2].short_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].short_rx_on_tmr,MIN_SHORT_RX_ON_TMR,MAX_SHORT_RX_ON_TMR,DEFAULT_SHORT_RX_ON_TMR_3);
    DEBUG_CPRINT(("\nSDR_RSSI_SHORT_RX_ON_TMR_3: %d\n",sdr_nvm_param[2].short_rx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_RSSI_LONG_RX_ON_TMR_3,(uint8_t*)&sdr_nvm_param[2].long_rx_on_tmr);
    sdr_nvm_param[2].long_rx_on_tmr=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].long_rx_on_tmr,MIN_LONG_RX_ON_TMR,MAX_LONG_RX_ON_TMR,DEFAULT_LONG_RX_ON_TMR_3);
    DEBUG_CPRINT(("\nSDR_RSSI_LONG_RX_ON_TMR_3: %d\n",sdr_nvm_param[2].long_rx_on_tmr));
    nvm_parameter_read(NVM_DATA,SDR_TM_AUTO_READ_STS_3,(uint8_t*)&sdr_nvm_param[2].tm_auto_read_sts);
sdr_nvm_param[2].tm_auto_read_sts=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_auto_read_sts,MIN_TM_AUTO_READ_STS,MAX_TM_AUTO_READ_STS,DEFAULT_TM_AUTO_READ_STS_3);
    DEBUG_CPRINT(("\nSDR_TM_AUTO_READ_STS_3: %d\n",sdr_nvm_param[2].tm_auto_read_sts));
    nvm_parameter_read(NVM_DATA,SDR_TM_PERIODICITY_3,(uint8_t*)&sdr_nvm_param[2].tm_read_depth);
 sdr_nvm_param[2].tm_read_depth=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_read_depth,MIN_TM_READ_DEPTH,MAX_TM_READ_DEPTH,DEFAULT_TM_READ_DEPTH);
    DEBUG_CPRINT(("\nSDR_TM_PERIODICITY_3: %d\n",sdr_nvm_param[2].tm_read_depth));
    nvm_parameter_read(NVM_DATA,SDR_TM_SHORT_STORAGE_DURATION_3,(uint8_t*)&sdr_nvm_param[2].tm_short_store_dur);
 sdr_nvm_param[2].tm_short_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_short_store_dur,MIN_TM_SHORT_STORE_DUR,MAX_TM_SHORT_STORE_DUR,DEFAULT_TM_SHORT_STORE_DUR);
    DEBUG_CPRINT(("\nSDR_TM_SHORT_STORAGE_DURATION_3: %d\n",sdr_nvm_param[2].tm_short_store_dur));
    nvm_parameter_read(NVM_DATA,SDR_TM_LONG_STORAGE_DURATION_3,(uint8_t*)&sdr_nvm_param[2].tm_long_store_dur);
sdr_nvm_param[2].tm_long_store_dur=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].tm_long_store_dur,MIN_TM_LONG_STORE_DUR,MAX_TM_LONG_STORE_DUR,DEFAULT_TM_LONG_STORE_DUR);
    DEBUG_CPRINT(("\nSDR_TM_LONG_STORAGE_DURATION_3 %d\n",sdr_nvm_param[2].tm_long_store_dur));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[0]);
sdr_nvm_param[2].temp_sens_typ_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[0],MIN_TEMP_SENS_TYP_THRS_0,MAX_TEMP_SENS_TYP_THRS_0,DEFAULT_TEMP_SENS_TYP_THRS_0);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_3_1 %d\n",sdr_nvm_param[2].temp_sens_typ_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[1]);   
sdr_nvm_param[2].temp_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[1],MIN_TEMP_SENS_TYP_THRS_1,MAX_TEMP_SENS_TYP_THRS_1,DEFAULT_TEMP_SENS_TYP_THRS_1);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_3_2 %d\n",sdr_nvm_param[2].temp_sens_typ_thrs[1]));
    
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[2]);  
sdr_nvm_param[2].temp_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_typ_thrs[2],MIN_TEMP_SENS_TYP_THRS_2,MAX_TEMP_SENS_TYP_THRS_2,DEFAULT_TEMP_SENS_TYP_THRS_2);    
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_3_3 %d\n",sdr_nvm_param[2].temp_sens_typ_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[3]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_3_4 %d\n",sdr_nvm_param[2].temp_sens_typ_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[4]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_3_5 %d\n",sdr_nvm_param[2].temp_sens_typ_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].temp_sens_typ_thrs[5]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_TYP_THRS_3_6 %d\n",sdr_nvm_param[2].temp_sens_typ_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[0]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_3_1 %d\n",sdr_nvm_param[2].temp_sens_min_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[1]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_3_2 %d\n",sdr_nvm_param[2].temp_sens_min_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[2]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_3_3 %d\n",sdr_nvm_param[2].temp_sens_min_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[3]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_3_4 %d\n",sdr_nvm_param[2].temp_sens_min_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[4]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_3_5 %d\n",sdr_nvm_param[2].temp_sens_min_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].temp_sens_min_thrs[5]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MIN_THRS_3_6 %d\n",sdr_nvm_param[2].temp_sens_min_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[0]);
sdr_nvm_param[2].temp_sens_max_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[1],MIN_TEMP_SENS_MAX_THRS_0,MAX_TEMP_SENS_MAX_THRS_0,DEFAULT_TEMP_SENS_MAX_THRS_0);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_3_1 %d\n",sdr_nvm_param[2].temp_sens_max_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[1]);
sdr_nvm_param[2].temp_sens_max_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[1],MIN_TEMP_SENS_MAX_THRS_1,MAX_TEMP_SENS_MAX_THRS_1,DEFAULT_TEMP_SENS_MAX_THRS_1);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_3_2 %d\n",sdr_nvm_param[2].temp_sens_max_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[2]);   
sdr_nvm_param[2].temp_sens_max_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].temp_sens_max_thrs[2],MIN_TEMP_SENS_MAX_THRS_2,MAX_TEMP_SENS_MAX_THRS_2,DEFAULT_TEMP_SENS_MAX_THRS_2);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_3_3 %d\n",sdr_nvm_param[2].temp_sens_max_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[3]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_3_4 %d\n",sdr_nvm_param[2].temp_sens_max_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[4]);
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_3_5 %d\n",sdr_nvm_param[2].temp_sens_max_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_TEMP_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].temp_sens_max_thrs[5]);    
    DEBUG_CPRINT(("\nSDR_TEMP_SENS_MAX_THRS_3_6 %d\n",sdr_nvm_param[2].temp_sens_max_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[0]);
sdr_nvm_param[2].volt_sens_typ_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[0],MIN_VOLT_SENS_TYP_THRS_0,MAX_VOLT_SENS_TYP_THRS_0,DEFAULT_VOLT_SENS_TYP_THRS_0);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_3_1 %d\n",sdr_nvm_param[2].volt_sens_typ_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[1]);
sdr_nvm_param[2].volt_sens_typ_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[1],MIN_VOLT_SENS_TYP_THRS_1,MAX_VOLT_SENS_TYP_THRS_1,DEFAULT_VOLT_SENS_TYP_THRS_1);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_3_2 %d\n",sdr_nvm_param[2].volt_sens_typ_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[2]);
sdr_nvm_param[2].volt_sens_typ_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[2],MIN_VOLT_SENS_TYP_THRS_2,MAX_VOLT_SENS_TYP_THRS_2,DEFAULT_VOLT_SENS_TYP_THRS_2);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_3_3 %d\n",sdr_nvm_param[2].volt_sens_typ_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[3]);
sdr_nvm_param[2].volt_sens_typ_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[3],MIN_VOLT_SENS_TYP_THRS_3,MAX_VOLT_SENS_TYP_THRS_3,DEFAULT_VOLT_SENS_TYP_THRS_3);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_3_4 %d\n",sdr_nvm_param[2].volt_sens_typ_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[4]);
sdr_nvm_param[2].volt_sens_typ_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[4],MIN_VOLT_SENS_TYP_THRS_4,MAX_VOLT_SENS_TYP_THRS_4,DEFAULT_VOLT_SENS_TYP_THRS_4);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_3_5 %d\n",sdr_nvm_param[2].volt_sens_typ_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_typ_thrs[5]);
sdr_nvm_param[2].volt_sens_typ_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_typ_thrs[5],MIN_VOLT_SENS_TYP_THRS_5,MAX_VOLT_SENS_TYP_THRS_5,DEFAULT_VOLT_SENS_TYP_THRS_5);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_TYP_THRS_3_6 %d\n",sdr_nvm_param[2].volt_sens_typ_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[0]);
sdr_nvm_param[2].volt_sens_min_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[0],MIN_VOLT_SENS_MIN_THRS_0,MAX_VOLT_SENS_MIN_THRS_0,DEFAULT_VOLT_SENS_MIN_THRS_0);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_3_1 %d\n",sdr_nvm_param[2].volt_sens_min_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[1]);
sdr_nvm_param[2].volt_sens_min_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[1],MIN_VOLT_SENS_MIN_THRS_1,MAX_VOLT_SENS_MIN_THRS_1,DEFAULT_VOLT_SENS_MIN_THRS_1);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_3_2 %d\n",sdr_nvm_param[2].volt_sens_min_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[2]);
sdr_nvm_param[2].volt_sens_min_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[2],MIN_VOLT_SENS_MIN_THRS_2,MAX_VOLT_SENS_MIN_THRS_2,DEFAULT_VOLT_SENS_MIN_THRS_2);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_3_3 %d\n",sdr_nvm_param[2].volt_sens_min_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[3]);
sdr_nvm_param[2].volt_sens_min_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[3],MIN_VOLT_SENS_MIN_THRS_3,MAX_VOLT_SENS_MIN_THRS_3,DEFAULT_VOLT_SENS_MIN_THRS_3);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_3_4 %d\n",sdr_nvm_param[2].volt_sens_min_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[4]);
sdr_nvm_param[2].volt_sens_min_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[4],MIN_VOLT_SENS_MIN_THRS_4,MAX_VOLT_SENS_MIN_THRS_4,DEFAULT_VOLT_SENS_MIN_THRS_4);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_3_5 %d\n",sdr_nvm_param[2].volt_sens_min_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_min_thrs[5]);
sdr_nvm_param[2].volt_sens_min_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_min_thrs[5],MIN_VOLT_SENS_MIN_THRS_5,MAX_VOLT_SENS_MIN_THRS_5,DEFAULT_VOLT_SENS_MIN_THRS_5);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MIN_THRS_3_6 %d\n",sdr_nvm_param[2].volt_sens_min_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[0]);
sdr_nvm_param[2].volt_sens_max_thrs[0]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[0],MIN_VOLT_SENS_MAX_THRS_0,MAX_VOLT_SENS_MAX_THRS_0,DEFAULT_VOLT_SENS_MAX_THRS_0);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_3_1 %d\n",sdr_nvm_param[2].volt_sens_max_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[1]);
sdr_nvm_param[2].volt_sens_max_thrs[1]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[1],MIN_VOLT_SENS_MAX_THRS_1,MAX_VOLT_SENS_MAX_THRS_1,DEFAULT_VOLT_SENS_MAX_THRS_1);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_3_2 %d\n",sdr_nvm_param[2].volt_sens_max_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[2]);
sdr_nvm_param[2].volt_sens_max_thrs[2]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[2],MIN_VOLT_SENS_MAX_THRS_2,MAX_VOLT_SENS_MAX_THRS_2,DEFAULT_VOLT_SENS_MAX_THRS_2);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_3_3 %d\n",sdr_nvm_param[2].volt_sens_max_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[3]);
sdr_nvm_param[2].volt_sens_max_thrs[3]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[3],MIN_VOLT_SENS_MAX_THRS_3,MAX_VOLT_SENS_MAX_THRS_3,DEFAULT_VOLT_SENS_MAX_THRS_3);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_3_4 %d\n",sdr_nvm_param[2].volt_sens_max_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[4]);
sdr_nvm_param[2].volt_sens_max_thrs[4]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[4],MIN_VOLT_SENS_MAX_THRS_4,MAX_VOLT_SENS_MAX_THRS_4,DEFAULT_VOLT_SENS_MAX_THRS_4);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_3_5 %d\n",sdr_nvm_param[2].volt_sens_max_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_VOLT_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].volt_sens_max_thrs[5]);
sdr_nvm_param[2].volt_sens_max_thrs[5]=RANGE_CHECK_AND_ASSIGN(sdr_nvm_param[2].volt_sens_max_thrs[5],MIN_VOLT_SENS_MAX_THRS_5,MAX_VOLT_SENS_MAX_THRS_5,DEFAULT_VOLT_SENS_MAX_THRS_5);
    DEBUG_CPRINT(("\nSDR_VOLT_SENS_MAX_THRS_3_6 %d\n",sdr_nvm_param[2].volt_sens_max_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[0]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_3_1 %d\n",sdr_nvm_param[2].cur_sens_typ_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[1]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_3_2 %d\n",sdr_nvm_param[2].cur_sens_typ_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[2]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_3_3 %d\n",sdr_nvm_param[2].cur_sens_typ_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[3]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_3_4 %d\n",sdr_nvm_param[2].cur_sens_typ_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[4]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_3_5 %d\n",sdr_nvm_param[2].cur_sens_typ_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_TYP_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].cur_sens_typ_thrs[5]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_TYP_THRS_3_6 %d\n",sdr_nvm_param[2].cur_sens_typ_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[0]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_3_1 %d\n",sdr_nvm_param[2].cur_sens_min_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[1]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_3_2 %d\n",sdr_nvm_param[2].cur_sens_min_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[2]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_3_3 %d\n",sdr_nvm_param[2].cur_sens_min_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[3]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_3_4 %d\n",sdr_nvm_param[2].cur_sens_min_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[4]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_3_5 %d\n",sdr_nvm_param[2].cur_sens_min_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MIN_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].cur_sens_min_thrs[5]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MIN_THRS_3_6 %d\n",sdr_nvm_param[2].cur_sens_min_thrs[5]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_1,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[0]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_3_1 %d\n",sdr_nvm_param[2].cur_sens_max_thrs[0]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_2,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[1]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_3_2 %d\n",sdr_nvm_param[2].cur_sens_max_thrs[1]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_3,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[2]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_3_3 %d\n",sdr_nvm_param[2].cur_sens_max_thrs[2]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_4,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[3]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_3_4 %d\n",sdr_nvm_param[2].cur_sens_max_thrs[3]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_5,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[4]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_3_5 %d\n",sdr_nvm_param[2].cur_sens_max_thrs[4]));
    nvm_parameter_read(NVM_DATA,SDR_CUR_SENS_MAX_THRS_3_6,(uint8_t*)&sdr_nvm_param[2].cur_sens_max_thrs[5]);
    DEBUG_CPRINT(("\nSDR_CUR_SENS_MAX_THRS_3_6 %d\n",sdr_nvm_param[2].cur_sens_max_thrs[5]));

    DEBUG_CPRINT(("\n\n[SDR_APP] NVM READ SUCCESS\n\n"));

    /* TODO: global structure = NVM structure */
    sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_sts = sdr_nvm_param[1].sdr_sts;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_dplx_typ = sdr_nvm_param[1].sdr_dplx_typ;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_num_rx = sdr_nvm_param[1].sdr_num_rx;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].sdr_num_tx = sdr_nvm_param[1].sdr_num_tx;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].comb_rx_support = sdr_nvm_param[1].comb_rx_support;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].comb_tx_support = sdr_nvm_param[1].comb_tx_support;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].min_freq = sdr_nvm_param[1].min_freq;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].max_freq = sdr_nvm_param[1].max_freq;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].min_freq_rx = sdr_nvm_param[1].min_freq_rx;
    sdr_app_cfg[sdr_nvm_param[1].radio_id].max_freq_rx = sdr_nvm_param[1].max_freq_rx;
    sdr_tmr[sdr_nvm_param[1].radio_id].beacon_enb_tmr = sdr_nvm_param[1].beacon_normal_enb_tmr;
    sdr_tmr[sdr_nvm_param[1].radio_id].beacon_prd_tmr = sdr_nvm_param[1].beacon_normal_prd_tmr;
    sdr_tmr[sdr_nvm_param[1].radio_id].beacon_rep_tmr = sdr_nvm_param[1].beacon_normal_rep_tmr;
    sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tm_tx_tmr = sdr_nvm_param[1].sdr_normal_tm_tx_tmr;
    sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tx_on_tmr = sdr_nvm_param[1].sdr_normal_tx_on_tmr;
    sdr_tmr[sdr_nvm_param[1].radio_id].sdr_rx_on_tmr = sdr_nvm_param[1].sdr_normal_rx_on_tmr;
    sdr_tmr[sdr_nvm_param[1].radio_id].tx_data_rep_cnt = sdr_nvm_param[1].tx_data_rep_cnt;
    sdr_tmr[sdr_nvm_param[1].radio_id].sdr_tm_read_tmr = sdr_nvm_param[1].sdr_tm_read_tmr;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].valid_rssi_cnt = sdr_nvm_param[1].valid_rssi_cnt;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].inv_rssi_cnt = sdr_nvm_param[1].inv_rssi_cnt;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].rssi_min = sdr_nvm_param[1].rssi_min;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].rssi_typ = sdr_nvm_param[1].rssi_typ;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].rssi_prd_tmr = sdr_nvm_param[1].rssi_prd_tmr;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].short_rx_on_tmr = sdr_nvm_param[1].short_rx_on_tmr;
    sdr_rssi_cfg[sdr_nvm_param[1].radio_id].long_rx_on_tmr = sdr_nvm_param[1].long_rx_on_tmr;
    sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_auto_read_sts = sdr_nvm_param[1].tm_auto_read_sts;
    sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_read_depth = sdr_nvm_param[1].tm_read_depth;
    sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_short_store_dur = sdr_nvm_param[1].tm_short_store_dur;
    sdr_tm_cfg[sdr_nvm_param[1].radio_id].tm_long_store_dur = sdr_nvm_param[1].tm_long_store_dur;

    sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_sts = sdr_nvm_param[2].sdr_sts;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_dplx_typ = sdr_nvm_param[2].sdr_dplx_typ;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_num_rx = sdr_nvm_param[2].sdr_num_rx;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].sdr_num_tx = sdr_nvm_param[2].sdr_num_tx;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].comb_rx_support = sdr_nvm_param[2].comb_rx_support;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].comb_tx_support = sdr_nvm_param[2].comb_tx_support;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].min_freq = sdr_nvm_param[2].min_freq;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].max_freq = sdr_nvm_param[2].max_freq;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].min_freq_rx = sdr_nvm_param[2].min_freq_rx;
    sdr_app_cfg[sdr_nvm_param[2].radio_id].max_freq_rx = sdr_nvm_param[2].max_freq_rx;
    sdr_tmr[sdr_nvm_param[2].radio_id].beacon_enb_tmr = sdr_nvm_param[2].beacon_normal_enb_tmr;
    sdr_tmr[sdr_nvm_param[2].radio_id].beacon_prd_tmr = sdr_nvm_param[2].beacon_normal_prd_tmr;
    sdr_tmr[sdr_nvm_param[2].radio_id].beacon_rep_tmr = sdr_nvm_param[2].beacon_normal_rep_tmr;
    sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tm_tx_tmr = sdr_nvm_param[2].sdr_normal_tm_tx_tmr;
    sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tx_on_tmr = sdr_nvm_param[2].sdr_normal_tx_on_tmr;
    sdr_tmr[sdr_nvm_param[2].radio_id].sdr_rx_on_tmr = sdr_nvm_param[2].sdr_normal_rx_on_tmr;
    sdr_tmr[sdr_nvm_param[2].radio_id].tx_data_rep_cnt = sdr_nvm_param[2].tx_data_rep_cnt;
    sdr_tmr[sdr_nvm_param[2].radio_id].sdr_tm_read_tmr = sdr_nvm_param[2].sdr_tm_read_tmr;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].valid_rssi_cnt = sdr_nvm_param[2].valid_rssi_cnt;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].inv_rssi_cnt = sdr_nvm_param[2].inv_rssi_cnt;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_min = sdr_nvm_param[2].rssi_min;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_typ = sdr_nvm_param[2].rssi_typ;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].rssi_prd_tmr = sdr_nvm_param[2].rssi_prd_tmr;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].short_rx_on_tmr = sdr_nvm_param[2].short_rx_on_tmr;
    sdr_rssi_cfg[sdr_nvm_param[2].radio_id].long_rx_on_tmr = sdr_nvm_param[2].long_rx_on_tmr;
    sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_auto_read_sts = sdr_nvm_param[2].tm_auto_read_sts;
    sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_read_depth = sdr_nvm_param[2].tm_read_depth;
    sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_short_store_dur = sdr_nvm_param[2].tm_short_store_dur;
    sdr_tm_cfg[sdr_nvm_param[2].radio_id].tm_long_store_dur = sdr_nvm_param[2].tm_long_store_dur;
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_typ_thrs = sdr_nvm_param[2].temp_sens_typ_thrs[0];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_min_thrs = sdr_nvm_param[2].temp_sens_min_thrs[0];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[0].temp_sens_max_thrs = sdr_nvm_param[2].temp_sens_max_thrs[0];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_typ_thrs = sdr_nvm_param[2].temp_sens_typ_thrs[1];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_min_thrs = sdr_nvm_param[2].temp_sens_min_thrs[1];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[1].temp_sens_max_thrs = sdr_nvm_param[2].temp_sens_max_thrs[1];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_typ_thrs = sdr_nvm_param[2].temp_sens_typ_thrs[2];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_min_thrs = sdr_nvm_param[2].temp_sens_min_thrs[2];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].temp_sensor[2].temp_sens_max_thrs = sdr_nvm_param[2].temp_sens_max_thrs[2];

    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_typ_thrs = sdr_nvm_param[2].volt_sens_typ_thrs[0];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_min_thrs = sdr_nvm_param[2].volt_sens_min_thrs[0];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[0].volt_sens_max_thrs = sdr_nvm_param[2].volt_sens_max_thrs[0];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_typ_thrs = sdr_nvm_param[2].volt_sens_typ_thrs[1];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_min_thrs = sdr_nvm_param[2].volt_sens_min_thrs[1];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[1].volt_sens_max_thrs = sdr_nvm_param[2].volt_sens_max_thrs[1];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_typ_thrs = sdr_nvm_param[2].volt_sens_typ_thrs[2];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_min_thrs = sdr_nvm_param[2].volt_sens_min_thrs[2];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[2].volt_sens_max_thrs = sdr_nvm_param[2].volt_sens_max_thrs[2];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_typ_thrs = sdr_nvm_param[2].volt_sens_typ_thrs[3];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_min_thrs = sdr_nvm_param[2].volt_sens_min_thrs[3];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[3].volt_sens_max_thrs = sdr_nvm_param[2].volt_sens_max_thrs[3];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_typ_thrs = sdr_nvm_param[2].volt_sens_typ_thrs[4];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_min_thrs = sdr_nvm_param[2].volt_sens_min_thrs[4];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[4].volt_sens_max_thrs = sdr_nvm_param[2].volt_sens_max_thrs[4];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_typ_thrs = sdr_nvm_param[2].volt_sens_typ_thrs[5];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_min_thrs = sdr_nvm_param[2].volt_sens_min_thrs[5];
    sdr_sens_cfg[sdr_nvm_param[2].radio_id].volt_sensor[5].volt_sens_max_thrs = sdr_nvm_param[2].volt_sens_max_thrs[5];


    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_RSSI_CFG_REQ,COMMS_SBAND_CTLR,sizeof(s_sdr_rssi_cfg),(uint8_t *)&sdr_rssi_cfg[COMMS_SBAND_IQS]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_RSSI_CFG_REQ,COMMS_UHF_CTLR,sizeof(s_sdr_rssi_cfg),(uint8_t *)&sdr_rssi_cfg[COMMS_UHF]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_SDR_CFG_REQ,COMMS_SBAND_CTLR,sizeof(s_sdr_cfg),(uint8_t *)&sdr_app_cfg[COMMS_SBAND_IQS]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_SDR_CFG_REQ,COMMS_UHF_CTLR,sizeof(s_sdr_cfg),(uint8_t *)&sdr_app_cfg[COMMS_UHF]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_TMR_CFG_REQ,COMMS_SBAND_CTLR,sizeof(s_sdr_tmr_cfg),(uint8_t *)&sdr_tmr[COMMS_SBAND_IQS]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_TMR_CFG_REQ,COMMS_UHF_CTLR,sizeof(s_sdr_tmr_cfg),(uint8_t *)&sdr_tmr[COMMS_UHF]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_TM_CFG_REQ,COMMS_SBAND_CTLR,sizeof(s_sdr_tm_cfg),(uint8_t *)&sdr_tm_cfg[COMMS_SBAND_IQS]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_TM_CFG_REQ,COMMS_UHF_CTLR,sizeof(s_sdr_tm_cfg),(uint8_t *)&sdr_tm_cfg[COMMS_UHF]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_SENS_CFG_REQ,COMMS_SBAND_CTLR,sizeof(s_sdr_sens_cfg),(uint8_t *)&sdr_sens_cfg[COMMS_SBAND_IQS]);
    sdr_app_send_ipc_pld(SDR_APP_SDR_CTRL_SENS_CFG_REQ,COMMS_UHF_CTLR,sizeof(s_sdr_sens_cfg),(uint8_t *)&sdr_sens_cfg[COMMS_UHF]);
}
