1 .extended = 1,//ɨչ
static ble_data_t m_scan_buffer =
{
    m_scan_buffer_data,
    //BLE_GAP_SCAN_BUFFER_MIN
	BLE_GAP_SCAN_BUFFER_EXTENDED_MIN
};//޸ɨ軺ĴСȻᱨ

#define WDT_CONFIG_RELOAD_VALUE 12000  иȻŹһֱ


룺
1//peer_manager_init();
2pSafeMode_init(jhzl_Safe.SafeParameter);
3SetLinkSecKey();//gapʼʱ򣬳ʼ롣	
4
#if 0
case BLE_GAP_EVT_CONNECTED:
NRF_LOG_INFO("Peripheral connected");
bsp_board_led_off(PERIPHERAL_ADVERTISING_LED);
bsp_board_led_on(PERIPHERAL_CONNECTED_LED);
m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
// Assing connection handle to the QWR module.
multi_qwr_conn_handle_assign(p_ble_evt->evt.gap_evt.conn_handle);//QWR
break;
#endif
#if 1
jhzlSafeHandle();
#endif

5errorSafeHandle();//Ȩжϣǣֱ˳ȥĺ



            // when sending shortly invert LED_1
            m_leds_clear = true;
            bsp_board_led_invert(BSP_LED_INDICATE_SENT_OK);
            err_code = app_timer_start(m_bsp_leds_tmr, APP_TIMER_TICKS(SENT_OK_INTERVAL), NULL);
			
			
			            // on receving error invert LED_1 for long time
            m_leds_clear = true;
            bsp_board_led_invert(BSP_LED_INDICATE_SEND_ERROR);
            err_code = app_timer_start(m_bsp_leds_tmr, APP_TIMER_TICKS(SEND_ERROR_INTERVAL), NULL);
			
			            // when receving shortly invert LED_1
            m_leds_clear = true;
            bsp_board_led_invert(BSP_LED_INDICATE_RCV_OK);
            err_code = app_timer_start(m_bsp_leds_tmr, APP_TIMER_TICKS(RCV_OK_INTERVAL), NULL);
			
			            // on receving error invert LED_1 for long time
            m_leds_clear = true;
            bsp_board_led_invert(BSP_LED_INDICATE_RCV_ERROR);
            err_code = app_timer_start(m_bsp_leds_tmr, APP_TIMER_TICKS(RCV_ERROR_INTERVAL), NULL);







չ255

#define BLE_GATT_ATT_MTU_DEFAULT          23
//#define BLE_GATT_ATT_MTU_DEFAULT          247

// <o> NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size.
#ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23
#endif

//    init.config.ble_adv_primary_phy      = BLE_GAP_PHY_1MBPS;
//    init.config.ble_adv_secondary_phy    = BLE_GAP_PHY_2MBPS;
//    init.config.ble_adv_extended_enabled = true;

//m_scan_param.extended = 1,//ɨչ



1:1512ֽ
2:1ҳ8飬4K.
Ҳһβ4k
0x400=4*256/1024=1k;
0x1000=256*16/1024=4k;

flashΧ
512k 0-0x80000;

MBR     : 0-0x10004k;
Эջ	Эջ7.0.1  0x1000- 0x26000Эջ˾app֪appƶϳַ152kΪʲôhex419k
app		20200313ʱ: 0x26000 ,0x5A000360k,ʵ240k
     0x6D000-0x6FFFF  12k
dfu		 0x70000 ,0x7000,ʵhex 70k