Index: Librarier/bt_rom/format/headset.format
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/Librarier/bt_rom/format/headset.format	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/Librarier/bt_rom/format/headset.format	(working copy)
@@ -71,30 +71,31 @@
 	
 	1 mem_module_le_att_list
 	0 mem_module_le_att_list_end
+	
 
-	1 mem_le_disconnect_reason
-	8 mem_mesh_le_features
-	5 mem_mesh_le_version
-	1 mem_mesh_le_version_exchange_times
+//	1 mem_le_disconnect_reason
+//	8 mem_mesh_le_features
+//	5 mem_mesh_le_version
+//	1 mem_mesh_le_version_exchange_times
 
 	//Hci command
-	2 mem_mesh_hci_opcode_ocf
-	1 mem_mesh_hci_opcode_ogf
-	1 mem_mesh_hci_cmd_len
+//	2 mem_mesh_hci_opcode_ocf
+//	1 mem_mesh_hci_opcode_ogf
+//	1 mem_mesh_hci_cmd_len
 
 	//Set event mask command
-	8 mem_mesh_event_mask
+//	8 mem_mesh_event_mask
 
 	//Read Loacl Version Information
-	0 mem_mesh_read_local_version_info
-	1 mem_mesh_read_local_version_info_hci_version
-	2 mem_mesh_read_local_version_info_hci_revision
-	1 mem_mesh_read_local_version_info_lmp_version
-	2 mem_mesh_read_local_version_info_manufacturer
-	2 mem_mesh_read_local_version_info_lmp_subversion
+//	0 mem_mesh_read_local_version_info
+//	1 mem_mesh_read_local_version_info_hci_version
+//	2 mem_mesh_read_local_version_info_hci_revision
+//	1 mem_mesh_read_local_version_info_lmp_version
+//	2 mem_mesh_read_local_version_info_manufacturer
+//	2 mem_mesh_read_local_version_info_lmp_subversion
 
 	// Local support command
-	64 mem_mesh_read_local_support_command
+//	64 mem_mesh_read_local_support_command
 
 	//LE event mask command
 	8 mem_mesh_le_event_mask
@@ -145,153 +146,179 @@
 	1 mem_fec_required
 	
 	//inquiry
-	1 mem_inquiry_num_responses
-	1 mem_inquiry_num_check
-	1 mem_conn_status
-	1 mem_inquiry_mode
-	2 mem_inquiry_eir_data
-	1 mem_io_cap_flag
+//	1 mem_inquiry_num_responses
+//	1 mem_inquiry_num_check
+//	1 mem_conn_status
+//	1 mem_inquiry_mode
+//	2 mem_inquiry_eir_data
+//	1 mem_io_cap_flag
 
-	1 mem_page_scan_repetition_mode
+//	1 mem_page_scan_repetition_mode
 
 	//receive_connection_request_status:  0 return Unknown Conn     1 get request     2 request was rejected
 	1 mem_conn_req_status
 
 	// think big buffer queue?
-	0 mem_alloc_normal_block
-	2 mem_alloc_normal_header
-	2 mem_alloc_normal_rptr
-	2 mem_alloc_normal_wptr
-	2 mem_alloc_normal_end
-	1 mem_alloc_normal_total_size
-	1 mem_alloc_normal_cur_len
-	30 mem_alloc_normal_block_start
-	
-	0 mem_alloc_big_block
-	2 mem_alloc_big_header
-	2 mem_alloc_big_rptr
-	2 mem_alloc_big_wptr
-	2 mem_alloc_big_end
-	1 mem_alloc_big_total_size
-	1 mem_alloc_big_cur_len
-	30 mem_alloc_big_block_start
+//	0 mem_alloc_normal_block
+//	2 mem_alloc_normal_header
+//	2 mem_alloc_normal_rptr
+//	2 mem_alloc_normal_wptr
+//	2 mem_alloc_normal_end
+//	1 mem_alloc_normal_total_size
+//	1 mem_alloc_normal_cur_len
+//	30 mem_alloc_normal_block_start
+	
+//	0 mem_alloc_big_block
+//	2 mem_alloc_big_header
+//	2 mem_alloc_big_rptr
+//	2 mem_alloc_big_wptr
+//	2 mem_alloc_big_end
+//	1 mem_alloc_big_total_size
+//	1 mem_alloc_big_cur_len
+//	30 mem_alloc_big_block_start
 
 // For debug.
-	30 mem_normal_block_ptr_list
-	30 mem_big_block_ptr_list
+//	30 mem_normal_block_ptr_list
+//	30 mem_big_block_ptr_list
 
-	3 mem_rcv_br_queue_ptr
-	3 mem_rcv_ble_queue_ptr
+//	3 mem_rcv_br_queue_ptr
+//	3 mem_rcv_ble_queue_ptr
 
-	0 mem_snd_br_block
-	2 mem_snd_br_header
-	2 mem_snd_br_rptr
-	2 mem_snd_br_wptr
-	2 mem_snd_br_end
-	1 mem_snd_br_total_size
-	1 mem_snd_br_cur_len
-	30 mem_snd_br_block_start
-
-	0 mem_snd_ble_block
-	2 mem_snd_ble_header
-	2 mem_snd_ble_rptr
-	2 mem_snd_ble_wptr
-	2 mem_snd_ble_end
-	1 mem_snd_ble_total_size
-	1 mem_snd_ble_cur_len
-	30 mem_snd_ble_block_start
-
-	0 mem_snd_hci_block
-	2 mem_snd_hci_header
-	2 mem_snd_hci_rptr
-	2 mem_snd_hci_wptr
-	2 mem_snd_hci_end
-	2 mem_snd_hci_total_size
-	1 mem_snd_hci_cur_len
-	30 mem_snd_hci_block_start
+//	0 mem_snd_br_block
+//	2 mem_snd_br_header
+//	2 mem_snd_br_rptr
+//	2 mem_snd_br_wptr
+//	2 mem_snd_br_end
+//	1 mem_snd_br_total_size
+//	1 mem_snd_br_cur_len
+//	30 mem_snd_br_block_start
+
+//	0 mem_snd_ble_block
+//	2 mem_snd_ble_header
+//	2 mem_snd_ble_rptr
+//	2 mem_snd_ble_wptr
+//	2 mem_snd_ble_end
+//	1 mem_snd_ble_total_size
+//	1 mem_snd_ble_cur_len
+//	30 mem_snd_ble_block_start
+
+//	0 mem_snd_hci_block
+//	2 mem_snd_hci_header
+//	2 mem_snd_hci_rptr
+//	2 mem_snd_hci_wptr
+//	2 mem_snd_hci_end
+//	2 mem_snd_hci_total_size
+//	1 mem_snd_hci_cur_len
+//	30 mem_snd_hci_block_start
 
 	4 mem_regd
 
-	2 mem_alloc_buffer_len
+//	2 mem_alloc_buffer_len
 
-	
-	2 mem_temp_alloc_big_malloc_cnt
-	2 mem_temp_alloc_normal_malloc_cnt
-	2 mem_temp_send_br_malloc_cnt
-	2 mem_temp_media_malloc_cnt
-	2 mem_temp_lcp_malloc_cnt
-	2 mem_temp_sco_rx_malloc_cnt
-	2 mem_temp_sco_tx_malloc_cnt
+//	
+//	2 mem_temp_alloc_big_malloc_cnt
+//	2 mem_temp_alloc_normal_malloc_cnt
+//	2 mem_temp_send_br_malloc_cnt
+//	2 mem_temp_media_malloc_cnt
+//	2 mem_temp_lcp_malloc_cnt
+//	2 mem_temp_sco_rx_malloc_cnt
+//	2 mem_temp_sco_tx_malloc_cnt
 
-	2 mem_temp_alloc_big_free_cnt
-	2 mem_temp_alloc_normal_free_cnt
-	2 mem_temp_send_br_free_cnt
-	2 mem_temp_media_free_cnt
-	2 mem_temp_lcp_free_cnt
-	2 mem_temp_sco_rx_free_cnt
-	2 mem_temp_sco_tx_free_cnt
+//	2 mem_temp_alloc_big_free_cnt
+//	2 mem_temp_alloc_normal_free_cnt
+//	2 mem_temp_send_br_free_cnt
+//	2 mem_temp_media_free_cnt
+//	2 mem_temp_lcp_free_cnt
+//	2 mem_temp_sco_rx_free_cnt
+//	2 mem_temp_sco_tx_free_cnt
 
 
-	2 mem_param_alloc_normal_buffer_start_address
-	2 mem_param_alloc_normal_buffer_max_length
-	2 mem_param_alloc_big_buffer_start_address
-	2 mem_param_alloc_big_buffer_max_length
-	
-	
-	1 mem_ipc_data_rx_buf_subtype
-	3 mem_ipc_data_rx_buf_payload_ptr
+//	2 mem_param_alloc_normal_buffer_start_address
+//	2 mem_param_alloc_normal_buffer_max_length
+//	2 mem_param_alloc_big_buffer_start_address
+//	2 mem_param_alloc_big_buffer_max_length
+//	
+//	
+//	1 mem_ipc_data_rx_buf_subtype
+//	3 mem_ipc_data_rx_buf_payload_ptr
 
-	1 mem_ipc_data_tx_buf_subtype
-	3 mem_ipc_data_tx_buf_payload_ptr
+//	1 mem_ipc_data_tx_buf_subtype
+//	3 mem_ipc_data_tx_buf_payload_ptr
 
 
-	8 mem_le_features
+//	8 mem_le_features
 
 
 
 
 
 
-	1 mem_le_supported_host
-	1 mem_simultaneous_le_host
+//	1 mem_le_supported_host
+//	1 mem_simultaneous_le_host
 
-	2 mem_default_link_policy_settings
-	// mem_link_policy_settings only used by connected 
-	2 mem_link_policy_settings
-	1 mem_le_white_list_cnt
-	28 mem_le_white_list
-	7 mem_le_white_list_type_and_bd_addr
-	1 mem_le_white_list_filter_policy
+//	2 mem_default_link_policy_settings
+//	// mem_link_policy_settings only used by connected 
+//	2 mem_link_policy_settings
+//	1 mem_le_white_list_cnt
+//	28 mem_le_white_list
+//	7 mem_le_white_list_type_and_bd_addr
+//	1 mem_le_white_list_filter_policy
 
-	1 mem_hci_acl_packet_pb_flag
-	2 mem_hci_acl_packet_len_recved
-	2 mem_hci_acl_packet_payload_ptr
+//	1 mem_hci_acl_packet_pb_flag
+//	2 mem_hci_acl_packet_len_recved
+//	2 mem_hci_acl_packet_payload_ptr
 
 	1 mem_le_first_packet_count
 	1 mem_hci_record_disc_conn_handle
 	
 	1 mem_fsc_rtk_host
 
-	8 mem_remote_features
-	8 mem_remote_ext_features0
-	8 mem_remote_ext_features1
-	2 mem_le_scan_window_temp
-
-	256 mem_zcode_buff_user
-
-	1 mem_queue_init_flag
-	2 mem_hci_version_svnid
-	6 mem_bd_addr_new
-	32 mem_efuse_encryp_data
-	2 mem_encryp_inital_value
-	2 mem_encryp_param
-	1 mem_encryp_count
-
-	1 mem_qspi_lock_flag_cm0
-	1 mem_qspi_lock_flag_respin
-	1 mem_qspi_lock_victim
-	64 mem_efuse_64_bytes
-
+//	8 mem_remote_features
+//	8 mem_remote_ext_features0
+//	8 mem_remote_ext_features1
+//	2 mem_le_scan_window_temp
+
+//	256 mem_zcode_buff_user
+
+//	1 mem_queue_init_flag
+//	2 mem_hci_version_svnid
+//	6 mem_bd_addr_new
+//	32 mem_efuse_encryp_data
+//	2 mem_encryp_inital_value
+//	2 mem_encryp_param
+//	1 mem_encryp_count
+
+//	1 mem_qspi_lock_flag_cm0
+//	1 mem_qspi_lock_flag_respin
+//	1 mem_qspi_lock_victim
+//	64 mem_efuse_64_bytes
+	0 mem_fcc_param_new
+	
+	1 mem_fcc_ch_new
+	1 mem_fcc_mod_new
+	1 mem_fcc_txrx_new
+	1 mem_fcc_btble_new
+	1 mem_fcc_data_new
+	1 mem_fcc_data_length_new
+	1 mem_fcc_hop_new
+	
+	0 mem_fcc_param
+	
+	1 mem_fcc_ch
+	1 mem_fcc_mod
+	1 mem_fcc_txrx
+	1 mem_fcc_btble
+	1 mem_fcc_data
+	1 mem_fcc_data_length
+	1 mem_fcc_hop
+	1 mem_random_ch
+	1 mem_tx_power_fcc
+	1 mem_24g_test
+	1 mem_rf_txon_param1
+	1 mem_rf_txon_param2
+	1 mem_rf_shutdown_param1
+	1 mem_rf_shutdown_param2
+	10 mem_0db_tx_power_param
 0 mem_headset_end
 )
 (
@@ -305,6 +332,9 @@
 1 Hold_Mode		
 2 Sniff_Mode
 )
+(
+0x3000 mem_pn9
+)
 //Error Codes
 (
 	0x04 PAGE_TIMEOUT
Index: ModuleDemo/25_OTA/bt_demo/BT/patch/patch.prog
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/patch/patch.prog	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/patch/patch.prog	(working copy)
@@ -1,3623 +1,1259 @@
-//define EFUSE_CODE
-//define FUNCTION_WATCH_DOG
-//define TEST_QUEUE_DEBUG
-//define RF_DEBUG
-//define WHITE_LIST
-define MINZHAN_SDK
-define FSC_RTK_HOST
-/******************************************/
-/**************   Start   *****************/
-/******************************************/
-ifdef EFUSE_CODE
-	call wdt_init_reset_with_start // this supervision timeout is near 16.76s
-	branch loadcode_spi+2
-endif //EFUSE_CODE
-
-	bbit1 8,pf_patch_ext
-	beq patch00_2,p_main_loop
-	beq patch01_6,p_inquiry_receive_rtn
-	beq patch02_0,p_master_page_timeout
-	beq patch03_4,p_master_loop
-	beq patch03_6,p_master_disconnect
-	beq patch04_0,p_linkkey_ready
-	beq patch04_4,p_role_switch_master
-	beq patch06_2,p_send_eir
-	beq patch07_2,p_slave_loop
-	beq patch07_6,p_slave_disconnect
-	beq patch08_1,p_roles_newconn_loop				
-	beq patch08_4,p_newconn_init
-	beq patch0a_4,p_rx_type_dispatch
-	beq patch0b_0,p_process_dmh_common
-	beq patch0b_4,p_process_dmh_data_end
-	beq patch0b_5,p_process_dmh_l2cap_packet
-	beq patch0d_2,p_sniff_init
-	beq patch0d_3,p_sniff_exit
-	beq patch10_1,p_shutdown_radio
-	beq patch10_5,p_set_freq_tx
-	beq patch10_6,p_initialize_radio_cont
-
-	
-	beq patch13_6,p_initialize_radio_cont_by_init_param
-
-	beq patch14_0,p_lpm_hibernate
-	beq patch14_4,p_lpm_dispatch
-	beq patch15_0,p_lpm_dispatch_unconn
-	beq patch17_1,p_app_init
-	beq patch17_2,p_app_process_bb_event
-	beq patch1c_0,p_vp_check_get_data
+//	beq patch00_0,p_soft_reset
+//	beq patch00_2,p_main_loop
+//	beq patch10_6,p_start
+	beq patch13_6,p_start
 	branch assert
-pf_patch_ext:
-	beq patch20_7,p_ipc_init
-	beq patch21_4,p_ipc_rx_process
-	beq patch22_2,p_l2cap_init_queue
-	beq patch22_3,p_queue_insert
-	beq patch22_4,p_queue_delete
-	beq patch24_3,p_l2cap_load_channel_param
-	beq patch24_5,p_l2cap_malloc
-	beq patch24_6,p_l2cap_malloc_fifo_out
-	beq patch24_7,p_l2cap_malloc_free
-	beq patch25_0,p_l2cap_malloc_discard
-	beq patch25_1,p_l2cap_malloc_is_fifo_full
-	beq patch25_2,p_l2cap_malloc_fifo_get_first_ptr
-	beq patch27_3,p_le_init_conn
-	beq patch27_6,p_le_conn_dispatch
-	beq patch27_7,p_le_slave_match
-	beq patch28_1,p_le_slave_unsync
-	beq patch28_2,p_le_slave_disconn
-	beq patch29_3,p_le_receive_slave
-	beq patch29_7,p_le_send_adv_ind
-	beq patch2a_2,p_le_acknowledge
-//	beq patch2a_4,p_le_scan_match
-	beq patch2b_0,p_le_parse_ll
-	beq patch2b_3,p_le_adv
-	beq patch2b_5,p_parse_connect_req
-	beq patch2c_0,p_le_fifo_malloc_tx
-	beq patch2c_4,p_le_fifo_release_first_node
-	beq patch2d_6,p_init_lmp_work
-	beq patch2e_0,p_parse_lmp_process
-	beq patch2e_1,z_parse_lmp_escape
-	beq patch2e_2,p_parse_lmp_accepted
-//	beq patch2e_3,z_parse_lmp_not_accepted
-	beq patch2e_4,p_send_lmp
-	
-	beq patch31_0,p_check_m0_qspi_lock_and_pause
-	beq patch31_1,p_check_m0_qspi_continue
-	beq patch32_2,p_scheduler_tx_l2cap_pkt
-	beq patch34_5,p_simple_pairing_sequence
-	beq patch34_6,p_master_simple_paring_sequence
-	rtneq patch36_2
-	rtneq patch3a_4
-	//beq patch36_2,p_tws_m_wait_connecting
-	//beq patch3a_4,p_tws_s_wait_connecting
-	branch assert
-
-p_main_loop:
-	call sp_calc_sequence 
-	call sp_calc_sequence_256
-	call publickey_calc
-	call p_le_dispatch
-	call idle_dispatch
-	call app_process_idle
-	call p_inquiry_dispatch
-	call inquiry_scan_dispatch
-	call p_page_scan_dispatch
-	branch main_loop+11
-
-p_inquiry_dispatch:
-	rtnmark0 mark_inquiry_on
-	force inquiry_length_timer,queue
-	call timer_check
-	nsetflag blank,mark_inquiry_on,mark
-	nbranch inquiry_start,blank
-	branch p_hci_send_inquiry_comple
-	
-p_page_scan_dispatch:
-	fetch 1,mem_scan_mode
-	rtnbit0 page_scan_mode
-	fetch 1,mem_state
-	rtnbit1 state_inconn
-p_page_scan_dispatch2:	
-	force pscan_interval_timer,queue
-	call timer_check
-	nrtn blank
-	fetcht 2,mem_pscan_window
-//	force 40,queue
-	disable swfine
-	copy temp,stop_watch
-	branch page_scan_dispatch+9
-
-p_le_dispatch:
-	 call le_enable 
-	 call z_le_scan 
-	 call le_adv 
-	 branch le_disable 
-
-
-
-
-p_initialize_radio_cont:
-	fetch 1,mem_patch13
-	set0 6,pdata
-	store 1,mem_patch13
-	branch p_initialize_radio_process
-// be-careful, this patch is not from <initialize_radio_cont>.
-p_initialize_radio_cont_by_init_param:
-	call p_initialize_radio_process
-
-	// becouse patch is from <init_param>
-	branch init_param_cont
-
-p_initialize_radio_process:
-		// in efuse will enable wdt
-ifdef FUNCTION_WATCH_DOG
-	call wdt_init_reset_with_start
-else
-	call wdt_disable_watchdog
-endif //FUNCTION_WATCH_DOG
-
-	// Change mixer power
-	jam 0xba,0x894b
-	call p_initialize_radio_tx_power
-	// Always use 2M IF
-	jam 0xff,0x8907	//7~5 000:0M IF 011:1M IF 111:2M IF
-	call initialize_radio_cont+1
-	jam 0x74,0x8950
-	jam 0x0e,0x8952
-	jam 0x07,0x896d
-	rtn
-
-p_initialize_radio_tx_power:
-	fetch 1,mem_tx_power
-//	beq TX_POWER_0DB,p_initialize_radio_tx_power_0db
-ifdef ENABLE_F3DB
-	beq TX_POWER_f3DB,p_initialize_radio_tx_power_f3db	
-endif // ENABLE_F3DB
-	beq TX_POWER_3DB,p_initialize_radio_tx_power_3db	
-	beq TX_POWER_f5DB,p_initialize_radio_tx_power_f5db	
-	beq TX_POWER_5DB,p_initialize_radio_tx_power_5db
-ifdef ENABLE_8DB
-	beq TX_POWER_8DB,p_initialize_radio_tx_power_8db	
-endif // ENABLE_8DB
-
-ifdef ENABLE_8DB
-p_initialize_radio_tx_power_8db:
-	setarg 0xcce0d0
-	store 3,0x8955
-	setarg 0x7a103e
-	store 3,0x8958
-	jam 0x43,0x8954
-	rtn
-endif // ENABLE_8DB
-
-p_initialize_radio_tx_power_3db:
-p_initialize_radio_tx_power_5db:
-	setarg 0x88e0d0
-	store 3,0x8955
-p_initialize_radio_tx_power_common:
-	setarg 0x4a103c
-p_initialize_radio_tx_power_common2:
-	store 3,0x8958
-	jam 0x68,0x8954
-	rtn
-p_initialize_radio_tx_power_f3db:
-p_initialize_radio_tx_power_f5db:
-	setarg 0x88c0d0
-	store 3,0x8955
-	setarg 0x4a106c
-	branch p_initialize_radio_tx_power_common2
-
-p_shutdown_radio:
-ifdef RF_DEBUG
-	call rf_shutdown_radio_for_debug
-endif //RF_DEBUG
-	branch p_shutdown_radio0,is_rx
-	jam 0xd4, 0x8955
-	nop 4
-	jam 0xd2, 0x8955
-	nop 4
-	jam 0xd1, 0x8955
-	nop 4	
-	fetch 1,mem_tx_power
-ifdef ENABLE_F3DB	
-	beq TX_POWER_f3DB,p_shutdown_radio_f3db
-endif //ENABLE_F3DB
-	beq TX_POWER_3DB,p_shutdown_radio_3db
-	beq TX_POWER_f5DB,p_shutdown_radio_f5db
-p_shutdown_radio_8db:
-p_shutdown_radio_5db:	
-p_shutdown_radio_3db:
-p_shutdown_radio_0db:
-	jam 0xd0, 0x8955
-	jam 0xe0, 0x8956
-p_shutdown_radio0:
-	force 8,radio_ctrl
-	force 0,radio_ctrl
-	disable is_rx
-	disable is_tx
-	pulse packet_end
-	jam 0x0,rfen_mdm
-	jam 0x0,rfen_tx
-	jam 0x0,rfen_rx
-	jam 0,rfen_sn
-	jam 0x70,rfen_msc
-	fetch 1,rfen_adc
-	set0 0,pdata
-	store 1,rfen_adc
-//	jam 0x0,rfen_adc
-	rtn	
-p_shutdown_radio_f5db:
-p_shutdown_radio_f3db:
-	jam 0xd0,0x8955
-	jam 0xc0,0x8956
-	branch p_shutdown_radio0
-p_set_freq_tx:
-	storet 1,mem_last_freq
-	add temp,0,rega			/* index to frequency */
-	fetch 1,mem_sfreq_enable
-	ncall set_offset_sfreq,blank
-	call rf_write_freq
-	setarg param_pll_setup_min
-	call sleep
-p_rf_tx_enable:
-	// becouse we will change the tx power, so need initial again
-	call p_initialize_radio_tx_power
-	fetch 1,rfen_adc
-	set1 0,pdata
-	store 1,rfen_adc
-	jam 0x3c,rfen_rx
-	jam 0xe0,rfen_tx
-	nop 10 /* wait LDOs to turn ON*/
-	jam 0x01, rfen_mdm
-	jam 0x3d, rfen_mdm
-	nop 10 /* wait tx blocks to turn ON*/
-	jam 0xb7,rfen_sn
-	nop 10 /* wait tx lo buffer to turn ON*/
-	jam 0x7d, rfen_mdm
-	fetch 1,mem_tx_power
-	beq TX_POWER_0DB,p_set_tx_power_0db
-ifdef ENABLE_F3DB
-	beq TX_POWER_f3DB,set_tx_power_f3db	
-endif //ENABLE_F3DB
-	beq TX_POWER_f5DB,p_set_tx_power_f5db
-p_rx_high_sens:
-	jam 0xfb,0x894c 
-	jam 0xef,0x894d
-	jam 0xec,0x894e 
-	jam 0x5e,0x894f 
-	beq TX_POWER_3DB,p_set_tx_power_3db
-	beq TX_POWER_8DB,p_set_tx_power_8db
-p_set_tx_power_5db:  	
-  	branch set_tx_power_5db
-p_set_tx_power_8db:  	
-	jam 0xff,0x8956
-	call txon_common
-	jam 0xff,0x8955
-	rtn
-	
-p_set_tx_power_f5db:
-	call p_rx_low_sens
-	jam 0xcc,0x8956
-	call txon_common
-	jam 0xd8,0x8955
-	rtn	
-	
-p_set_tx_power_0db:
-	call p_rx_low_sens
-	branch set_tx_power_0db
-
-	
-p_set_tx_power_3db:
-	jam 0xf7,0x8956
-	call txon_common
-	jam 0xdf,0x8955
-	rtn
-p_rx_low_sens:
-	jam 0x5b,0x894c 
-	jam 0x96,0x894d
-	jam 0x2c,0x894e 
-	jam 0x46,0x894f 
-  	rtn
-
-p_mram_clkon:
-	arg CLOCK_OFF_MRAM,queue
-	branch clk_on
-p_check_m0_qspi_lock_and_pause:
-	call wait_m0_lock_qspi
-	fetch 1,mem_m0_pause_state
-	beq M0_STATE_NORMAL,p_m0_pause
-	rtn
-
-p_m0_pause:
-	call p_enable_m0_work_clk
-	branch m0_pause
-	
-p_check_m0_qspi_continue:
-	fetch 1,mem_m0_pause_state
-	rtnne M0_STATE_PAUSE
-	branch m0_continue
-	// no need close m0 clock. it only for save power case
-	//branch p_disable_m0_work_clk
-
-p_enable_m0_work_clk:
-	fetch 1,0x1f000
-	arg 0x1c,temp
-	ior temp,pdata
-	store 1,0x1f000
-	rtn
-/*
-p_disable_m0_work_clk:
-	fetch 1,0x1f000
-	arg 0xe3,temp
-	iand temp,pdata
-	store 1,0x1f000
-	rtn
-*/
-p_ipc_init:
-	//fetch 1,mem_ipc_enable
-	//rtn blank
-	call p_ipc_notify_m0_wakeup_flag_init
-	call p_mram_clkon
-	branch ipc_init+5
-
-
-
-p_buck_setting:
-	fetcht 4,core_lpm_buckctrl
-	storet 4,core_lpm_reg
-	jam 0xe6,0x804d
-	call p_lpm_write_wait_clock
-	jam 0x20,0x8005
-	//branch p_lpm_write_wait_clock
-p_lpm_write_wait_clock:
-	until null,lpo_edge
-	until null,lpo_edge
-	until null,lpo_edge
-	until null,lpo_edge
-	until null,lpo_edge
-	rtn
-
- 	
-
- 	
-p_headset_cb_idle_process:
-ifdef FUNCTION_WATCH_DOG
-	call p_wdt_kick_watchdog
-endif //FUNCTION_WATCH_DOG
-	rtn
-p_app_init:
-p_hci_init:
-	//jam 0,mem_ota_enable_xip_flag
-	// RAM reset.
-	//jam 0,mem_ota_wdt_en_flag
-	//jam 0,mem_ota_wdt_m0_en
-	
-	jam 0x1c,0x1f000
-	jam 0x05,0x8042
-	call p_buck_setting
-	fetch 1,0x8341
-	store 1,mem_hibernate_flag
-
-	fetch 1,mem_xlmp_conn_state
-	store 1,mem_lmp_conn_state
-
-	ncall z_app_init_efuse_data,wake
-
-	
-ifdef FUNCTION_WATCH_DOG
-	call wdt_init_reset_with_start
-endif //FUNCTION_WATCH_DOG
-	call headset_init
-	
-ifdef MINZHAN_SDK	
-	call p_read_efuse_64_bytes
-endif
-
-	setarg p_app_event_normal_process
-	store 2,mem_cb_bb_event_process
-
-	setarg p_headset_evt_100ms_timer
-	store 2,mem_cb_event_timer
-	setarg p_headset_cb_idle_process
-	store 2,mem_cb_idle_process
-
-	setarg cb_enter_lpm
-	store 2,mem_cb_before_lpm
-	setarg cb_enter_hibernate
-	store 2,mem_cb_before_hibernate 
-
-	
-	//call headset_check_reconnet
-	//call p_ipc_notify_m0_wakeup_flag_init
-	
-	call p_set_gpio_after_lpm,wake
-//	call qspi_release_powerdown_flash,wake
-	nbranch wake_from_power,wake
-wake_for_lpm:
-	call ipc_lock_m0_lmp_wait_work_flag
-	call enable_xip
-	jam BT_EVT_WAKEUP,mem_fifo_temp
-	branch ipc_tx_bt_event
-
-ifdef MINZHAN_SDK
-p_read_efuse_64_bytes:
-	setarg 0
-	arg mem_efuse_64_bytes,rega
-	arg 64,temp
-	branch efuse_read_data
-endif
-
-wake_from_power:
-
-	setarg 0x1171
-	store 2,mem_encryp_inital_value
-	call z_efuse_custom_encryption
-
-	call enable_xip
-
-	// store local addr
-	fetch 6,mem_lap
-	store 6,mem_local_bdaddr
-	fetch 1,mem_hibernate_flag
-	bbit1 5,p_evt_restart
-	jam BT_EVT_RESET,mem_fifo_temp
-	branch ipc_tx_bt_event
-
-p_evt_restart:
-	call p_clear_charge_reset_flag
-	jam BT_EVT_RESTART,mem_fifo_temp
-	branch ipc_tx_bt_event
-
-
-p_set_gpio_after_lpm:
-	call qspi_init_set
-	call qspi_gpio_init
-	nop 2000 // Delay for gpio26 work ready
-	call qspi_release_powerdown_flash
-//	nop 100
-	rtn
-
-	
-//p_app_process_bb_event:
-//	fetch 1,mem_state
-//	bbit1 state_inconn,app_process_bb_event+1
-//	
-//	fetch 2,mem_ui_state_map
-//	jam 0x03,mem_scan_mode
-//	branch app_process_bb_event+1
-
-p_headset_evt_100ms_timer:
-// Voice all process by cm0
-p_vp_check_get_data:
-	rtn
-
-
-p_clear_charge_reset_flag:
-	fetch 4,core_lpm_buck_cfg
-	set0 29,pdata
- 	store 4,core_lpm_reg
-	branch  p_lpm_write_ctrl_buck
-p_lpm_write_ctrl_buck:
-	until null,lpo_edge
-	jam lpmreg_sel_buck_cfg,core_lpm_wr
-	until null,lpo_edge
-	rtn
-p_lpm_hibernate:
-	arg -1,temp // Here must be -1, the rom code is error
-	branch lpm_doze
-
-
-	
-/*********************************/
-/*********lmp send*************/
-/********************************/
-	/* enable user if a lmp packet is to send */
-p_send_lmp:
-	//bpatchx patch2e_4,mem_patch2e
-	disable user
-	call lmo_fifo_process
-	fetch 1,mem_lmp_to_send
-	rtn blank
-	// set flag
-	arg LOG_POINT_1001,rega
-	fetcht 1,mem_lmp_to_send
-	call debug_log_print
-	fetch 1,mem_lmp_to_send
-/* lmp message to be processed. this will either be because host??? */
-/* wants to send a lmp message or because one resulted from the LMP */
-/* processing section */
-/********* outgoing lmp lookup table *************/
-	bbit1 7,z_send_lmp_escape
-	beq LMP_SETUP_COMPLETE, p_send_lmp_setup_complete
-	beq LMP_SRES,p_send_lmp_sres
-	beq LMP_DETACH,p_send_lmp_detach
-	beq LMP_AU_RAND,p_send_lmp_aurand
-	branch send_lmp+10
-
-p_send_lmp_aurand:
-	fetch 1,mem_pairing_auth
-	branch p_send_lmp_aurand_notpairing,blank
-	call check_localsm
-	call tid_initiate,true				//master
-	ncall tid_reply,true				//slave
-	branch p_send_lmp_aurand_common
-p_send_lmp_aurand_notpairing:
-	call tid_initiate
-p_send_lmp_aurand_common:
-	call generate_random_number
-	force 17,pdata
-	call msg_send_lmp
-	arg mem_random_number,contr
-	call memcpy16
-	branch p_send_lmp_tid
-	
-p_send_lmp_tid:
-	fetcht 1,mem_state_map
-	and_into 1,temp	
-p_send_lmp_end:
-	fetch 1,mem_lmp_to_send
-	lshift pdata,pdata
-
-	bmark0 mark_slave_in_rand_accepted,p_send_lmp_end_master
-	nsetflag master,0,pdata
-	branch send_lmp_exit
-p_send_lmp_end_master:
-	setflag master,0,pdata
-	ixor temp,pdata
-	branch send_lmp_exit
-
-
-	//branch p_hci_send_linkkey_req_event
-	//fetch 2,mem_lmpext_ssp_enable
-	//fetcht 1,mem_remote_sppcap
-	//iand temp,pdata
-	//branch cmd_pair,blank
-	//branch cmd_ssp
-
-p_send_lmp_setup_complete:
-	fetch 1,mem_state
-	set1 state_conn_comp,pdata
-	store 1,mem_state
-	copy clkn_bt,pdata
-	store 4,mem_aurand_send_delay_time
-	fetch 1,mem_lmp_conn_state
-	bbit1 SENT_SETUP_COMPLETE,p_send_lmp_setup_complete_has_sent
-	set1 SENT_SETUP_COMPLETE,pdata
-	store 1,mem_lmp_conn_state
-	call p_hci_send_connection_complete
-	force 1,pdata
-	call msg_send_lmp
-	branch send_lmp_request
-p_send_lmp_setup_complete_has_sent:
-	jam 0,mem_lmp_to_send
-	rtn
-
-p_send_lmp_sres:
-	arg mem_lap,rega
-	call function_e1
-	force 5,pdata
-	call msg_send_lmp
-	fetch 4,mem_input_store
-	istore 4,contw
-	arg mem_sres_tid,temp
-	call special_tid_store
-	call copy_aco
-	call check_localsm
-	branch p_send_lmp_sres_master,true
-	jam DONE_ENCRYP,mem_wait_encryption
-	
-	bmark1 mark_slave_in_rand_accepted,p_send_lmp_sres_startenc_slave
-	fetch 1,mem_pairing_auth
-	rtn blank
-	jam LMP_AU_RAND,mem_lmo_opcode2
-p_send_lmp_sres_master:
-	bmark1 mark_slave_in_rand_accepted,p_send_lmp_sres_startenc_slave
-	fetch 1,mem_link_key_exists
-	rtn blank
-p_send_lmp_sres_startenc:
-	call check_localsm
-	nbranch p_send_lmp_sres_startenc_slave,true
-	rtn
-
-p_send_lmp_sres_startenc_slave:
-	rtnmark0 mark_slave_in_rand_accepted
-	set0 mark_slave_in_rand_accepted,mark
-	call z_hci_send_linkkey_notification
-	branch p_hci_send_auth_complete
-
-	
-p_send_eir:
-	fetch 1,mem_eir
-	branch send_eir+1,blank
-	arg mem_eir,contr
-	arg 240,loopcnt
-	arg 0,temp
-	call p_check_tx_length
-	storet 2,mem_tx_len
-	branch send_eir+22
-p_check_tx_length:
-	ifetch 1,contr
-	rtn blank
-	increase 1,temp
-	loop p_check_tx_length
-	rtn
-
-
-
-p_slave_loop:
-//	bpatch patch07_2,mem_patch07
-	call scheduler_process
-	call slave_conn_recv_packet	/* go listen for a packet */
-	nbranch slave_notmatch,match
-	call supervision_flush
-	call scheduler_tx_l2cap_pkt
-	call prepare_tx
-	call set_flow_flag
-	call slave_conn_send_packet
-	call parse_l2cap
-	call parse_lmp
-	call p_process_cmd
-	branch slave_loop+12
-
-p_master_loop:
-	call parse_lmp
-	call p_process_cmd
-	branch master_loop+3
-
-p_process_cmd:
-	fetch 1,mem_hci_cmd
-	rtn blank
-	fetch 1,mem_lmo_opcode2
-	nrtn blank
-	call cmd_check_plap
-	nbranch p_process_cmd_conn_handle,zero
-//	branch process_cmd+6
-	
-	fetch 1,mem_hci_cmd
-	beq hci_cmd_remote_name_req,cmd_namereq
-	beq hci_cmd_pair,cmd_pair
-	beq hci_cmd_nopair,cmd_nopair
-	beq hci_cmd_linkkey,cmd_has_key
-	beq hci_cmd_nokey,cmd_no_key
-	beq hci_cmd_reject_conn,cmd_disconn
-	beq hci_cmd_role_switch,cmd_role_switch
-	beq hci_cmd_accept_conn,cmd_accept_conn
-	beq hci_cmd_accept_with_switch,cmd_accept_with_switch
-	beq hci_cmd_detach,cmd_detach
-	beq hci_cmd_in_sniff,cmd_in_sniff
-	beq hci_cmd_exit_sniff,p_cmd_exit_sniff
-p_process_cmd_conn_handle:
-	call cmd_check_handle
-	nrtn blank
-	fetch 1,mem_hci_cmd
-	beq hci_cmd_auth,p_cmd_auth
-	beq hci_cmd_send_supervision,p_cmd_send_supervision
-	branch process_cmd_conn_handle+4
-
-p_cmd_send_supervision:
-	jam LMP_SUPERVISION_TIMEOUT,mem_lmo_opcode2
-	branch cmd_exit
-
-p_cmd_exit_sniff:
-	jam LMP_UNSNIFF_REQ,mem_lmo_opcode2
-	branch cmd_exit
-
-p_cmd_auth:
-	fetch 1,mem_op
-	set1 op_auth_req,pdata
-	store 1,mem_op
-	fetch 1,mem_state
-	bbit1 state_linkkey,cmd_auth_sendaurand
-	call p_hci_send_linkkey_req_event
-	branch cmd_exit
-
-p_hci_send_connection_complete:
-	jam 2,mem_conn_status
-	//force 0,temp
-	jam 0x00,mem_mesh_event_parameter_status
-//	jam 0,mem_scan_mode
-	branch p_hci_send_connection_rtn_error
-p_hci_send_connection_error:
-	//force HCI_EVENT_CONNECTION_COMPLETE,queue
-	//Status(1),Connection_Handle(2),BD_ADDR(6),Link_Type(1),Encryption_Enabled(1)
-	jam 0,mem_conn_status
-	jam 0,mem_conn_req_status
-p_hci_send_connection_rtn_error:	
-	jam 0,mem_io_cap_flag
-	branch z_hci_send_connection_rtn_error
-
-
-p_inquiry_receive_rtn:
-	fetch 1,mem_inquiry_num_check
-	branch z_hci_inquiry_reply_check_eir,blank
-	fetch 1,mem_inquiry_num_responses
-	branch p_hci_send_inquiry_comple,blank
-	increase -1,pdata
-	store 1,mem_inquiry_num_responses
-	branch z_hci_inquiry_reply_check_eir
-
-
-	
-p_rssi_convert:
-	fetch 1,mem_rssi
-	rshift4 pdata,temp
-	mul32 temp,10,temp
-	and pdata,0x0f,pdata
-	iadd temp,temp
-	sub temp,0,pdata
-	rtn
-
-
-p_master_page_timeout:	
-	call master_page_timeout+1
-//	fetch 1,mem_conn_status
-	//rtnne 1
-//	bne 1,assert
-	jam PAGE_TIMEOUT,mem_mesh_event_parameter_status
-	branch p_hci_send_connection_error 
-
-p_master_disconnect:
-	//bpatch patch03_6,mem_patch03
-	call quit_connection
-	disable master
-	fetch 1,mem_conn_status
-	beq 1,p_master_page_timeout
-	fetch 1,mem_state_map
-	bbit1 smap_name_req,master_name_disconnect
-	fetch 1,mem_state
-	bbit0 state_conn_comp,master_disconnect_quiet
-	branch p_hci_send_disconnect_complete
-	
-p_estimate_event_head_event_code:
-	fetch 1,mem_inquiry_mode
-	beq 0,p_hci_event_inquiry_result
-	beq 1,p_hci_event_inquiry_result_with_rssi
-	beq 2,p_hci_event_extended_inquiry_result
-	jam HCI_EVENT_INQUIRY_RESULT,mem_mesh_event_head_event_code
-	rtn
-p_hci_event_inquiry_result:
-	jam 15,mem_mesh_event_para_total_length
-	jam HCI_EVENT_INQUIRY_RESULT,mem_mesh_event_head_event_code
-	rtn
-p_hci_event_inquiry_result_with_rssi:
-	jam 15,mem_mesh_event_para_total_length
-	jam HCI_EVENT_INQUIRY_RESULT_WITHRSSI,mem_mesh_event_head_event_code
-	rtn
-p_hci_event_extended_inquiry_result:
-	jam 255,mem_mesh_event_para_total_length
-	jam HCI_EVENT_EXT_INQUIRY_RESULT,mem_mesh_event_head_event_code
-	rtn
-
-
-p_hci_send_inquiry_comple:
-	set0 mark_inquiry_on,mark
-	jam 1,mem_mesh_event_para_total_length
-	jam HCI_EVENT_INQUIRY_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0
-	istore 1,contw
-	branch ipc_hci_tx_start
-	
-	
-
-p_sniff_init:
-	bmark0 mark_sco_flag,p_sniff_init_acl
-	add clkn_bt,0,rega
-	branch p_sniff_init_master,master
-	add clke_bt,0,rega
-	branch p_sniff_init_master
-p_sniff_init_acl:
-	add clkn_bt,3,rega
-	branch p_sniff_init_master,master
-	add clke_bt,3,rega
-p_sniff_init_master:
-	fetcht 2,mem_tsniff
-	deposit rega
-	set0 27,pdata
-	idiv temp
-	fetch 2,mem_dsniff
-	call wait_div_end
-	remainder regc
-	isub regc,pdata
-	branch p_sniff_init_nowrap,positive
-	iadd temp,pdata
-p_sniff_init_nowrap:
-	iadd rega,pdata
-	store 4,mem_sniff_anchor
-	jam SWITCH_FLAG_INIT,mem_switch_flag
-	fetch 1,mem_state
-	set1 state_insniff,pdata
-	store 1,mem_state
-	fetch 1,mem_sniff_attempt
-	store 1,mem_current_sniff_attempt
-	setarg 0
-	store 3,mem_sniff_rcv
-	store 3,mem_sniff_lost
-	store 1,mem_sniff_unint_lost
-	fetch 2,mem_rx_window_sniff
-	store 2,mem_rx_window
-	nbranch  p_sniff_init_mode_change,master
-	add am_addr,-1,queue
-p_sniff_init_mode_change:
-	jam 0x02,mem_mesh_event_parameter_status
-	branch p_hci_send_mode_change
-
-p_sniff_exit:
-	fetch 1,mem_state
-	rtnbit0 state_insniff
-	set0 state_insniff,pdata
-	store 1,mem_state
-	fetch 2,mem_rx_window_init
-	store 2,mem_rx_window
-	disable wake
-	jam 0x00,mem_mesh_event_parameter_status
-	branch p_hci_send_mode_change
-
-p_hci_parse_connection_handle_check:
-	call p_ipc_rx_hci_data_two_byte
-	fetcht 1,mem_conn_handle
-	isub temp,null
-	rtn zero
-	branch p_hci_send_event_command_complete_error_command_disallowed
-
-p_hci_send_mode_change:
-	branch z_hci_send_mode_change
-
-p_roles_newconn_loop:
-	call master_newconn_once
-	branch p_roles_newconn_responded,sync
-	call new_conn_timeout
-	nbranch p_roles_newconn_loop,blank
-	disable clknt
-	deposit clke_bt
-	store 4,mem_next_btclk
-	rtn
-p_roles_newconn_responded:
-	jam 0,mem_mesh_event_parameter_status
-	call p_hci_send_role_change
-	branch roles_newconn_responded
-
-
-p_role_switch_master:
-	call role_switch_check
-	nrtn user
-	disable user
-	jam param_newconnto,mem_newconnto_counter
-	set0 mark_fhs_already_good,mark
-p_roles_waitfhs_loop:
-	call rf_setup_time_master_slot
-	call master_recv_packet
-	bmark1 mark_fhs_already_good,p_roles_replyto_fhs
-	call new_conn_timeout
-	nbranch p_roles_waitfhs_loop,blank
-p_role_switch_fail_master:
-	disable user
-	deposit clkn_bt
-	store 4,mem_next_btclk
-	enable clknt
-	enable master
-	branch p_hci_send_role_change_err
-	
-p_roles_replyto_fhs:
-	call rf_setup_time_slave_slot
-	arg type_id,type
-	call master_send_packet
-	disable clknt
-	disable master
-	call apply_switch_clke
-	call prepare_newconn
-p_roles_newconns_loop:
-	call slave_newconn_once
-	branch p_roles_newconns_responded,match
-	call new_conn_timeout
-	nbranch p_roles_newconns_loop,blank
-	branch p_role_switch_fail_master
-p_roles_newconns_responded:
-	force 1,temp
-	fetch 1,mem_mode
-	set0 mode_master,pdata
-	store 1,mem_mode
-	call supervision_flush
-	call calc_clke_offset
-	enable user
-	jam 1,mem_mesh_event_parameter_status
-	branch p_hci_send_role_change
-
-
-p_slave_disconnect:
-	//bpatch patch07_6,mem_patch07
-	jam 0,mem_tester_emulate
-	jam 0,mem_debug_config
-	call quit_connection
-	set0 mark_testmode,mark
-	call test_enable_white
-	fetch 1,mem_conn_status
-	rtn blank
-	branch p_hci_send_disconnect_complete		
-
-p_newconn_init:
-	call init_lmp_reinit
-	call new_conn_handle
-	sub pdata,15,null
-	nbranch p_newconn_handle_init,positive
-	branch newconn_init+3
-p_newconn_handle_init:
-	jam 1,mem_handle_num
-	branch newconn_init+3
-
-	
-p_hci_send_role_change:
-	jam 8,mem_mesh_event_para_total_length
-	jam HCI_EVENT_ROLE_CHANGE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	force 0,pdata
-	istore 1,contw
-	fetch 6,mem_plap
-	istore 6,contw
-	fetch 1,mem_mesh_event_parameter_status
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-p_hci_send_role_change_err:
-	jam 0,mem_mesh_event_parameter_status
-	nbranch p_hci_send_role_change_err_slave,master
-	jam 1,mem_mesh_event_parameter_status
-p_hci_send_role_change_err_slave:
-	jam 8,mem_mesh_event_para_total_length
-	jam HCI_EVENT_ROLE_CHANGE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	force 0x35,pdata
-	istore 1,contw
-	fetch 6,mem_plap
-	istore 6,contw
-	fetch 1,mem_mesh_event_parameter_status
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-p_parse_lmp_process:
-	//bpatchx patch2e_0,mem_patch2e
-	// set flag
-	arg LOG_POINT_1000,rega
-	fetcht 2,mem_rxbuf
-	call debug_log_print
-  	fetch 1,mem_lmi_opcode2
-	beq LMP_NOT_ACCEPTED,p_parse_lmp_not_accepted//multi
-	beq LMP_FEATURES_REQ,p_parse_lmp_features_req
-	beq LMP_HOST_CONNECTION_REQ,p_parse_lmp_conn_req
-	beq LMP_DETACH,p_parse_lmp_detach
- 	beq LMP_MAX_SLOT_REQ,p_parse_lmp_max_slot_req
-	beq LMP_FEATURES_RES,p_parse_lmp_features_res
-	beq LMP_AU_RAND,p_parse_lmp_au_rand
-	beq LMP_IN_RAND,p_parse_lmp_in_rand		//in_rand
-	beq LMP_START_ENCRYPTION_REQ, p_parse_lmp_start_encryption_req
-	beq LMP_SRES,p_parse_lmp_sres
-	beq LMP_SNIFF_REQ,p_parse_lmp_sniff_req
-
-	branch parse_lmp_process+5
-/* lmp is not recognized, check to see if we respond to all messages */ 
-/* rejecting the unrecognized message with PDU not recognized */
-//p_reject_unknown_packet:
-//	jam UNKNOWN_LMP_PDU,mem_lmo_reason2
-//p_reject_lmp_packet:
-//	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
-//	rtn
-
-p_parse_lmp_accepted:
-	fetch 1,mem_rxbuf+1
-	store 1,mem_lmi_accepted_opcode
-	beq LMP_START_ENCRYPTION_REQ,p_parse_lmp_accepted_start_enc//ok
-	branch parse_lmp_accepted+3
-
-p_parse_lmp_accepted_start_enc:
-	call parse_lmp_accepted_start_enc
-	branch p_hci_send_encryption_change_complete_event
-
-p_parse_lmp_start_encryption_req:
-	call parse_lmp_start_encryption_req+2
-	branch p_hci_send_encryption_change_complete_event
-	
-p_parse_lmp_sres:	
-	arg mem_plap,rega
-	call function_e1
-	fetch 4,mem_rxbuf+1
-	fetcht 4,mem_input_store
-	isub temp,null
-	branch p_authentication_event,zero
-	branch parse_lmp_sres+6
-p_authentication_event:
-	call authentication_ok
-	rtnmark1 mark_slave_in_rand_accepted
-	branch p_hci_send_auth_complete
-
-
-p_parse_lmp_sniff_req:
-	fetch 2,mem_default_link_policy_settings
-	bbit0 sniff_mode,lmp_reject_sniff
-	branch parse_lmp_sniff_req+1
-	
-
-p_parse_lmp_au_rand:
-	call push_tid_follow
-	store 1,mem_sres_tid
-	call lmp_copy_rand
-	jam LMP_SRES,mem_lmo_opcode2
-	fetch 1,mem_link_key_exists
-	nrtn blank
-	fetch 1,mem_state
-	rtnbit1 state_combkey		/* we have comb key, but not verified */
-	call parse_lmp_au_rand_1
-	// send link key request
-	branch p_hci_send_linkkey_req_event
-
-p_parse_lmp_detach:
-	fetch 1,mem_rxbuf+1
-	store 1,mem_disconn_reason_send
-//	branch parse_lmp_detach
-	call p_prepare_disconnect
-	branch accept_lmp_msg
-
-	//branch z_hci_send_disconnect_complete
-
-
-p_parse_lmp_in_rand:
-	call lmp_copy_rand
-	jam pincode_state_wait_pincode,mem_pincode_state
-	call p_hci_send_pincode_req_event
-	branch parse_lmp_in_rand_hci
-
-p_linkkey_ready:
-	fetch 1,mem_state
-	bbit1 state_linkkey,linkkey_set
-	fetch 1,mem_pairing_auth
-	branch linkkey_set,blank
-	jam DEFALT_PAIRING_AUTH,mem_pairing_auth
-	//jam BT_EVT_LINKKEY_GENERATE,mem_fifo_temp
-	//call ui_ipc_send_event
-	
-	fetch 1,mem_op
-	isolate1 op_auth_req,pdata
-	set0 op_auth_req,pdata
-	store 1,mem_op
-//	call p_hci_send_auth_complete,true
-	call linkkey_set
-	rtnmark1 mark_slave_in_rand_accepted
-	branch z_hci_send_linkkey_notification
-
-
-
-p_hci_send_auth_complete:
-	jam 3,mem_mesh_event_para_total_length
-	jam HCI_EVENT_AUTHENTICATION_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	force 0,pdata
-	istore 1,contw
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-p_hci_send_linkkey_req_event:
-	//BD_ADDR(6)
-	jam 6,mem_mesh_event_para_total_length
-	jam HCI_EVENT_LINK_KEY_REQUEST,mem_mesh_event_head_event_code
-p_hci_send_sec_req:	//used by linkkey and pin req 
-	call p_hci_prepare_send_event
-	fetch 6,mem_plap
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-p_hci_send_pincode_req_event:
-	//BD_ADDR(6)
-	jam 6,mem_mesh_event_para_total_length
-	jam HCI_EVENT_PIN_CODE_REQUEST,mem_mesh_event_head_event_code
-	branch p_hci_send_sec_req
-
-p_parse_lmp_conn_req:
-	branch p_hci_send_conn_req_event
-
-p_hci_send_conn_req_event:
-	fetch 1,mem_conn_req_status
-	beq 1,p_hci_send_conn_req_event_estimate
-p_hci_send_conn_req_event_1:
-	call p_classic_connection_init
-	//BD_ADDR(6), Class_of_Device(3), Link_Type(1)
-	jam 10,mem_mesh_event_para_total_length
-	jam HCI_EVENT_CONNECTION_REQUEST,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	//call hci_write_plap
-	fetch 6,mem_plap
-	istore 6,contw
-	// class of device
-	fetch 3,extm_class
-	istore 3,contw
-	// link type, 0:SCO, 1:ACL
-	setarg 1
- 	istore 1,contw
-	fetch 6,mem_plap
-	store 6,mem_bd_addr_new
-	branch ipc_hci_tx_start
-p_hci_send_conn_req_event_estimate:
-	fetch 6,mem_bd_addr_new
-	fetcht 6,mem_plap
-	isub temp,null
-	branch p_hci_send_conn_req_event_1,zero
-	rtn	
-
-p_classic_connection_init:
-	jam 1,mem_conn_req_status
-	jam 0,mem_conn_status
-	//setarg 0
-	//store 8,mem_remote_features
-	//store 8,mem_remote_ext_features0
-	//store 8,mem_remote_ext_features1
-	rtn
-
-p_ipc_rx_process:
-	fetch 1,mem_ipc_enable
-	rtn blank
-	call ipc_rx_items_inquire
-	rtn zero // no data
-	icopy contr
-	call ipc_rx_byte_read
-
-	beq IPC_TYPE_CM0_TO_BT_DATA,ipc_rx_data_buf
-	branch ipc_rx_process+7
-
-p_ipc_notify_m0_wakeup_flag_init:
-	jam 1,mem_wake_flag
-	rtn wake
-	jam 0,mem_wake_flag
-	rtn
-ifdef FUNCTION_WATCH_DOG
-p_wdt_kick_watchdog:
-	//fetch 1,mem_ota_wdt_en_flag
-	//beq 0xaa,p_ota_change_code_wdt
-	call wdt_set_watchdog_mode_reset
-	branch wdt_kick_watchdog_1_5s
-endif //FUNCTION_WATCH_DOG
-//p_ota_change_code_wdt:
-//	fetch 1,mem_ota_wdt_m0_en
-//	beq 0x55,p_wdt_kick_watchdog+2
-//	rtn
-
-
-// input: contw,loopcnt
-// output: null
-p_ipc_rx_hci_data_n_byte:
-	call p_ipc_rx_restore_contr
-	call memcpy_fast
-	branch p_ipc_rx_store_contr
-
-p_ipc_rx_hci_data_two_byte:
-	call p_ipc_rx_restore_contr
-	ifetch 2,contr
-	branch p_ipc_rx_store_contr
-p_ipc_rx_hci_data_thr_byte:
-	call p_ipc_rx_restore_contr
-	ifetch 3,contr
-	branch p_ipc_rx_store_contr
-p_ipc_rx_hci_data_six_byte:
-	call p_ipc_rx_restore_contr
-	ifetch 6,contr
-	branch p_ipc_rx_store_contr
-p_ipc_rx_hci_data_seven_byte:
-	call p_ipc_rx_restore_contr
-	ifetch 7,contr
-	branch p_ipc_rx_store_contr
-p_ipc_rx_hci_data_eight_byte:
-	call p_ipc_rx_restore_contr
-	ifetch 8,contr
-	branch p_ipc_rx_store_contr
-
-p_ipc_rx_hci_data_one_byte:
-	call p_ipc_rx_restore_contr
-	ifetch 1,contr
-p_ipc_rx_store_contr:
-	copy contr,temp
-p_ipc_rx_store_contr1:
-	storet 3,mem_ipc_rx_ptr
-	rtn
-	
-p_ipc_rx_restore_contr:
-	fetcht 3,mem_ipc_rx_ptr
-	copy temp,contr
-	rtn
-
-/*
-p_hci_parse_packet_acl:
-	call le_fifo_check_full
-	nrtn blank
-	hfetch 2,core_uart_rxitems
-	add pdata,-5,rega
-	nrtn positive
-	call p_hci_parse_packet_acl_FB_flag
-	ifetch 2,contru
-	increase 1,rega		//´َسعµبسع
-	isub rega,null
-	rtn positive
-	copy pdata,rega
-	copy pdata,regb
-	call le_fifo_malloc_tx
-	copy regb,loopcnt
-	call uart_copy_rx_bytes_fast
-	call uartd_prepare_rx
-	increase 3,contru
-	ifetch 2,contru
-	iadd contru,contru
-	fetch 1,mem_mesh_recevie_acl_packet_number
-	pincrease 1
-	store 1,mem_mesh_recevie_acl_packet_number
-	branch uartd_rxdone
-
-p_hci_parse_packet_acl_FB_flag:
-	ifetch 2,contru
-	rshift8 pdata,pdata
-	rshift4 pdata,pdata
-	force LLID_CONTINUE,type
-	rtneq BT_ACL_CONT
-	force LLID_START,type
-	rtn
-*/
-ifdef ipc_zcode_test
-p_hci_parse_packet_cmd:
-	call p_ipc_rx_hci_data_two_byte// Opcode
-	store 2,mem_mesh_hci_opcode
-	arg 0x3ff,temp
-	iand temp,temp	//low 10bit
-	storet 2,mem_mesh_hci_opcode_ocf
-	rshift2 pdata,pdata
-	rshift8 pdata,pdata	//high 6bit
-	store 1,mem_mesh_hci_opcode_ogf
-	call p_ipc_rx_hci_data_one_byte	// parameter total length
-	store 1,mem_mesh_hci_cmd_len
-	//branch p_hci_parse_complete_packet
-p_hci_parse_complete_packet:
-	branch z_hci_parse_complete_packet
-endif
-
-/*********
-	HCI_OGF_LINK_CONTROL
-*********/
-
-
-
-p_hci_control_disconnect_le:
-	fetch 1,mem_disconn_reason_send
-	store 1,mem_temp
-	call le_send_terminate_ind
-	branch p_hci_send_event_command_status
-
-
-
-/*********
-	HCI_OGF_LINK_POLICY
-*********/
-
-
-/*********
-	HCI_OGF_CONTROLLER_AND_BASEBAND
-*********/
-
-
-
-	
-p_hci_init_parameter:
-	setarg DEFAULT_LE_EVENT_MASK
-	store 8,mem_mesh_le_event_mask
-	setarg DEFAULT_EVENT_MASK
-	store 8,mem_mesh_event_mask
-	setarg 0
-	store 6,mem_mesh_le_random_address
-	store 1,mem_le_adv_enable
-	store 1,mem_le_scan_enable
-	store 1,mem_scan_mode
-p_hci_init_bd_address:
-	fetch 6,mem_device_public_address
-	store 6,mem_le_lap
-	store 6,mem_lap
-	rtn
-	
-/*********
-	HCI_OGF_LE_CONTROLLER
-*********/
-	
-p_hci_parse_packet_cmd_ogf_le_controller_read_remote_features:
-	call p_ipc_rx_hci_data_two_byte 		//connection handle
-	call p_hci_send_event_command_status
-	branch p_le_send_feature_req
-
-
-p_hci_parse_packet_cmd_ogf_le_controller_connection_update:
-p_hci_parse_packet_cmd_ogf_le_controller_encrypt:
-p_hci_parse_packet_cmd_ogf_le_controller_rand:
-p_hci_parse_packet_cmd_ogf_le_controller_start_encryption:
-p_hci_parse_packet_cmd_ogf_le_controller_ltk_request_reply:
-p_hci_parse_packet_cmd_ogf_le_controller_ltk_request_negative_reply:
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-
-
-// input: rega	return pdata=0:true  pdata = 1:false
-p_check_addr_in_white_list:
-ifdef WHITE_LIST
-	fetch 1,mem_le_white_list_cnt
-	copy pdata,loopcnt
-	arg mem_le_white_list,regb
-p_check_addr_in_white_list_loop:
-	ifetch 7,regb
-	fetcht 7,mem_le_white_list_type_and_bd_addr
-	isub temp,null
-	setarg 0
-	rtn zero
-	increase 7,regb
-	loop p_check_addr_in_white_list_loop
-	setarg 1
-endif
-	rtn
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// input: regb: payload ptr
-ipc_tx_bt_data_buf_free:
-	jam IPC_DATA_SUBTYPE_FREE,mem_ipc_data_tx_buf_subtype
-	branch ipc_tx_bt_data_buf_with_type
-
-// input: regb: payload ptr
-ipc_tx_bt_data_buf_hci:
-	jam IPC_DATA_SUBTYPE_HCI,mem_ipc_data_tx_buf_subtype
-	branch ipc_tx_bt_data_buf_with_type
-
-// input: regb: payload ptr
-//ipc_tx_bt_data_buf_ble:
-//	jam IPC_DATA_SUBTYPE_BLE,mem_ipc_data_tx_buf_subtype
-//	branch ipc_tx_bt_data_buf_with_type
-
-// input: regb: payload ptr
-//ipc_tx_bt_data_buf_br:
-//	jam IPC_DATA_SUBTYPE_SPP,mem_ipc_data_tx_buf_subtype
-//	branch ipc_tx_bt_data_buf_with_type
-	
-ipc_tx_bt_data_buf_with_type:
-	storer regb,3,mem_ipc_data_tx_buf_payload_ptr
-// input: mem_ipc_tx_data_buf_subtype, mem_ipc_data_buf_payload_ptr
-ipc_tx_bt_data_buf:
-ifdef TEST_QUEUE_DEBUG
-	arg 0x7100,rega
-	fetcht 1,mem_ipc_data_tx_buf_subtype
-	call debug_log_print
-	arg 0x7101,rega
-	fetcht 2,mem_ipc_data_tx_buf_payload_ptr
-	call debug_log_print
-endif
-
-	//fetch 1,mem_ipc_enable
-	//rtn blank
-	setarg mem_ipc_tx_buf
-	store 2,mem_ipc_tx_data_ptr
-	icopy contw
-	setarg IPC_TYPE_BT_TO_CM0_DATA
-	istore 1,contw
-	force 4,pdata // len
-	istore 1,contw
-	
-	fetch 1,mem_ipc_data_tx_buf_subtype
-	istore 1,contw
-	
-	fetch 3,mem_ipc_data_tx_buf_payload_ptr
-	istore 3,contw
-
-	 // total len
-	force 6,pdata
-	store 1,mem_ipc_tx_data_len
-	branch ipc_tx_common
-	
-ifdef ipc_zcode_test
-p_ipc_rx_hci:
-	fetcht 3,mem_ipc_data_rx_buf_payload_ptr
-	call p_ipc_rx_store_contr1
-	call p_ipc_rx_hci_data_one_byte
-	beq HCI_H4_TYPE_CMD,p_hci_parse_packet_cmd
-	beq HCI_H4_TYPE_ACL,p_hci_parse_packet_acl
-	branch assert
-endif
-
-ipc_rx_data_buf_sub_hci_data:
-	call z_ipc_rx_hci
-	fetchr regb,3,mem_ipc_data_rx_buf_payload_ptr
-	branch ipc_tx_bt_data_buf_free
-
-
-ipc_rx_data_buf_sub_free_buf:
-	fetchr regb,3,mem_ipc_data_rx_buf_payload_ptr
-	branch free_buffer
-
-
-ipc_rx_data_buf:
-	// ipc total length
-	call ipc_rx_byte_read
-	// subType
-	call ipc_rx_byte_read
-	store 1,mem_ipc_data_rx_buf_subtype
-	arg 3,loopcnt
-	arg mem_ipc_data_rx_buf_payload_ptr,contw
-	call ipc_rx_block_read
-
-ifdef TEST_QUEUE_DEBUG
-	arg 0x7000,rega
-	fetcht 1,mem_ipc_data_rx_buf_subtype
-	call debug_log_print
-	arg 0x7001,rega
-	fetcht 2,mem_ipc_data_rx_buf_payload_ptr
-	call debug_log_print
-endif
-
-	fetch 1,mem_ipc_data_rx_buf_subtype
-	beq IPC_DATA_SUBTYPE_FREE,ipc_rx_data_buf_sub_free_buf
-	beq IPC_DATA_SUBTYPE_HCI,ipc_rx_data_buf_sub_hci_data
-	branch assert
-
-
-
-
-ifdef ipc_zcode_test
-p_hci_parse_packet_acl:
-	call p_ipc_rx_hci_data_two_byte// Opcode
-	store 1,mem_hci_conn_handle
-	call p_hci_parse_packet_acl_FB_flag
-	call p_ipc_rx_hci_data_two_byte// length
-	store 2,mem_temp
-
-	call context_search_conn_handle
-	// TODO: here need change to other work.
-	nrtn zero
-
-	// check is classic or ble
-	add rega,coffset_mode,contr
-	ifetch 1,contr
-	bbit1 mode_le,p_hci_parse_packet_acl_le
-p_hci_parse_packet_acl_classic:
-	fetch 2,mem_temp
-	store 2,mem_alloc_buffer_len
-	call malloc_buffer_is_enough
-	call ice_break,blank
-
-	
-	fetch 2,mem_temp
-	copy pdata,rega
-	copy pdata,regb
-	//TODO: classic need do here
-	call l2cap_malloc//return with pdata ptr
-	copy regb,contw
-	// l2cap payload header
-	fetch 2,mem_temp
-	istore 2,contw
-	istorer type,1,contw
-p_hci_parse_packet_acl_end:
-	fetch 2,mem_temp
-	copy pdata,loopcnt
-	call p_ipc_rx_restore_contr
-	branch memcpy_fast
-	
-
-p_hci_parse_packet_acl_le:	
-	// Think to judge classic or ble.
-	fetch 2,mem_temp	
-	call p_le_fifo_check_full
-	nrtn blank
-	fetch 2,mem_temp
-	copy pdata,rega
-	copy pdata,regb
-	call le_fifo_malloc_tx
-	branch p_hci_parse_packet_acl_end
-
-p_hci_parse_packet_acl_FB_flag:
-	rshift8 pdata,pdata
-	rshift4 pdata,pdata
-	force LLID_CONTINUE,type
-	rtneq BT_ACL_CONT
-	force LLID_START,type
-	rtn
-
-p_le_fifo_check_full:
-	call malloc_buffer_is_full_raw
-	branch setarg1,blank
-	branch setarg0	
-endif
-
-
-
-
-p_hci_send_event_command_complete_error_command_invalid_param:
-	jam COMMAND_INVALID_HCI_COMMAND_PARAMETERS,mem_mesh_command_complete_return_parameter_status
-	branch p_hci_send_event_command_complete_without_payload+1
-p_hci_send_event_command_complete_error_command_nuknown:
-	jam COMMAND_UNKNOWN,mem_mesh_command_complete_return_parameter_status
-	branch p_hci_send_event_command_complete_without_payload+1
-p_hci_send_event_command_complete_error_command_disallowed:
-	jam COMMAND_DISALLOWED,mem_mesh_command_complete_return_parameter_status
-	branch p_hci_send_event_command_complete_without_payload+1
-p_hci_send_event_command_complete_without_payload:
-	jam COMMAND_SUCCEEDED,mem_mesh_command_complete_return_parameter_status
-	arg 1,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status
-	branch ipc_hci_tx_start
-	
-p_hci_prepare_send_event_command_complete_with_status_success:
-	jam COMMAND_SUCCEEDED,mem_mesh_command_complete_return_parameter_status
-p_hci_prepare_send_event_command_complete_with_status:
-	call p_hci_prepare_send_event_command_complete
-	fetch 1,mem_mesh_command_complete_return_parameter_status
-	istore 1,contw
-	rtn
-
-p_hci_prepare_send_event_command_complete:
-	jam HCI_EVENT_COMMAND_COMPLETE,mem_mesh_event_head_event_code
-	add loopcnt,3,pdata
-	store 1,mem_mesh_event_para_total_length
-	call p_hci_prepare_send_event
-	//Num_HCI_Command_Packets(1Byte), Command_Opcode(2Byte)
-	fetch 3,mem_mesh_command_complete_num_hci_command_packet
-	istore 3,contw
-	rtn
-
-p_hci_send_event_command_status:
-	jam COMMAND_CURRENTLY_PENDING,mem_temp
-	branch p_hci_send_event_command_status_raw
-p_hci_send_event_command_status_err_command_disallowed:
-	jam COMMAND_DISALLOWED,mem_temp
-	branch p_hci_send_event_command_status_raw
-p_hci_send_event_command_status_err_unknown_connection:
-	jam HCI_ERROR_NO_CONNECTION,mem_temp
-p_hci_send_event_command_status_raw:
-	jam HCI_EVENT_COMMAND_STATUS,mem_mesh_event_head_event_code
-	jam 4,mem_mesh_event_para_total_length
-	call p_hci_prepare_send_event
-	fetch 1,mem_temp
-	istore 1,contw
-	fetch 3,mem_mesh_command_complete_num_hci_command_packet
-	istore 3,contw
-	branch ipc_hci_tx_start
-
-p_hci_send_event_le_disconnection_complete:
-	fetch 8,mem_mesh_le_event_mask
-	rtnbit0 DISCONNECTION_COMPLETE_EVENT
-	fetch 1,mem_le_conn_handle
-	store 1,mem_hci_record_disc_conn_handle
-	branch z_hci_send_disconnect_complete
-p_hci_send_disconnect_complete:
-	//status(1), connection_handle(2), Reason(1)
-	fetch 1,mem_conn_handle
-	store 1,mem_hci_record_disc_conn_handle
-p_hci_send_disconnect_complete_init_connection_classic:
-	set0 mark_slave_in_rand_accepted,mark
-	jam 0,mem_conn_handle
-	jam 0,mem_conn_req_status
-	jam 0,mem_conn_status
-	branch z_hci_send_disconnect_complete
-
-
-p_le_get_role:
-	fetch 1,mem_le_mode
-	arg HCI_ROLE_MASTER,temp
-	rtneq lemode_master
-	arg HCI_ROLE_SLAVE,temp
-	rtn
-
-
-
-le_scan_check_event_type:
-	fetch 1,mem_le_rxbuf
-	and pdata,0x0f,pdata
-	arg 0,temp		//adv ind
-	rtneq ADV_IND
-	arg 1,temp		//adv direct ind
-	rtneq ADV_DIRECT_IND
-	arg 2,temp
-	rtneq ADV_SCAN_IND
-	arg 3,temp
-	rtneq ADV_NONCONN_IND
-	arg 4,temp
-//	rtneq SCAN_RSP
-	rtn
-
-p_hci_send_event_le_advertising_report:
-	fetch 8,mem_mesh_le_event_mask
-	rtnbit0 LE_ADVERTISING_REPORT_EVENT
-	arg 6,pdata
-	fetcht 1,mem_le_rxbuf+1	//length
-	iadd temp,pdata
-	store 1,mem_mesh_event_para_total_length
-
-	increase 3,pdata // evt type(04), evt code
-	store 2,mem_alloc_buffer_len
-	call malloc_buffer_is_enough
-	rtn blank
-
-	jam HCI_EVENT_LE_META_EVENT,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-
-	setarg HCI_LE_SUBEVENT_ADV_REPORT
-	istore 1,contw		//subevent code
-	setarg 0x01
-	istore 1,contw		//Num reprot only 1
-	call le_scan_check_event_type
-	istoret 1,contw		//event type is ADV_IND
-	call le_scan_check_sender_addr_type
-	copy rega,pdata
-	istore 1,contw		//event type
-	fetcht 1,mem_le_rxbuf+1 //length
-	increase -6,temp
-	//fetch 6,mem_le_plap
-	ifetch 6,contr			//addr type
-	istore 6,contw
-	istoret 1,contw
-	copy temp,loopcnt
-	call memcpy_fast
-	call p_rssi_convert
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-
-
-
-
-
-
-
-
-
-p_hci_send_event_number_of_completed_packet_classic:
-	fetch 1,mem_conn_handle
-	store 1,mem_hci_conn_handle
-	branch p_hci_send_event_number_of_completed_packet
-p_hci_send_event_number_of_completed_packet_le:
-	fetch 1,mem_le_conn_handle
-	store 1,mem_hci_conn_handle
-p_hci_send_event_number_of_completed_packet:
-	jam 5,mem_mesh_event_para_total_length
-	jam HCI_EVENT_NUM_COMPLETED_PACKETS,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0x01 // Number of Handles: 1
-	istore 1,contw
-	fetch 1,mem_hci_conn_handle
-	istore 2,contw
-	setarg 0x01 // Num Completed Packets: 1
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-//mem_mesh_event_head_event_code:event code
-//mem_mesh_event_para_total_length:parameter total length
-p_hci_prepare_send_event:
-	fetch 1,mem_mesh_event_para_total_length
-	increase 3,pdata // evt type(04)(1Byte), evt code(1Byte), evt len(1Byte)
-	store 2,mem_alloc_buffer_len
-
-	call ipc_hci_prepare_tx
-
-	fetch 3,mem_mesh_event_head_type
-	istore 3,contw
-	rtn
-
-ipc_hci_prepare_tx:
-	call malloc_hci_snd_buffer
-	copy regb,contw
-	rtn
-	
-ipc_hci_tx_start:
-	arg mem_snd_hci_block,rega
-	call queue_delete
-	branch ipc_tx_bt_data_buf_hci
-
-p_le_send_empty:
-	force 0,temp
-	force 1,type
-p_le_send_packet:
-	storet 1,mem_le_txlen_temp
-	fetcht 1,mem_le_arq
-	set1 wak,temp
-	and temp,0xfc,pdata
-	ior type,pdata
-	store 1,mem_le_arq
-	and_into 0x1f,pdata
-	isolate1 mark_ble_tx_md,mark
-	setflag true,md,pdata
-	store 1,mem_le_txheader_temp
-	rtn
-
-
-
-p_le_prepare_tx:
-	fetch 1,mem_le_arq
-	rtnbit1 wak
-
-	call p_le_check_tx_md
-	
-	call p_le_malloc_fifo_out
-	branch p_le_send_empty,blank	
-	ifetch 1,contr		//total length
-	ifetchr rega,1,contr	//offset	
-	isub rega,pdata
-	copy contr,contw
-	fetcht 2,mem_remote_rx_max_octets
-	call not_greater_than
-	copy pdata,temp
-	copy contw,contr
-	ifetchr type,1,contr
-	copy rega,pdata
-	iadd contr,contr   
-	arg mem_le_txpayload_temp,contw
-	copy temp,loopcnt
-	call memcpy_fast	
-	call le_update_tx_type
-	call p_le_send_packet
-
-	call p_le_malloc_fifo_out
-	ifetch 1,contr
-	copy pdata,rega
-	copy contr, regd
-	ifetchr regb,1,contr
-	isub regb,pdata
-	fetcht 2,mem_remote_rx_max_octets
-	call not_greater_than
-	iadd regb,pdata
-	istore 1,regd  	//update offset
-	isub rega,null
-	nrtn zero
-	branch le_fifo_release_first_node
-
-p_le_check_tx_md:
-	fetch 1,mem_le_more_data
-	branch le_clear_md,blank
-	
-	call p_le_check_continue
-	rtnmark1 mark_ble_tx_md
-	
-	arg mem_snd_ble_block,rega
-	call p_queue_get_len	
-	beq 0,le_clear_md
-	beq 1,le_clear_md
-	set1 mark_ble_tx_md,mark
-	rtn
-
-p_le_check_continue:
-	call p_le_malloc_fifo_out
-	branch le_clear_md,blank
-	ifetch 1,contr				//pdata:length
-	ifetcht 1,contr				//temp:offest
-	isub temp,temp			//temp:length - offset
-	fetch 2,mem_remote_rx_max_octets
-	isub temp,null
-	branch le_clear_md,positive				//27 > length -offset
-	set1 mark_ble_tx_md,mark
-	rtn
-
-p_le_malloc_fifo_out:
-	arg mem_snd_ble_block,rega
-	branch queue_get_read_ptr		
-
-
-p_le_transmit_norx:
-	call p_le_transmit
-	branch end_of_packet
-
-
-p_le_transmit:
-	call le_prep
-	call letx_setfreq
-	call rf_debug_active_tx_line
-	set1 TXGFSK,radio_ctrl
-	enable encode_fec0
-	enable is_tx
-	disable is_rx
-	call le_wait_tx
-	rshift16 access,pdata
-	rshift8 pdata,pdata
-	rshift4 pdata,pdata
-	inject mod,40
-	enable enable_white
-	enable enable_crc
-p_le_transmit0:	
-	fetch 1,mem_le_txheader_temp
-	inject mod,8
-	ifetch 1,contr
-	copy pdata,loopcnt
-	inject mod,8
-	branch letr_nopayload,zero
-	branch letr_loop	
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-p_le_slave_match:
-ifdef RF_DEBUG
-	call rf_debug_active_sync_line
-endif
-	call le_got_first_packet
-	call le_acknowledge
-	call p_le_prepare_tx
-	call p_le_transmit_norx
-	call p_le_parse
-	call le_check_md
-	branch p_le_slave_more_data,user
-	branch le_slave_cont
-	
-
-	
-p_le_create_conn:
-	fetch 6,mem_le_plap
-	fetcht 6,mem_le_conn_peer_addr
-	isub temp,null
-	nrtn zero
-	call context_new
-	nrtn zero
-	call le_connect_request
-	call le_init_master
-	jam 0,mem_hci_cmd
-	jam 0,mem_le_peer_sca
-
-	call le_create_conn_ndongle
-
-	//arg MASTER_CONNECTION_HANDLE,temp
-	branch z_hci_send_event_le_connection_complete
-
-
-
-	
-
-p_le_parse_ll:
-//	fetch 2,mem_le_payload_ptr
-//	copy pdata,contr
-//	ifetch 1,contr
-	fetch 1,mem_le_rxbuf+2
-	beq LL_TERMINATE_IND,p_le_parse_terminate_ind
-	beq LL_FEATURE_REQ,p_le_parse_feature_req
-	beq LL_FEATURE_RSP,p_le_parse_feature_rsp
-	beq LL_VERSION_IND,p_le_parse_version_ind
-	beq LL_CHANNEL_MAP_REQ,p_le_parse_channel_map_req
-	beq LL_LENGTH_REQ,p_le_parse_length_request
-	beq LL_LENGTH_RSP,p_le_parse_length_rsp
-	branch le_parse_ll+2
-
-p_le_parse_channel_map_req:
-	ifetch 5,contr
-	store 5,mem_le_new_map
-	ifetch 2,contr
-	store 2,mem_le_instant
-	fetcht 2,mem_le_event_count
-	isub temp,null
-	nbranch le_parse_terminate_ind,positive
-	fetch 1,mem_le_state
-	set1 lestate_update_map,pdata
-	store 1,mem_le_state
-	rtn	
-
-
-
-//input pdata, temp,return temp
-p_return_small:
-	isub temp,null
-	rtn positive
-	copy pdata,temp
-	rtn
-
-p_le_parse_length_rsp:
-	ifetch 8,contr
-	store 8,mem_remote_rx_max_octets
-
-	fetch 2,mem_remote_rx_max_octets
-	fetcht 2,mem_local_tx_max_octets
-	call p_return_small
-	storet 2,mem_remote_rx_max_octets
-	
-	fetch 2,mem_remote_tx_max_octets
-	fetcht 2,mem_local_rx_max_octets
-	call p_return_small
-	storet 2,mem_remote_tx_max_octets
-	branch z_hci_send_event_le_connection_data_length_change
-	
-p_le_parse_length_request:
-	call p_le_parse_length_rsp
-	//branch p_le_send_data_length_res
-//p_le_send_data_length_res:
-//	arg LL_LENGTH_RSP,regb
-p_le_send_data_length:
-	arg 9,rega
-//	call le_fifo_malloc_tx_ll
-	arg LLID_LE_LL,type
-	call le_fifo_malloc_tx
-	setarg LL_LENGTH_RSP
-	istore 1,contw
-	fetch 8,mem_local_rx_max_octets
-	istore 8,contw
-	rtn
-
-p_le_send_data_length_req:
-	arg LL_LENGTH_REQ,regb
-	branch p_le_send_data_length
-
-p_le_parse_feature_req:
-	call p_le_parse_feature_rsp
-	arg 9,rega
-	arg LLID_LE_LL,type
-	call le_fifo_malloc_tx
-	setarg LL_FEATURE_RSP
-	istore 1,contw
-	fetch 8,mem_le_features
-	istore 8,contw
-	rtn	
-
-p_le_parse_feature_rsp:
-	ifetch 8,contr
-	store 8,mem_mesh_le_features
-	branch z_hci_send_le_read_remote_features_complete
-
-p_le_parse_terminate_ind:
-	ifetch 1,contr
-	store 1,mem_disconn_reason_send
-	branch le_parse_terminate_ind
-
-p_le_parse_version_ind:
-	ifetch 5,contr
-	store 5,mem_mesh_le_version
-	branch  z_hci_send_read_remote_version_information_complete,master
-	fetch 1,mem_mesh_le_version_exchange_times
-	nrtn blank
-	pincrease 1
-	store 1,mem_mesh_le_version_exchange_times
-	branch le_send_version_ind
-
-p_le_send_feature_req:
-	arg 9,rega
-//	arg LL_FEATURE_REQ,regb
-//	call le_fifo_malloc_tx_ll
-	arg LLID_LE_LL,type
-	call le_fifo_malloc_tx
-	setarg LL_FEATURE_REQ
-	istore 1,contw
-	fetch 8,mem_le_features
-	istore 8,contw
-	rtn
-
-
-//p_hci_prepare_send_acl:
-//	fetch 2,mem_hci_acl_packet_len_recved
-//	increase 5,pdata // acl type(02)(1Byte), handle(2Byte), length(2Byte)
-//	store 2,mem_alloc_buffer_len
-
-//	branch ipc_hci_prepare_tx
-
-//p_hci_send_acl_encode_le:
-//	fetch 1,mem_le_packet_llid
-//	store 1,mem_hci_acl_packet_pb_flag
-//	fetch 2,mem_le_payload_ptr
-//	store 2,mem_hci_acl_packet_payload_ptr
-//	fetch 2,mem_le_l2cap_size
-//	store 2,mem_hci_acl_packet_len_recved
-//	fetch 1,mem_le_conn_handle
-//	store 2,mem_hci_conn_handle
-//p_hci_send_acl_encode:
-//	call p_hci_prepare_send_acl
-//	setarg HCI_H4_TYPE_ACL
-//	istore 1,contw
-//	fetch 1,mem_hci_conn_handle
-//	fetcht 1,mem_hci_acl_packet_pb_flag
-//	lshift8 temp,temp
-//	lshift4 temp,temp
-//	ior temp,pdata
-//	istore 2,contw
-
-//	fetcht 2,mem_hci_acl_packet_len_recved
-//	istoret 2,contw //length
-//	copy temp,loopcnt
-//	fetch 2,mem_hci_acl_packet_payload_ptr
-//	copy pdata,contr
-//	call memcpy_fast
-
-//	branch ipc_hci_tx_start
-
-
-p_hci_send_acl_encode_classic:
-	call p_get_br_rcv_ptr
-	store 3,mem_hci_acl_packet_payload_ptr
-	//free buffer
-	setarg 0
-	store 3,mem_rcv_br_queue_ptr
-
-	fetch 1,mem_conn_handle
-	store 1,mem_hci_conn_handle
-	jam IPC_DATA_SUBTYPE_ACL_CLASSIC,mem_ipc_data_tx_buf_subtype
-
-ifdef TEST_QUEUE_DEBUG
-	arg 0x7100,rega
-	fetcht 1,mem_ipc_data_tx_buf_subtype
-	call debug_log_print
-	arg 0x7101,rega
-	fetcht 2,mem_hci_acl_packet_payload_ptr
-	call debug_log_print
-endif
-
-	branch p_hci_send_acl_encode
-p_hci_send_acl_encode_le:
-	call p_get_ble_rcv_ptr
-	store 3,mem_hci_acl_packet_payload_ptr
-	//free buffer
-	setarg 0
-	store 3,mem_rcv_ble_queue_ptr
-
-	fetch 1,mem_le_conn_handle
-	store 1,mem_hci_conn_handle
-	jam IPC_DATA_SUBTYPE_ACL_BLE,mem_ipc_data_tx_buf_subtype
-p_hci_send_acl_encode:
-	setarg mem_ipc_tx_buf
-	store 2,mem_ipc_tx_data_ptr
-	icopy contw
-	setarg IPC_TYPE_BT_TO_CM0_DATA
-	istore 1,contw
-	force 6,pdata // len
-	istore 1,contw
-	
-	fetch 1,mem_ipc_data_tx_buf_subtype
-	istore 1,contw
-	
-	fetch 3,mem_hci_acl_packet_payload_ptr
-	istore 3,contw
-
-	fetch 1,mem_hci_conn_handle
-	istore 2,contw
-	
-
-	 // total len
-	force 8,pdata
-	store 1,mem_ipc_tx_data_len
-	
-	branch ipc_tx_common
-
-	
-
-p_parse_connect_req:
-//	fetch 1,mem_le_state
-//	rtnbit1 state_inconn
-	fetch 1,mem_le_rxbuf
-	fetcht 6,mem_le_lap
-	bbit1 LE_RECEIVER_ADDR_BIT,p_parse_connect_req_random_addr
-	branch p_parse_connect_req_public_addr
-p_parse_connect_req_random_addr:
-	fetcht 6,mem_mesh_le_random_address
-p_parse_connect_req_public_addr:
-	fetch 6,mem_le_rxbuf+8
-	isub temp,null
-	nrtn zero
-	call parse_connect_req+5
-	//arg SLAVE_CONNECTION_HANDLE,temp
-	//fetch 2,mem_le_init_superto
-	//store 2,mem_le_superto
-	branch z_hci_send_event_le_connection_complete
-
-p_le_init_conn:
-	call le_init_conn+1
-	jam 1,mem_le_txheader_temp
-	jam 0,mem_le_txlen_temp
-	setarg 27
-	store 2,mem_remote_rx_max_octets
-	call new_conn_handle
-	pincrease 24
-	store 1,mem_le_conn_handle
-	rtn	
-
-
-p_le_conn_dispatch:
-	call le_enable
-	call app_process_ble
-	fetch 1,mem_le_mode
-	beq lemode_master,p_le_master_dispatch
-	branch le_slave_dispatch
-
-
-
-
-
-p_le_transmit_receive_sifs_master:
-	call p_le_transmit
-	branch p_le_transmit_receive_sifs_notx_slave
-
-
-p_le_master_dispatch:
-	enable master
-	call le_supervision_update
-	branch p_le_master_disconn,positive
-	call le_setup
-	call p_le_prepare_tx
-	disable match
-	call p_le_transmit_receive_sifs_master
-	nbranch p_le_master_not_match,match
-p_le_master_match:
-ifdef RF_DEBUG
-	call rf_debug_active_sync_line
-endif
-	call p_le_got_first_packet
-ifdef LE_CONN_RCV_DEBUG	
-	fetch 1,mem_le_conn_rcv
-	pincrease 1
-	store 1,mem_le_conn_rcv
-endif	
-	call le_acknowledge
-	call p_le_parse
-	call le_check_md
-	branch p_le_master_more_data,user
-p_le_master_cont:
-	disable master
-	branch end_of_packet
-
-p_le_master_more_data:
-	call p_le_prepare_tx
-	call p_le_transmit_norx_master
-	enable attempt
-	call p_le_transmit_receive_sifs_notx_slave
-	branch p_le_master_match,match
-	branch p_le_master_cont
-
-
-p_le_transmit_norx_master:
-	call p_le_transmit_master
-	branch end_of_packet
-	
-p_le_transmit_master:
-	call le_prep
-	call letx_setfreq
-ifdef RF_DEBUG
-	call rf_debug_active_tx_line
-endif
-	set1 TXGFSK,radio_ctrl
-	enable encode_fec0
-	enable is_tx
-	disable is_rx
-	call p_le_wait_tx_cont
-	branch p_le_transmit+8
-
-p_le_wait_tx_cont:
-	until null,timeout
-	rtn
-
-
-p_le_got_first_packet:
-	fetch 1,mem_le_state
-	rtnbit1 lestate_got_first_packet
-	set1 lestate_got_first_packet
-	store 1,mem_le_state
-	rtn
-
-p_le_master_not_match:
-	fetch 1,mem_le_state
-	bbit1  lestate_got_first_packet,p_le_master_cont
-	fetch 1,mem_le_first_packet_count
-	sub pdata,6,null
-	nbranch p_le_master_disconn,positive
-	increase 1,pdata
-	store 1,mem_le_first_packet_count
-	branch p_le_master_cont
-
-
-
-
-
-
-
-
-
-
-
-
-p_le_get_public_addr:
-	fetcht 6,mem_le_lap
-	rtn
-	
-p_le_get_random_addr:
-	fetcht 6,mem_mesh_le_random_address
-	rtn
-
-
-p_le_send_adv_ind:
-	fetch 1,mem_le_adv_type
-	beq ADV_DIRECT_IND,le_send_adv_direct_ind
-	fetch 1,mem_le_adv_own_addr_type
-	lshift4 pdata,pdata
-	lshift2 pdata,pdata
-	fetcht 1,mem_le_adv_type
-	iadd temp,pdata
-	store 1,mem_le_txheader
-	fetcht 1,mem_le_adv_data_len
-	add temp,6,pdata
-	store 1,mem_le_txlen
-	copy temp,loopcnt
-	fetch 1,mem_le_adv_own_addr_type
-	call p_le_get_public_addr,blank
-	ncall p_le_get_random_addr,blank
-	storet 6,mem_le_txpayload
-	
-	arg mem_le_adv_data,contr
-	call memcpy_fast
-	branch le_send_adv_transmit	
-//	branch le_send_adv_ind+7
-
-p_le_update_param:
-	fetch 1,mem_le_state
-	rtnbit0 lestate_update_param
-	fetch 2,mem_le_event_count
-	fetcht 2,mem_le_instant
-	isub temp,pdata
-	store 2,mem_pdatatemp
-	nrtn positive
-	call le_update_param+7
-	branch z_hci_send_le_connection_update_commplete
-
-p_le_slave_unsync:
-//	call le_savelist
-	call le_lpm_set_mult
-	call le_update_channel_map
-	call p_le_update_param
-	branch calc_clke_offset
-
-
-
-
-
-//rega:len regb:ll opcode
-//le_fifo_malloc_tx_ll:
-//	arg LLID_LE_LL,type
-//	call le_fifo_malloc_tx
-//	copy regb,pdata
-//	istore 1,contw
-//	rtn
-
-
-
-
-
-
-
-
-p_le_receive_slave:
-	enable swfine
-	fetch 2,mem_le_receive_window
-	fetcht 4,mem_le_transmit_window
-	iadd temp,timeup
-p_le_receive_packet_slave:
-	call lerx_setfreq
-p_le_receive_rxon_slave:
-	call le_prep
-	disable match
-	disable user2 // for discard work
-	enable decode_fec0
-	enable is_rx
-	disable is_tx
-	copy timeup,stop_watch
-	correlate null,timeout
-	branch p_le_receive_on_attempt_slave,attempt
-	copy clke,temp
-	storet 6,mem_sync_clke
-p_le_receive_on_attempt_slave:
-	nbranch end_of_packet,sync
-	branch p_le_receive_skip_slave,attempt
-	arg param_clke_cal_le,clke_rt
-	copy bt_clk,clke_bt
-	fetch 1,mem_le_state
-	bbit0 lestate_got_first_packet,p_le_receive_skip_slave
-	call lpm_adjust_clk,wake
-p_le_receive_skip_slave:
-	call save_rssi
-	enable enable_white
-	enable enable_crc
-	parse demod,bucket,8
-	rshift3 pwindow,pdata
-	store 1,mem_le_rxbuf
-	// check retransmit
-	fetcht 1,mem_le_arq
-	//fetch 1,mem_le_rxbuf
-	rshift pdata,pdata
-	ixor temp,pdata
-	isolate1 nesn,pdata
-	setflag true,mark_old_packet,mark	/* retransmit */
-
-	// parse length	
-	parse demod,bucket,8
-	rshift3 pwindow,pdata
-	store 1,mem_le_rxbuf+1
-
-process_le_data_common:
-	//and pdata,0xff,pdata
-	copy pdata,loopcnt
-	store 1,mem_le_packet_size
-	branch p_lerx_nopayload_slave,blank							//empty rtn
-
-	fetch 1,mem_le_rxbuf
-	and pdata,0x03,pdata
-	beq LLID_LE_LL,process_le_LL
-
-	bmark1 mark_old_packet,p_lerx_discard_loop
-process_le_packet_common:
-	// reserve one big buffer for host
-	arg mem_alloc_big_block,rega
-	call p_queue_get_len
-	beq 1,p_lerx_discard_loop
-
-
-	call malloc_rcv_buffer_is_enough
-	branch p_lerx_discard_loop,blank
-	
-	call p_get_ble_rcv_ptr
-	copy contr,contw
-	fetch 2,mem_le_rxbuf
-	istore 2,contw
-	branch p_lerx_slave_loop
-
-process_le_LL:
-	arg mem_le_rxbuf+2,contw
-	branch p_lerx_slave_loop
-
-
-p_lerx_discard_loop:
-	// TODO: Think do more here
-	//branch end_of_packet
-
-	parse demod,bucket,8
-	rshift3 pwindow,pdata
-	//istore 1,temp
-	loop p_lerx_discard_loop
-
-	// use mark discard packet
-	enable user2
-
-	branch p_lerx_nopayload_slave
-
-p_lerx_slave_loop:
-	parse demod,bucket,8
-	rshift3 pwindow,pdata
-	istore 1,contw
-	loop p_lerx_slave_loop
-p_lerx_nopayload_slave:
-	parse demod,bucket,24	
-	enable swfine
-	arg param_sifs,stop_watch		// start SIFS timer after last bit of crc
-	branch p_lerx_nopayload_slave_end,user2
-	rshift32 pdata,pdata
-	rshift16 pdata,pdata
-	istore 3,contw // need save crc or not?
-p_lerx_nopayload_slave_end:
-ifdef RF_DEBUG
-	call rf_debug_active_crc_error_line,crc_failed
-endif	
-	branch end_of_packet,crc_failed
-	enable match
-	fetch 1,mem_sfreq_enable
-	nbranch p_lerx_nopayload_skip_write_freq,blank
-	fetch 1,mem_last_freq
-	add pdata,0,rega
-	call rf_write_freq				/* set frequency to tx mode freq */
-p_lerx_nopayload_skip_write_freq:
-	disable decode_fec0
-	branch set_sync_on
-
-p_le_parse_rcv_header:
-	ifetch 1,contr
-	and pdata,0x3,pdata
-	store 1,mem_le_packet_llid
-
-	ifetch 1,contr	//l2cap len
-	store 1,mem_le_packet_size
-	rtn blank
-
-	storer contr,2,mem_le_payload_ptr
-	rtn
 
-p_le_parse:
-	rtnmark1 mark_old_packet
-	rtnmark0 mark_le_mic_ok
-	rtn user2
 
-	// check length
-	fetch 1,mem_le_rxbuf+1
-	rtn blank
-	fetch 1,mem_le_rxbuf
-	and pdata,0x03,pdata
-	beq LLID_LE_LL,le_parse_ll
-
-	call p_get_ble_rcv_ptr
-	call p_le_parse_rcv_header
 	
-	fetch 1,mem_le_packet_size
-	rtn blank
-
-	fetch 1,mem_le_packet_llid
-	beq LLID_LE_LL,le_parse_ll
-p_le_parse_l2cap:
-	branch p_hci_send_acl_encode_le
-
-
-p_le_slave_more_data:
-	enable attempt
-	call p_le_transmit_receive_sifs_notx_slave
-	branch le_slave_match,match
-	branch le_slave_cont
-
-p_le_transmit_receive_sifs_notx_slave:
-	fetcht 1,mem_last_freq
-	call set_freq_rx
-	call rf_rx_enable
-	enable swfine
-	arg 5000,timeup	// about 417us
-	branch p_le_receive_rxon_slave
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+//p_soft_reset:
+//	call p_clean_mem
+//p_soft_reset_end:
+//	clear_stack
+//	//call ice_break
+//	//call initialize_radio
+//	nop 100
+//	jam 0xff,0x8907
+//	call init_param
+//	call l2cap_init
+//	call rfcomm_init
+//	call init_lmp
+//	call p_start
+//	call app_init
+//	branch soft_reset+12	
+p_start:
+	call enable_xip
+	arg 0x80,aes_ctrl	
+	jam 1,mem_24g_test//flag for test fcc
+	arg mem_0db_tx_power_param,rega
+	call p_copy_power_param_to_att_list
+//p_reserve_for_usb_data:
+//	//in here call function to get usb data,which enable flag fcc test	
+p_fcc_start:
+	call p_init_param
+	call p_initialize_radio
+	//jam 0x21,core_clkoff			// enable debug uart
+//	call lpm_disable_exen_output
+	//jam uart_ctrl_normal,core_uart_ctrl //enable flow control
+	
+	call pp_pn9		//do tx
+	branch p_test_tx_new_param	//check new params
+
+p_clean_mem:
+	arg 0x0,contw
+	arg 0x400,loopcnt
+	call p_memset0
+ifndef REVA
+	fetch 1,core_misc_status
+	rtnbit0 2
+endif
+	arg 0x4000,contw
+	arg 0x200,loopcnt
+	call p_memset0
+	rtn
 
+p_memset0:
+	force 0,pdata
+p_memset8:
+	istore   8,contw
+	loop p_memset8
+	rtn
+p_init_param:
+	setarg param_features0
+	store 3,mem_features
+	setarg param_features1
+	set0 2,pdata			// disable edr3m
+	istore 3,contw
+	setarg param_features2
+	istore 2,contw
+	setarg param_lap
+	store 3,mem_lap
+	setarg param_unap
+	store 3,mem_uap
+	setarg param_glap
+	store 3,mem_glap
+	setarg param_tisw
+	store 2,mem_iscan_window
+	setarg param_tisi
+	store 2,mem_iscan_interval
+	setarg 0x200
+	store 2,mem_pscan_window
+	setarg param_tpsi
+	store 2,mem_pscan_interval
+	setarg param_inq_window
+	store 2,mem_inq_window
+	setarg param_page_window
+	store 2,mem_page_window
+	setarg param_page_to
+	store 2,mem_page_to
+//	setarg param_lmp_version
+//	store 3,mem_lmp_version
+//	setarg param_lmp_subversion
+//	store 2,mem_lmp_subversion
+	jam param_name_len,mem_local_name_length
+	setarg param_name
+	store 3,mem_local_name
+	setarg param_name1
+	store 3,mem_local_name2
+	jam param_fcomp_mul,mem_fcomp_mul
+	jam 0x60,mem_fhs_misc		/* R1 for 1.28s ps interval,P2 */
+	jam param_max_slot,mem_max_slot
+	//jam 1,mem_ptt
+	jam 3,mem_scan_mode
+	rtn
+p_initialize_radio:
+
+	jam clksel_rc,core_clksel
+
+	//MAX TX IQ&DC for TX_0MIF, 2015_014_#12
+	jam 0x00,0x8907 //0M_IF
+	jam 0x00,0x8908
+	jam 0x00,0x8909
+	jam 0xff,0x890a
+	jam 0xff,0x890b	 //ff,Albert_AGC_disable
+	//jam 0xe0,0x90a //Alberts
+	//jam 0x44,0x90b //Alberts
+	//jam 0xe4,0x90b	 //temp, Albert_AGC_enable/disable
+	
+/*
+	//MAX TX IQ&DC for TX_1MIF, 2015_014_#12//
+	jam 0x7f,0x907 //1M_IF
+	jam 0x01,0x908
+	jam 0x1f,0x909
+	jam 0xf8,0x90a
+	jam 0xff,0x90b	 //for EDR&BR
+	//jam 0x5f,0x90b		//for BLE
+	//MAX TX IQ&DC for yc1021D_#12 only//
+	//tmp
+	//jam 0x00,0x907 //1M_IF
+	//jam 0x00,0x908
+*/
 
+	//jam 0x36,0x90f		/*For BLE, tune AGC_gain_offset, Max added*/
+	jam 0x2e,0x890f			/*For BR/EDR, tune AGC_gain_offset, Max added*/
 
+	jam 0x47,rf_agc_ctrl		/* invert demod, demod_clkoff , Max changed*/
+	//freeze gain table
+	//jam 0xc5,0x911 //C5, LNA=110, Mixer=00, BPF=0101
+	
+	//jam 0x01,0x953			/* rccal_sel*, no USE, will be set by 0x8951/
 
+	jam 0xfb,0x894c			/* rx sensitivity, dac_reg2, Max changed */
+	jam 0xef,0x894d
+	jam 0xec,0x894e			/* push tia_bias for better sen, Max changed */
+	jam 0x5e,0x894f			/* tia_rc_en, Max changed */
+	
+	jam 0x88,0x896f
+	jam 0x00,0x8973			/* turn off charge pump */
 
+	jam 0x4a,0x895a
+	//jam 0x26,0x895a
+	jam 0x80,0x895c
+	//jam 0x60,0x895c
+jam 0x20,mem_fcc_data_new
+jam 1,mem_fcc_ch_new
 
+//temp for lower RX current
+/*
+jam 0x5b,0x94c  //original, jam 0xfb,0x94c
+jam 0x96,0x94d  //original, jam 0xef,0x94d
+jam 0x30,0x95c  //original, jam 0x80,0x95c
+jam 0x46,0x94f  //original, jam 0x5e,0x94f
+*/
 
 
+/*
+      //default AGC setting
+	jam 0xf5,0x91a 
+	jam 0xc0,0x931 
+	jam 0xc1,0x932 
+	jam 0xc2,0x933 
+	jam 0xc3,0x934 
+	jam 0xc4,0x935 
+	jam 0xc5,0x936 
+	jam 0x04,0x937 
+	jam 0x05,0x938 
+	jam 0x06,0x939 
+	jam 0x15,0x93A 
+	jam 0x16,0x93B 
+	jam 0x55,0x93C 
+	jam 0x56,0x93D 
+	jam 0x57,0x93E 
+	jam 0x66,0x93F 
+	jam 0x67,0x940 
+	jam 0xa6,0x941 
+	jam 0xa7,0x942 
+	jam 0xa8,0x943 
+	
+//	jam 0xb7,0x944
+//	jam 0xf6,0x945
+//	jam 0xf7,0x946
+//	jam 0xf8,0x947
+	jam 0x68,0x944
+	jam 0x75,0x945
+	jam 0xb5,0x946
+	jam 0xf5,0x947
+	
+	jam 0xa9,0x930   
+	jam 0xb1,0x92f   //should be b2
+	jam 0xb9,0x92e  //should be bq  
+	jam 0xb5,0x92d  //should be b6
 
 
+	
+	jam 0xc0,0x948 
+	jam 0xff,0x949   
+	
+*/
 
+	/*
+      //AGC Table Setting Aggresive, Based on BR_sen, Max added
+	jam 0xa9,0x930 //jam 0x9D,0x930	
+	jam 0xb1,0x92f //jam 0xA1,0x92f	
+	jam 0xb9,0x92e //jam 0xA9,0x92e		
+	jam 0xAE,0x92d	
+	jam 0xB2,0x92c	
+	jam 0xB6,0x92b	
+	jam 0xBA,0x92a	
+	jam 0xBE,0x929	
+	jam 0xC2,0x928	
+	jam 0xC6,0x927	
+	jam 0xCA,0x926	
+	jam 0xCE,0x925	
+	jam 0xD2,0x924	
+	jam 0xD6,0x923	
+	jam 0xDA,0x922	
+	jam 0xDE,0x921	
+	jam 0xE2,0x920	
+	jam 0xE6,0x91f	
+	jam 0xEA,0x91e	
+	jam 0xEE,0x91d	
+	jam 0xF2,0x91c	
+	jam 0xF6,0x91b	
+	jam 0xFB,0x91a	
+	
+	jam 0xf5,0x947 //jam 0xF8,0x947	
+	jam 0xe5,0x946 //jam 0xE9,0x946	
+	jam 0xd5,0x945 //jam 0xD9,0x945	
+	jam 0xA8,0x944	
+	jam 0x69,0x943	
+	jam 0x68,0x942	
+	jam 0x29,0x941	
+	jam 0x28,0x940	
+	jam 0xE9,0x93f	
+	jam 0xE8,0x93e	
+	jam 0xD9,0x93d	
+	jam 0xD8,0x93c	
+	jam 0xC9,0x93b	
+	jam 0xC8,0x93a	
+	jam 0xC7,0x939	
+	jam 0xC6,0x938	
+	jam 0xC5,0x937	
+	jam 0xC4,0x936	
+	jam 0xC3,0x935	
+	jam 0xC2,0x934	
+	jam 0xC1,0x933	
+	jam 0xC0,0x932	
+	jam 0x80,0x931	
+	jam 0x7f,0x94a	
+	jam 0x80,0x949	
+	jam 0x00,0x948	
+	*/
+
+
+	/*
+	//AGC Table Setting Normal, Based on 8PSK_sen, Max added
+	jam 0xa9,0x930 //jam 0x9D,0x930	
+	jam 0xb1,0x92f //jam 0xA1,0x92f	
+	jam 0xb9,0x92e //jam 0xA9,0x92e	
+	jam 0xAD,0x92d	
+	jam 0xB2,0x92c	
+	jam 0xB6,0x92b	
+	jam 0xBA,0x92a	
+	jam 0xBE,0x929	
+	jam 0xC2,0x928	
+	jam 0xC6,0x927	
+	jam 0xCA,0x926	
+	jam 0xCE,0x925	
+	jam 0xD2,0x924	
+	jam 0xD6,0x923	
+	jam 0xDA,0x922	
+	jam 0xDE,0x921	
+	jam 0xE2,0x920	
+	jam 0xE6,0x91f	
+	jam 0xEA,0x91e	
+	jam 0xEE,0x91d	
+	jam 0xF2,0x91c	
+	jam 0xF6,0x91b	
+	jam 0xFB,0x91a	
+	
+	jam 0xf5,0x947 //jam 0xF8,0x947	
+	jam 0xe5,0x946 //jam 0xE9,0x946	
+	jam 0xd5,0x945 //jam 0xD9,0x945	
+	jam 0xD8,0x944	
+	jam 0x99,0x943	
+	jam 0x98,0x942	
+	jam 0x59,0x941	
+	jam 0x58,0x940	
+	jam 0x19,0x93f	
+	jam 0x18,0x93e	
+	jam 0xD9,0x93d	
+	jam 0xD8,0x93c	
+	jam 0xC9,0x93b	
+	jam 0xC8,0x93a	
+	jam 0xC7,0x939	
+	jam 0xC6,0x938	
+	jam 0xC5,0x937	
+	jam 0xC4,0x936	
+	jam 0xC3,0x935	
+	jam 0xC2,0x934	
+	jam 0xC1,0x933	
+	jam 0xC0,0x932	
+	jam 0x80,0x931	
+	jam 0x7f,0x94a	
+	jam 0xe0,0x949	
+	jam 0x00,0x948	
+	*/
+        
+
+/*	
+	//AGC Table Setting Conservative, Based on 8PSK_sen, Max added
+	jam 0x9d,0x930 //jam 0xa9,0x92f, for C_version only 	
+	jam 0xa1,0x92f //jam 0xb1,0x92f, for C_version only
+	jam 0xa9,0x92e //jam 0xb9,0x92e, for C_version only
+	jam 0xAD,0x92d	
+	jam 0xB1,0x92c	
+	jam 0xB5,0x92b	
+	jam 0xBA,0x92a	
+	jam 0xBE,0x929	
+	jam 0xC2,0x928	
+	jam 0xC6,0x927	
+	jam 0xCA,0x926	
+	jam 0xCE,0x925 //jam 0xb9,0x925, only changed for BQB_C1_#7
+	jam 0xD2,0x924	
+	jam 0xD6,0x923	
+	jam 0xDA,0x922	
+	jam 0xDE,0x921	
+	jam 0xE2,0x920	
+	jam 0xE6,0x91f	
+	jam 0xEA,0x91e	
+	jam 0xEE,0x91d	
+	jam 0xF2,0x91c	
+	jam 0xF6,0x91b	
+	jam 0xFB,0x91a
+	
+	jam 0xf8,0x947 //jam 0xf5,0x947, for C_version only
+	jam 0xE9,0x946 //jam 0xe5,0x946, for C_version only	
+	jam 0xD9,0x945 //jam 0xd5,0x945, for C_version only	
+	jam 0xD8,0x944	
+	jam 0xC9,0x943	
+	jam 0xC8,0x942	
+	jam 0x89,0x941	
+	jam 0x88,0x940	
+	jam 0x87,0x93f	
+	jam 0x48,0x93e	
+	jam 0x09,0x93d	
+	jam 0x08,0x93c //jam 0xd5,0x93c, only changed for BQB_C1_#7
+	jam 0xC9,0x93b	
+	jam 0xC8,0x93a	
+	jam 0xC7,0x939	
+	jam 0xC6,0x938	
+	jam 0xC5,0x937	
+	jam 0xC4,0x936	
+	jam 0xC3,0x935	
+	jam 0xC2,0x934	
+	jam 0xC1,0x933	
+	jam 0xC0,0x932	
+	jam 0x80,0x931
+	
+	jam 0x7f,0x94a	
+	jam 0xf8,0x949	
+	jam 0x00,0x948	
 
+*/
 
+	//AGC Table Setting Conservative, Based on 8PSK_sen, Max added for YC1021D
+	jam 0xa9,0x8930 	
+	jam 0xad,0x892f 
+	jam 0xb1,0x892e 
+	jam 0xb5,0x892d	
+	jam 0xb9,0x892c	
+	jam 0xbd,0x892b	
+	jam 0xc2,0x892a	
+	jam 0xc6,0x8929	
+	jam 0xca,0x8928	
+	jam 0xce,0x8927	
+	jam 0xd2,0x8926	
+	jam 0xd6,0x8925 
+	jam 0xda,0x8924	
+	jam 0xde,0x8923	
+	jam 0xe2,0x8922	
+	jam 0xe6,0x8921	
+	jam 0xea,0x8920	
+	jam 0xee,0x891f	
+	jam 0xf2,0x891e	
+	jam 0xf6,0x891d	
+	jam 0xfb,0x891c	
+	jam 0xfb,0x891b	
+	jam 0xfb,0x891a
+	
+	jam 0xf5,0x8947 
+	jam 0xe6,0x8946 
+	jam 0xD7,0x8945 
+	jam 0xD6,0x8944	
+	jam 0xC7,0x8943	
+	jam 0xC6,0x8942	
+	jam 0x87,0x8941	
+	jam 0x86,0x8940	
+	jam 0x85,0x893f	
+	jam 0x46,0x893e	
+	jam 0x07,0x893d	
+	jam 0x06,0x893c 
+	jam 0xC7,0x893b	
+	jam 0xC6,0x893a	
+	jam 0xC5,0x8939	
+	jam 0xC4,0x8938	
+	jam 0xC3,0x8937	
+	jam 0xC2,0x8936	
+	jam 0xC1,0x8935	
+	jam 0xC0,0x8934	
+	jam 0x80,0x8933	
+	jam 0x80,0x8932	
+	jam 0x80,0x8931
+	
+	jam 0x7f,0x894a	
+	jam 0xf8,0x8949	
+	jam 0x00,0x8948	
+
+
+		
+
+	//Tx Pout related
+//	jam 0xd0, 0x8955  //jam 0xd8, 0x955 only for yc1021C1_#7, BQB, -2.9dBm. changed for ramp_up/down
+//	jam 0xe0, 0x8956   //jam 0xce, 0x956 only for yc1021C1_#7, BQB, -2.9dBm. changed for ramp_up/down
+	 jam 0xba, 0x894b
+	fetch 1,mem_rf_shutdown_param1
+	store 1,0x8955
+	fetch 1,mem_rf_shutdown_param2
+	store 1,0x8956
+	jam 0x88, 0x8957
+	jam 0x6c, 0x8958
+	jam 0x10, 0x8959
+//	jam 0x43,0x8954
+//	jam 0x7a,0x895a
+	
 
+/*
+	//Rx low-power (standard mode)
+        //Mixer
+	jam 0x5b, 0x94c
+	//jam 0x8f, 0x94d   //share same reg with rx_lna
+	//LNA
+	jam 0x96, 0x94d
+	//VCO
+	jam 0x30, 0x95c
+	//BPF
+	jam 0x46, 0x94f
+*/
 
 
-p_l2cap_init_queue:
-	call p_mram_clkon
-	branch z_l2cap_init_queue
+	setarg 0x300000
+	store 3,rf_clkpll_frac
+	jam 0x64,rf_clkpll_int
+	jam 36,mem_fcomp_div
+	call p_switchto_dpllclk
+	jam 0xe4,rf_clkpll_int
+	set1 RESET,radio_ctrl
+	force 0,radio_ctrl
+	call p_do_rccal
+	call p_set_rccal
+	rtn
+p_do_rccal:
+	jam 0x02,rfen_adc
+	setarg 2500000
+	call p_sleep					/* wait clkpll&xtal stable */
+	jam 0x7f,rfen_rx
+	nop 130
+	jam 0x10,rfen_tx
+       	jam 0x30,rf_rccal_ctrl
+	nop 200	
+	jam 0xf0,rf_rccal_ctrl
+	force 50,loopcnt
+p_do_rccal_loop:
+	fetch 1,rf_rccal_result
+	bbit1 5,p_do_rccal_end
+	loop p_do_rccal_loop
+p_do_rccal_end:
+	store 1,mem_rf_rccal
+	jam 0,rfen_tx
+	jam 0,rfen_rx
+	jam 0x00,rfen_adc
+	rtn
+
+p_set_rccal:
+	fetch 1,mem_rf_rccal
+	set1 5,pdata
+	store 1,rf_rccal_ctrl
+	fetcht 1,rf_bpf_ctrim
+	and_into 7,temp
+	lshift3 pdata,pdata
+	ior temp,pdata
+	store 1,rf_bpf_ctrim
+	fetch 1,rf_bpf_ib
+	set0 bpf_rccal,pdata
+	store 1,rf_bpf_ib
+	fetch 1,rf_adc_rccal
+	set0 adc_rccal,pdata
+	store 1,rf_adc_rccal
+	rtn
 
-//input1:rega --- mem block
-//output:regb --- block ptr
-p_queue_delete:
-	add rega,BLOCK_CUR_LEN_OFFSET,temp
-	ifetch 1,temp
-	branch assert,blank
+p_switchto_dpllclk:
+	fetch 1,rf_clkpll_frac+2
+	set0 4,pdata
+	set0 5,pdata
+	store 1,rf_clkpll_frac+2
+	jam 0x00,rfen_ck
+	jam 0x70,rfen_msc
+	jam 0xff,rfen_ck
+	fetch 1,rf_clkpll_frac+2
+	set1 4,pdata
+	set1 5,pdata
+	store 1,rf_clkpll_frac+2
+	call p_init_lpm_ctrl
+	jam clksel_dpll,core_clksel
+	rtn
 
-	add rega,BLOCK_RPTR_OFFSET,pdata
-	ifetcht 2,pdata
-	ifetchr regb,3,temp
-	setarg 0
-	istore 3,temp
-	add temp,3,regc
-	call queue_unit_increase
-	add rega,BLOCK_RPTR_OFFSET,pdata
-	istorer regc,2,pdata
+p_switchto_xclk:
+	jam 0x8,core_clksel
+	jam 0x00,rfen_ck
+	jam 0x70,rfen_msc
+	rtn
 
-	add rega,BLOCK_CUR_LEN_OFFSET,temp
-	ifetch 1,temp
+p_init_lpm_ctrl:
+	fetcht 3,core_lpm_ctrl
+	setarg 0x100f0f		//Max changed to lowest lpo, 150720. Change xtal's ctrim for C_#7only for BQB, 151105
+	isub temp,null
+	rtn zero
+	store 3,core_lpm_reg
+	jam 0xca,core_lpm_reg+3
+	call p_lpm_write_ctrl
+//	jam 0,core_gpio_out0
+	rtn
+p_lpm_write_ctrl:
+	setarg lpmreg_sel_ctrl
+p_lpm_write:
+	until null,lpo_edge
+	store 1,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	rtn
+p_shutdown_radio:
+	nop 100          /* flush out the last bit */  
+	//pout related, ramp down  
+	//can be deleted 
+	//jam 0xd8, 0x955 
+	//nop 40 
+	jam 0xd4, 0x8955 
+	nop 40 
+	jam 0xd2, 0x8955  
+	nop 40  
+	//can be deleted   
+	jam 0xd1, 0x8955 
+	nop 40  
+	//jam 0xd0, 0x955 //0db
+	//jam 0xe0, 0x956//0db
+	//jam 0xd0, 0x955 //5db
+	//jam 0xe0, 0x956//5db
+	//jam 0xd0, 0x8955 //3db
+	//jam 0xc0, 0x8956//3db
+	fetch 1,mem_rf_shutdown_param1
+	store 1,0x8955
+	fetch 1,mem_rf_shutdown_param2
+	store 1,0x8956
+	jam 0xd0,0x8955
+	jam 0xe0,0x8956
+	force 0,radio_ctrl
+	disable is_rx
+	disable is_tx
+	pulse packet_end
+	jam 0x0,rfen_adc
+	jam 0,rfen_sn
+	jam 0x70,rfen_msc
+	jam 0x0,rfen_mdm
+	jam 0x0,rfen_tx
+	jam 0x0,rfen_rx
+	rtn	
+p_sleep:	
+	/* sleep pdata clocks, only even clocks are accurate */
+	rshift pdata,pdata
+	increase -3,pdata
+p_sleep_loop:	
 	increase -1,pdata
-	istore 1,temp
+	nbranch p_sleep_loop,zero
+	force 0,pdata
 	rtn
-	
-//input --- rega
-p_queue_get_len:
-	add rega,BLOCK_CUR_LEN_OFFSET,temp
-	ifetch 1,temp
-	rtn
-	
-p_l2cap_load_channel_param:
-	arg 680,rege
-	fetch 1,mem_l2cap_temp_ch_psm
-	rtneq PSM_RFCOMM
-	branch l2cap_load_channel_param+2
-
-//input: regd -> len
-//rtn: regb,contr->ptr
-malloc_br_snd_buffer:
-	call malloc_buffer
-	arg mem_snd_br_block,rega
-	branch queue_insert
-
-free_br_snd_buffer:
-	arg mem_snd_br_block,rega
-	call queue_delete
-	branch free_buffer
-
-
-//input: regd -> len
-//rtn: regb,contr->ptr
-malloc_hci_snd_buffer:
-	call malloc_buffer
-	arg mem_snd_hci_block,rega
-	branch queue_insert
-
-//free_hci_snd_buffer:
-//	arg mem_snd_hci_block,rega
-//	call queue_delete
-//	branch free_buffer
-
-p_queue_insert:
-	add rega,BLOCK_WPTR_OFFSET,pdata
-	ifetcht 2,pdata
-	istorer regb,3,temp//store rxbuffer addr to wptr(start)
-	add temp,3,regc
-	call queue_unit_increase
-	add rega,BLOCK_WPTR_OFFSET,pdata
-	istorer regc,2,pdata
-	
-	add rega,BLOCK_CUR_LEN_OFFSET,regc
-	ifetcht 1,regc
-	increase 1,temp
-	istoret 1,regc
-	
-	// check buffer
-	add rega,BLOCK_TOTAL_SIZE_OFFSET,regc
-	ifetch 1,regc
+p_set_sync_on:
+	//jam 0x38,rfen_rx // otherwise DAC has 1mA more current
+	jam 0x77,rfen_msc
+	jam 0x03,rfen_sn
+	nop 10
+	jam 0x83,rfen_sn
+	jam 0x7f,rfen_msc
+	jam 0xa7,rfen_sn
+	rtn
+p_test_tx_new_param:
+	fetcht 1,mem_fcc_mod_new
+	and temp,0x0f,pdata
+	//storet 1,mem_fcc_mod_new  //check mod
+	//and temp,0x07,pdata
+	beq 1,p_test_txrx_param
+	beq 3,p_test_txrx_param
+	beq 7,p_test_txrx_param
+	jam 0x01,mem_fcc_mod_new
+p_test_txrx_param:
+	fetch 1,mem_fcc_txrx_new
+	and pdata,0x03,pdata
+	store 1,mem_fcc_txrx_new
+	beq 1,p_test_btble_param
+	beq 2,p_test_btble_param
+	beq 3,p_test_btble_param
+	jam 0x01,mem_fcc_txrx_new
+p_test_btble_param:
+	fetch 1,mem_fcc_btble_new
+	and pdata,0x03,pdata
+	store 1,mem_fcc_btble_new
+	beq 1,p_test_isdate_param
+	beq 2,p_test_isdate_param
+	jam 0x01,mem_fcc_btble_new
+p_test_isdate_param:
+	fetch 1,mem_fcc_data_new
+	and pdata,0x30,pdata
+	store 1,mem_fcc_data_new
+	beq 0,p_test_data_length_param
+	beq 0x20,p_test_data_length_param
+	jam 0,mem_fcc_data_new
+p_test_data_length_param:
+	fetch 1,mem_fcc_data_length_new
+	beq 0,p_data_length_equ0
+	branch p_test_bt_hop_stable_param
+p_data_length_equ0:
+	jam 0x19,mem_fcc_data_length_new
+//	jam 0x30,mem_fcc_data_length_new
+p_test_bt_hop_stable_param:
+	fetch 1,mem_fcc_hop_new
+	and pdata,0x03,pdata
+	store 1,mem_fcc_hop_new
+	beq 1,p_test_tx_new_param_cont
+	beq 2,p_test_tx_new_param_cont
+	jam 0x02,mem_fcc_hop_new
+p_test_tx_new_param_cont:
+	fetch 1,mem_fcc_ch_new
+	beq 0,p_zero
+	arg 81,temp
 	isub temp,null
-	nbranch assert,positive
-	
-	copy regb,contr
-	copy regb,pdata
-	rtn
-
-
-/*********************************************************/
-//char* malloc(short len)
-//input: regd -> len
-//rtn: regb->ptr
-/*********************************************************/
-malloc_buffer:
-	call malloc_buffer_is_enough
-	branch assert,blank
-
-	fetch 2,mem_param_alloc_normal_buffer_max_length
-	fetcht 2,mem_alloc_buffer_len
+	nbranch p_test_tx_new_param_copy,positive //check channel between  0-79
+p_zero:
+	jam 2,mem_fcc_ch_new
+p_test_tx_new_param_copy:
+	fetch 7,mem_fcc_param_new
+	store 7,mem_fcc_param
+
+	
+p_test_tx_or_rx:
+	fetch 1,mem_fcc_txrx
+	beq 0x01,p_test_tx_start
+	beq 0x02,p_test_rx_start
+	
+
+p_test_tx_start:
+	fetcht 1,mem_fcc_ch
+	increase -1,temp
+	fetch 1,mem_fcc_btble
+	beq 0x01,p_test_bt_tx_on
+	beq 0x02,p_test_ble_tx_on
+	
+p_test_ble_tx_on:
+	//call p_test_ble_bt_rx_off	//close rx
+	call p_set_sync_on
+	call p_set_freq_tx
+	//disable enable_white
+	call p_le_enable
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call le_wait_tx
+	fetch 1,mem_fcc_data
+	store 1,0x8908
+	branch p_tx_data
+
+p_test_ble_bt_tx_off:
+	branch p_shutdown_radio
+
+
+p_test_rx_start:	
+	fetcht 1,mem_fcc_ch
+	increase -1,temp
+	fetch 1,mem_fcc_btble
+	compare 0x01,pdata,0x0f
+	call p_test_bt_rx_on,true
+	ncall p_test_ble_rx_on,true
+p_test_rx_loop:
+//	call hci_rx_packet
+//	call p_interface_for_usb_cmd
+	fetch 7,mem_fcc_param
+	fetcht 7,mem_fcc_param_new
 	isub temp,null
-	branch malloc_buffer_normal,positive
-malloc_buffer_big:
-ifdef malloc_buffer_cnt_debug
-	fetch 2,mem_temp_alloc_big_malloc_cnt
-	increase 1,pdata
-	store 2,mem_temp_alloc_big_malloc_cnt
-endif
-	arg mem_alloc_big_block,rega
-	branch queue_delete
-malloc_buffer_normal:
-	arg mem_alloc_normal_block,rega
-	call p_queue_get_len
-	branch malloc_buffer_big,blank
-	
-ifdef malloc_buffer_cnt_debug
-	fetch 2,mem_temp_alloc_normal_malloc_cnt
-	increase 1,pdata
-	store 2,mem_temp_alloc_normal_malloc_cnt
-endif
-	arg mem_alloc_normal_block,rega
-	branch queue_delete
-
-/*********************************************************/
-//char* malloc(short len)
-//input: regb -> ptr
-//rtn: regb->ptr
-/*********************************************************/
-free_buffer:
-	call malloc_check_in_big_queue
-	arg mem_alloc_normal_block,rega
-	branch free_buffer_normal,blank
-free_buffer_big:
-ifdef malloc_buffer_cnt_debug
-	fetch 2,mem_temp_alloc_big_free_cnt
-	increase 1,pdata
-	store 2,mem_temp_alloc_big_free_cnt
-endif
-	arg mem_alloc_big_block,rega
-	branch queue_insert
-free_buffer_normal:
-	call malloc_check_in_normal_queue
-	branch assert,blank
-ifdef malloc_buffer_cnt_debug
-	fetch 2,mem_temp_alloc_normal_free_cnt
-	increase 1,pdata
-	store 2,mem_temp_alloc_normal_free_cnt
-endif
-	arg mem_alloc_normal_block,rega
-	branch queue_insert
+	branch p_test_rx_loop,zero
+	branch p_test_tx_new_param
 
 
-//input: regb -> buffer ptr
-malloc_check_in_normal_queue:
-	// store the big block ptr to list
-	fetchr loopcnt,1,mem_alloc_normal_total_size
-	arg mem_normal_block_ptr_list,contr
-	branch malloc_check_in_queue_loop
-
-
-//input: regd -> len
-//blank == 1, not in big queue
-malloc_check_in_big_queue:
-	// store the big block ptr to list
-	fetchr loopcnt,1,mem_alloc_big_total_size
-	arg mem_big_block_ptr_list,contr
-malloc_check_in_queue_loop:
-	ifetch 3,contr
-	isub regb,null
-	branch malloc_check_in_queue_end,zero
-	loop malloc_check_in_queue_loop
-malloc_check_in_queue_end:
-	copy loopcnt,pdata
-	rtn
-
-//input: regd -> len
-//rtn: blank == 0: enough
-malloc_buffer_is_enough:
-	fetch 2,mem_param_alloc_normal_buffer_max_length
-	fetcht 2,mem_alloc_buffer_len
+p_test_ble_rx_on:
+	call p_test_ble_bt_tx_off	//close tx
+	call p_set_freq_rx
+	setarg param_pll_setup
+	call sleep
+	branch rf_rx_enable
+	
+p_test_ble_bt_rx_off:
+	disable encode_fec0
+	disable encode_fec2
+	disable decode_fec0
+	disable decode_fec2
+	disable enable_crc
+	disable encrypt
+	disable enable_white
+	branch p_shutdown_radio
+	
+p_test_bt_rx_on:
+	call p_test_ble_bt_tx_off	//close tx
+	call p_set_freq_rx
+	fetcht 1,mem_fcc_mod   //.....
+	and temp,7,radio_ctrl
+	branch start_receiver
+
+//tx_l2cap_type:
+
+p_test_bt_tx_on:
+	//call p_test_ble_bt_rx_off	//close rx
+	call p_set_sync_on
+	call p_set_freq_tx
+	disable enable_white
+	enable encode_fec0
+	enable is_tx
+	fetcht 1,mem_fcc_mod
+	copy temp,radio_ctrl
+	fetch 1,mem_fcc_data
+	store 1,0x8908
+	beq 0,p_test_tx_data	
+p_test_tx_carrier_loop:
+	fetch 1,mem_fcc_data_length
+	copy pdata,loopcnt
+	arg mem_pn9,contr
+p_pnloop_carrier:
+	ifetch 1,contr
+	inject mod,8
+	loop p_pnloop_carrier
+//	call hci_rx_packet
+	//call p_interface_for_usb_cmd
+	fetch 7,mem_fcc_param
+	fetcht 7,mem_fcc_param_new
 	isub temp,null
-	//isub regd,null
-	branch malloc_buffer_is_enough_normal,positive
-malloc_buffer_is_enough_big:
-	arg mem_alloc_big_block,rega
-	branch p_queue_get_len
-malloc_buffer_is_enough_normal:
-	arg mem_alloc_normal_block,rega
-	call p_queue_get_len
-	nrtn blank	// if normal buffer is not enough, use big buffer.
-	branch malloc_buffer_is_enough_big
-
-//input: regd -> len
-//rtn: blank == 1: full
-
-malloc_buffer_is_full_big:
-	fetch 2,mem_param_alloc_big_buffer_max_length
-	branch malloc_buffer_is_full_raw
-malloc_buffer_is_full:
-	setarg 0x10
-malloc_buffer_is_full_raw:
-	store 2,mem_alloc_buffer_len
-	//arg 0x10,regd
-	
-	storer rega,4,mem_rega
-	call malloc_buffer_is_enough
-	fetchr rega,4,mem_rega
-	rtn
-
-// becouse we don't know the buffer length remote send.
-// or we can think do more in future, list read l2cap first two byte first?.
-malloc_rcv_buffer:
-
-ifdef malloc_buffer_cnt_debug
-	fetch 2,mem_temp_alloc_big_malloc_cnt
-	increase 1,pdata
-	store 2,mem_temp_alloc_big_malloc_cnt
-endif
-
-	arg mem_alloc_big_block,rega
-	branch queue_delete
-
-
-malloc_rcv_buffer_is_enough:
-	// avoid receive use all buffer
-	//arg mem_alloc_big_block,rega
-	//call p_queue_get_len
-	//copy pdata,temp
-	//arg mem_alloc_big_block,rega
-	//call p_queue_get_len
-	//iadd temp,pdata
-	//rtn blank
-	fetch 2,mem_rcv_br_queue_ptr
-	nrtn blank
-	
-	arg mem_alloc_big_block,rega
-	branch p_queue_get_len
-
-
-p_get_br_rcv_ptr:
-	fetch 3,mem_rcv_br_queue_ptr
-	nbranch get_pdata_contr,blank
-	call malloc_rcv_buffer
-	copy regb,pdata
-	store 3,mem_rcv_br_queue_ptr
-	branch get_pdata_contr
-
-
-
-p_get_ble_rcv_ptr:
-	fetch 3,mem_rcv_ble_queue_ptr
-	nbranch get_pdata_contr,blank
-	call malloc_rcv_buffer
-	copy regb,pdata
-	store 3,mem_rcv_ble_queue_ptr
-	branch get_pdata_contr
-
-p_app_process_bb_event:
-	//return if c51 need to process bb event
-	arg mem_ipc_fifo_bt2c51,rega
-	call fifo_out
-	rtn blank
-	//reaching here mains c51 cannot get bb event.
-	copy pdata,regc
-//	call app_event_normal_process
-	branch app_process_bb_event_priority
-
-p_app_event_normal_process:
-	copy regc,pdata
-	//beq BT_EVT_LE_CONNECTED,app_le_event_bb_connected
-	beq BT_EVT_LE_DISCONNECTED,p_app_le_event_bb_disconn
-	branch app_event_normal_process + 1
-
-
-p_app_le_event_bb_disconn:
-	jam 0,mem_mesh_recevie_acl_packet_number
-	jam 0,mem_mesh_le_version_exchange_times
-	call z_l2cap_ble_queue_init
-	call p_hci_send_event_le_disconnection_complete
-	branch app_le_event_bb_disconn
-
-p_le_check_wak:
-	fetcht 1,mem_le_arq
-	isolate0 wak,temp
-	rtn true
-	fetch 1,mem_le_rxbuf
-	lshift pdata,pdata
-	ixor temp,pdata
-	rtnbit0 sn			/* received NESN is same as SN, NAK */
-	set0 wak,temp
-	setflip sn,temp
-	storet 1,mem_le_arq
-	compare 3,temp,3
-	nrtn true
-	
-	fetch 1,mem_le_enc_state
-	beq FLAG_LE_ENC_PAUSE,le_clear_enc
-p_le_check_wak_end_ll:
-	fetch 1,mem_le_txpayload_temp
-	beq LL_TERMINATE_IND,p_le_master_disconn
-	beq LL_START_ENC_REQ,le_set_enc
-	rtn
-
+	branch p_test_tx_carrier_loop,zero
+	branch p_test_tx_new_param
+p_test_tx_data:
+	fetch 1,mem_fcc_hop
+	beq 1,p_tx_data_hopping
+	
+//p_test_tx_loop_jump:
+	//jam 0x10,0x8074
+	//enable swfine
+	//arg 0x495,stop_watch
+p_tx_data:
+	fetch 1,mem_fcc_mod
+	beq 1,p_calculate_GFSK_modulation_length
+	beq 3,p_calculate_pai4_modulation_length
+	beq 7,p_calculate_pai8_modulation_length
+	rtn
+p_calculate_GFSK_modulation_length:
+	fetch 1,mem_fcc_data_length
+	beq 0x19,p_calculate_gfsk_modulation_length_dh1
+	beq 0x78,p_calculate_gfsk_modulation_length_dh3
+	beq 0xf0,p_calculate_gfsk_modulation_length_dh5
+p_calculate_gfsk_modulation_length_dh1:
+	arg 53,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+p_calculate_gfsk_modulation_length_dh3:
+	arg 203,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+p_calculate_gfsk_modulation_length_dh5:
+	arg 354,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable	
 
-p_le_acknowledge:
-	call le_supervision_flush
-	call p_le_check_wak
-	fetch 1,mem_le_rxbuf
-	isolate1 md,pdata
-	setflag true,mark_ble_rx_md,mark
-	rshift pdata,pdata
-	ixor temp,pdata
-	isolate1 nesn,pdata
-	setflag true,mark_old_packet,mark	/* retransmit */
-	fetch 1,mem_le_rxbuf+1			
-	branch p_le_ack_unenc,blank		/* empty packet, no decryption */
-	fetch 1,mem_le_state
-	bbit0 lestate_encryption,p_le_ack_unenc
-	rtnmark1 mark_old_packet
-	call load_sk
-	call le_decrypt
-	setflag blank,mark_le_mic_ok,mark
-	nrtn blank
-p_le_ack_unenc:
-	rtn user2
-	rtnmark1 mark_old_packet
-	set1 mark_le_mic_ok,mark
-	fetcht 1,mem_le_arq
-	setflip nesn,temp
-	storet 1,mem_le_arq
-	rtn	
 
-p_le_adv:
-	branch z_le_adv
-/*
-	fetch 1,mem_le_adv_enable
-	rtn blank
-	arg le_adv_interval_timer,queue
-	call timer_check
-	nrtn blank
-	disable master
+p_pnloop_stable:
+	ifetch 1,contr
+	inject mod,8
+	loop p_pnloop_stable
+	call p_test_ble_bt_tx_off
 	enable swfine
-	call le_init_adv
-	call le_next_adv_channel
-	call le_send_adv_ind
-	nbranch le_adv_not_match,match
-	fetch 1,mem_le_req_rcv
-	increase 1,pdata
-	store 1,mem_le_req_rcv
-	fetch 1,mem_le_rxbuf
-	and pdata,0x0f,pdata
-	beq SCAN_REQ,p_le_send_scan_response
-	branch le_adv+18
-
-p_le_send_scan_response:
-	arg SCAN_RSP,temp
-	fetch 1,mem_le_adv_own_addr_type
-	nsetflag blank,LE_SENDER_ADDR_BIT,temp
-	storet 1,mem_le_txheader
-	fetcht 1,mem_le_scan_data_len
-	add temp,6,pdata
-	store 1,mem_le_txlen
-	copy temp,loopcnt
-	fetch 1,mem_le_adv_own_addr_type
-	call p_le_get_public_addr,blank
-	ncall p_le_get_random_addr,blank
-	storet 6,mem_le_txpayload
-	arg mem_le_scan_data,contr
-	call memcpy
-	branch le_transmit_norx
-*/
-
-
-
-p_le_fifo_release_first_node:
-	call free_ble_snd_buffer
-	deposit type
-	rtneq LLID_LE_LL
-	branch p_hci_send_event_number_of_completed_packet_le
-
-
-
-p_le_fifo_malloc_tx:
-	storer rega,2,mem_alloc_buffer_len
-	call malloc_ble_snd_buffer
-	copy regb,contw
-	fetch 2,mem_alloc_buffer_len
-	istore 1,contw
-	setarg 0
-	istore 1,contw
-	istorer type,1,contw
-	rtn
-
-malloc_ble_snd_buffer:
-	call malloc_buffer
-	arg mem_snd_ble_block,rega
-	branch queue_insert
-
-free_ble_snd_buffer:
-	arg mem_snd_ble_block,rega
-	call queue_delete
-	branch free_buffer	
-
-
-p_simple_pairing_sequence:
-         fetch 1,mem_sp_flag
-         rtn blank
-	jam      SP_FLAG_STANDBY,mem_sp_flag
-	fetch    1,mem_sp_state
-	beq  SP_STAT_CONFIRM_CHECK,p_sp_confirm_check
-	branch simple_pairing_sequence+5
-
-
-
-p_master_simple_paring_sequence:
-	fetch 1,mem_master_sp_flag
-	rtn blank
-	jam SP_FLAG_STANDBY,mem_master_sp_flag
-	fetch 1,mem_master_sp_state
-	beq SP_MASTER_STAT_START_SKIP,p_sp_master_send_io_cap_get
-	//beq SP_STAT_CONFIRM_SEND,p_master_sp_send_lmp_dhkey_check
-	beq SP_STAT_CONFIRM_CHECK,p_sp_confirm_check
-	//beq SP_STATE_END,p_master_sp_sm_end
-	branch master_simple_paring_sequence+5
-
-p_sp_confirm_check:
-	call sp_confirm_check
-	branch p_hci_send_simple_pairing_complete_event
-
-
-p_master_sp_send_lmp_dhkey_check:
-	branch tid_reply
-
-p_master_sp_sm_end:
-	//jam DEFAULT_STATEMACHINE,mem_sp_localsm
-	jam SP_STAT_DONE,mem_master_sp_state
-	call tid_initiate
-	//jam LMP_AU_RAND,mem_lmo_opcode2
-	call check_localsm_master
-ifdef SIMPLE_PAIRING
-	branch sp_master_key_prarm_push,true
-	branch sp_link_key_prarm_push
-endif
-	rtn
+	arg 0x350,stop_watch
+p_stable_stop:
+	branch p_test_tx_new_param,timeout
+//	call hci_rx_packet
+//	call p_interface_for_usb_cmd
+	fetch 7,mem_fcc_param
+	fetcht 7,mem_fcc_param_new
+	isub temp,null
+	branch p_stable_stop,zero
+	call p_test_ble_bt_tx_off
+	branch p_test_tx_new_param
+	
+p_calculate_pai4_modulation_length:
+	fetch 1,mem_fcc_data_length
+	beq 0x19,p_calculate_pai4_modulation_length_dh1
+	beq 0x78,p_calculate_pai4_modulation_length_dh3
+	beq 0xf0,p_calculate_pai4_modulation_length_dh5
+//call ice_break
+p_calculate_pai4_modulation_length_dh1:
+	arg 87,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+p_calculate_pai4_modulation_length_dh3:
+	arg 387,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+p_calculate_pai4_modulation_length_dh5:
+	arg 686,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+	
+p_calculate_pai8_modulation_length:
+	fetch 1,mem_fcc_data_length
+	beq 0x19,p_calculate_pai8_modulation_length_dh1
+	beq 0x78,p_calculate_pai8_modulation_length_dh3
+	beq 0xf0,p_calculate_pai8_modulation_length_dh5
+//call ice_break
+p_calculate_pai8_modulation_length_dh1:
+	arg 120,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+p_calculate_pai8_modulation_length_dh3:
+	arg 570,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+p_calculate_pai8_modulation_length_dh5:
+	arg 1022,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop_stable
+	
+p_calculate_pai4_modulation_length_hoping:
+	fetch 1,mem_fcc_data_length
+	beq 0x19,p_calculate_pai4_modulation_length_dh1_hoping
+	beq 0x78,p_calculate_pai4_modulation_length_dh3_hoping
+	beq 0xf0,p_calculate_pai4_modulation_length_dh5_hoping
+//call ice_break
+p_calculate_pai4_modulation_length_dh1_hoping:
+	arg 105,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_calculate_pai4_modulation_length_dh3_hoping:
+	arg 405,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_calculate_pai4_modulation_length_dh5_hoping:
+	arg 705,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+	
+p_calculate_pai8_modulation_length_hoping:
+	fetch 1,mem_fcc_data_length
+	beq 0x19,p_calculate_pai8_modulation_length_dh1_hoping
+	beq 0x78,p_calculate_pai8_modulation_length_dh3_hoping
+	beq 0xf0,p_calculate_pai8_modulation_length_dh5_hoping
+//call ice_break
+p_calculate_pai8_modulation_length_dh1_hoping:
+	arg 120,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_calculate_pai8_modulation_length_dh3_hoping:
+	arg 590,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_calculate_pai8_modulation_length_dh5_hoping:
+	arg 1000,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+	
+p_tx_data_hopping:
+	fetch 1,mem_fcc_mod
+	beq 1,p_calculate_GFSK_modulation_length_hoping
+	beq 3,p_calculate_pai4_modulation_length_hoping
+	beq 7,p_calculate_pai8_modulation_length_hoping
+	rtn
+	
+p_calculate_GFSK_modulation_length_hoping:
+	fetch 1,mem_fcc_data_length
+	beq 0x19,p_calculate_gfsk_modulation_length_dh1_hoping
+	beq 0x78,p_calculate_gfsk_modulation_length_dh3_hoping
+	beq 0xf0,p_calculate_gfsk_modulation_length_dh5_hoping
+//call ice_break
+p_calculate_gfsk_modulation_length_dh1_hoping:
+	arg 55,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_calculate_gfsk_modulation_length_dh3_hoping:
+	arg 205,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_calculate_gfsk_modulation_length_dh5_hoping:
+	arg 355,loopcnt
+	arg mem_pn9,contr
+	branch p_pnloop2
+p_pnloop2:
+	ifetch 1,contr
+	inject mod,8
+	loop p_pnloop2
+	branch p_test_tx_off	//,timeout
+//	call hci_rx_packet
+	//call p_interface_for_usb_cmd
+	fetch 7,mem_fcc_param
+	fetcht 7,mem_fcc_param_new
+	isub temp,null
+	branch p_tx_data,zero
+	call p_test_ble_bt_tx_off
+	branch p_test_tx_new_param
+
+p_test_tx_off:
+	//jam 0,0x8074
+	call p_test_ble_bt_tx_off
+	call timer_check
+	arg 15,queue
+	setarg 1
+	call timer_init
+p_125_clk:
+	arg 15,queue
+	call timer_check
+	branch p_change_ch,blank
+//	call hci_rx_packet
+//	call p_interface_for_usb_cmd
+	fetch 7,mem_fcc_param
+	fetcht 7,mem_fcc_param_new
+	isub temp,null
+	branch p_125_clk,zero
+	branch p_test_tx_new_param
+p_change_ch:
+	random pdata
+	store 1,mem_random_ch
+//call p_log_loop
+p_less_max:
+	fetch 1,mem_random_ch
+	sub pdata,0x50,null
+	branch p_rewrite_ch,positive
+	increase -80,pdata
+	store 1,mem_random_ch
+	branch p_less_max
+p_rewrite_ch:
+	fetch 1,mem_random_ch
+	beq 0,p_randomis0
+	beq 1,p_randomis0
+	store 1,mem_fcc_ch_new
+//call p_log_loop
+	branch p_test_tx_new_param
+p_randomis0:
+	jam 0x02,mem_fcc_ch_new
+//call p_log_loop
+	branch p_test_tx_new_param
 
-p_sp_master_send_io_cap_get:
-	jam SP_FLAG_COMMIT,mem_master_sp_flag
-	jam SP_MASTER_STAT_START_DONE,mem_master_sp_state
-	rtn
-
-p_hci_parse_packet_cmd_ogf_link_control_io_cap_request_reply:	//2B
-	//BD_ADDR, IO_Capability, 
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	call p_ipc_rx_hci_data_thr_byte
-	store 3,mem_sp_iocap_local
-	arg 7,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 6,mem_plap
-	istore 6,contw
-	call  ipc_hci_tx_start
-	fetch 1,mem_io_cap_flag
-	beq 1,p_io_cap_master_req
-p_io_cap_slave_req:
-	jam hci_cmd_io_cap,mem_hci_cmd
-//	arg 0xc600,rega
-//	arg 0xcc,temp
-//	call debug_log_print
-	rtn
-p_io_cap_master_req:
-	call cmd_ssp
-	jam LOCAL_STATEMACHINE,mem_sp_localsm //init ssp state machine
-//	arg 0xc600,rega
-//	arg 0xdd,temp
-//	call debug_log_print
-	rtn
-
-p_hci_parse_packet_cmd_ogf_link_control_user_confirmation_request_reply:	//2C
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	//jam hci_cmd_user_confirm_reply,mem_hci_cmd
-	call p_cmd_user_confirm_reply		//todo
-	arg 7,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 6,mem_plap
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-p_sp_check_ssp_available:
-	disable true
-	fetch 1,mem_simple_pairing_mode
-	rtn blank
-	fetch 2,mem_lmpext_ssp_enable
-	fetcht 1,mem_remote_sppcap
-	iand temp,pdata
-	//rtn blank
-	fetch 1,mem_sp_state
-	nrtn blank			// avoid re-entry
-	call p_hci_send_io_cap_req_event
-	jam 0x01,mem_io_cap_flag //io cap req
-	enable true
-	rtn
-
-p_cmd_user_confirm_reply:
-	// process dhkey check now
-	//rtn master
-	jam  SP_STAT_CONFIRM_CALC,mem_sp_state
-	jam  SP_FLAG_COMMIT,mem_sp_flag
-	rtn
-
-p_hci_send_io_cap_response_event:
-	//BD_ADDR-6,IO_Capability-1,OOB_Data_Present-1,Authentication_Requirements-1
-	jam 9,mem_mesh_event_para_total_length
-	jam HCI_EVENT_IO_CAP_RESPONSE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 6,mem_plap
-	istore 6,contw
-	fetch 3,mem_sp_iocap_remote
-	istore 3,contw
-	branch ipc_hci_tx_start
+p_set_freq_tx:
+	storet 1,mem_last_freq
+	//add temp,tx_freq_offset,rega			/* index to frequency */
+	add temp,1,rega			/* index to frequency */
+	call p_rf_write_freq
+	setarg param_pll_setup
+	call p_sleep
+	//tmp
+	//jam 0x66,0x964
 	
-//p_hci_send_user_confirmation_req_event:
-//	//call p_cmd_user_confirm_reply
-//	jam 10,mem_mesh_event_para_total_length
-//	jam HCI_EVENT_USER_CONFIRMATION_REQUEST,mem_mesh_event_head_event_code
-//	call p_hci_prepare_send_event
-//	fetch 6,mem_plap
-//	istore 6,contw
-	
-//	branch ipc_hci_tx_start
-
-p_hci_send_io_cap_req_event:
-	// BD_ADDR
-	jam 6,mem_mesh_event_para_total_length
-	jam HCI_EVENT_IO_CAP_REQ,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 6,mem_plap
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-//p_hci_send_user_confirm_req_event:
-//	//BD_ADDR-6,Numeric_Value-4
-//	jam 10,mem_mesh_event_para_total_length
-//	jam HCI_EVENT_USER_CONFIRMATION_REQUEST,mem_mesh_event_head_event_code
-//	call p_hci_prepare_send_event
-//	fetch 6,mem_plap
-//	istore 6,contw
-//	fetch 4,mem_gkey	//mem_sp_gkey
-//	istore 4,contw
-//	branch ipc_hci_tx_start
-
-//hci_send_sp_complete_event:
-//	//Status-1,BD_ADDR-6
-//	jam 7,mem_mesh_event_para_total_length
-//	jam HCI_EVENT_SIMPLE_PAIRING_COMPLETE,mem_mesh_event_head_event_code
-//	call p_hci_prepare_send_event
-//	force 0,pdata
-//	istore 1,contw
-//	fetch 6,mem_plap
-//	istore 6,contw
-//	branch ipc_hci_tx_start
-
-
-
-
-	//jam LMP_IO_CAP_RES,mem_lmo_opcode2
-	//rtn
-
+p_txon:
 
+	jam 0x1,rfen_adc
 
+/*
+	jam 0xa0,0x95c
+	jam 0x84,0x95d
+	jam 0x88,0x95e
+*/
 
+	jam 0x3c,rfen_rx
+	jam 0xe0,rfen_tx
+	jam 0x12,0x896d			/*Max added, for best Pout*/
+	nop 10 /* wait LDOs to turn ON*/
+	jam 0x01, rfen_mdm
+	jam 0x3d, rfen_mdm
+	nop 10 /* wait tx blocks to turn ON*/
+	jam 0xb7,rfen_sn
+	nop 10 /* wait tx lo buffer to turn ON*/
+	jam 0x7d, rfen_mdm
+	//jam 0x4a,0x895a
+	//jam 0x26,0x895a
+	//jam 0x80,0x895c
+	//jam 0x70,0x895c
+	//pout ramp up
 
-p_hci_send_simple_pairing_complete_event:
-	//Status(1), BD_ADDR(6)
-	jam 7,mem_mesh_event_para_total_length
-	jam HCI_EVENT_SIMPLE_PAIRING_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0
- 	istore 1,contw
- 
-	fetch 6,mem_plap
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-p_hci_send_encryption_change_complete_event:
-	//Status(1), conn_handle(2), enc_mode(1)
-	jam 4,mem_mesh_event_para_total_length
-	jam HCI_EVENT_ENCRYPTION_CHANGE_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0
- 	istore 1,contw
- 
-	fetcht 1,mem_conn_handle
-	istoret 2,contw
 
-	//enc_mode
-	setarg 1
- 	istore 1,contw
- 
-	branch ipc_hci_tx_start
-
-
-p_parse_lmp_not_accepted:
-	fetch 1,mem_rxbuf+1
-	store 1,mem_lmi_accepted_opcode
-	beq LMP_AU_RAND,p_parse_lmp_not_accepted_aurand//ok
-	branch parse_lmp_not_accepted+3
-
-
-p_parse_lmp_not_accepted_aurand:
-	fetch 1,mem_device_option
-	bne dvc_op_headset,parse_lmp_not_accepted_aurand_send_detach
-	fetch 1,mem_link_key_exists
-	rtn blank
-	fetcht 1,mem_reconn_lmp_sm
-	jam 0,mem_reconn_lmp_sm
-	jam 0,mem_link_key_exists
-	fetch 1,mem_rxbuf+2
-	rtnne KEY_MISSING
-	storet 1,mem_reconn_lmp_sm
-	jam LOCAL_STATEMACHINE,mem_sp_localsm
-//	call p_hci_send_io_cap_req_event
-	call p_sp_check_ssp_available
-	nbranch p_hci_send_pincode_req_event,true	
-	rtn	
-	
+	//jam 0xff, 0x956   //jam 0xce, 0x956 only for yc1021C1_#7, BQB, -2.9dBm. changed for ramp_up/down+5dbm
+	//jam 0xc0, 0x956
+	//jam 0xf0,0x8956//0dbm
+	//jam 0xdf,0x8956//3dbm
+	fetch 1,mem_rf_txon_param2
+	store 1,0x8956
+	nop 4
+	//can be deleted
+	jam 0xd1, 0x8955
+	nop 4
+	jam 0xd2, 0x8955
+	nop 4
+	jam 0xd8, 0x8955
+	nop 4
 
-p_parse_lmp_features_req:
-	call parse_lmp_features_req
-p_store_remote_features:
-	// features
-	fetch 8,mem_rxbuf+1
-	store 8,mem_remote_features
+	//jam 0xdf, 0x955  //jam 0xd7, 0x955 only for yc1021C1_#7, BQB, -2.9dBm. changed for ramp_up/down+5dbm
+	//jam 0xd0, 0x955
+	//jam 0xd8,0x8955//0dbm
+	//jam 0xdf,0x8955//3dbm
+	fetch 1,mem_rf_txon_param1
+	store 1,0x8955
+	jam 0xd8,0x8955
+	jam 0xf0,0x8956
 	rtn
 	
-
-p_parse_lmp_max_slot_req:
-	fetch 1,mem_max_slot
-	pincrease 1
-	fetcht 1,mem_rxbuf+1
-	isub temp,null
-	nbranch p_parse_lmp_max_slot_req_not_accept,positive
-p_parse_lmp_max_slot_event:
-	storet 1,mem_max_slot
-	call accept_lmp_msg
-	branch z_hci_send_max_slots_change
-
-p_parse_lmp_max_slot_req_not_accept:
-	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
+/*
+p_ch_log:
+	arg mem_log,pdata
+	store 2,mem_wptr
+	rtn
+p_log_loop:
+//copy pdata,temp
+	fetcht 1,mem_fcc_ch_new
+	fetch 2,mem_wptr
+	copy pdata,contw
+	istoret 1,contw
+	copy contw,pdata
+	store 2,mem_wptr
+	sub pdata,0x48ff ,null
+	call p_stop,zero
 	rtn
+p_stop:
+	rtn
+*/
+/*
+p_tostart:
+	jam 0x01,mem_fcc_ch_new
+	branch p_test_tx_new_param
+*/
+p_rf_write_freq:
 
-
-	
-p_parse_lmp_features_res:
-	call parse_lmp_features_res
-	branch p_store_remote_features
-
-
-
-
-process_dmh_common_zero_len:
-	fetch 1,mem_lch_code
-	and_into 0x03,pdata
-	bne LLID_L2CAP_CONT,process_dmh_data_end
-	// If we have no buffer to receive packet, then stop receive new packet
-	arg mem_alloc_big_block,rega
-	call queue_get_len
-	branch end_of_packet,blank
-	branch process_dmh_data_end
-
-
-
-
-p_process_dmh_common:
-	//storer loopcnt,2,mem_len
-	deposit loopcnt
-	store 2,mem_len
-	branch process_dmh_common_zero_len,blank
-	isub mask3ff,null
-	branch error_payload,positive	/* packet too large, discard */
-	and mark,0x01,pdata
-//	set0 mark_fhs_eir,mark
-	nbranch p_process_dmh_common_packet1,blank
-p_process_dmh_common_packet:	
-	// reserve one big buffer for host
-//	arg mem_alloc_big_block,rega
-//	call p_queue_get_len
-//	beq 1,end_of_packet
+	setarg 2400
+	iadd rega,temp
+	fetch 1,mem_fcomp_mul
+	jam 0x04,rf_pll_rstn
+	imul32 temp,pdata
+	fetcht 1,mem_fcomp_div
+	idiv temp
+	call p_wait_div_end
+	quotient rega			/* rega is FLOOR(FVCO/fcomp) */
+	remainder pdata		
+	lshift16 pdata,pdata
+	lshift4 pdata,pdata		/* pdata is frac * 2^20 */
+	idiv temp
+	call p_wait_div_end
+	quotient pdata		/* pdata is frac *2^20/fcomp */
+	lshift8 pdata,pdata
+	lshift pdata,pdata
+	ior rega,pdata
+	//increase 20,pdata
+	//setflip 0,pdata
+	store 4,rf_pll_intg
+
+	//tmp
+	//jam 0x60,0x964
+	
+	jam 0x44,rf_pll_rstn
+	//nop 500
+	jam 0xc4,rf_pll_rstn
+	//nop 400
 	
-	fetch 1,mem_lch_code
-	and_into 0x03,pdata
-	beq LLID_LMP,process_lmp
-
-	// l2cap
-	bmark1 mark_old_packet,ack_payload
-p_process_dmh_common_packet1:
-	fetcht 2,mem_l2cap_rx_max_lenth
-	increase -3,temp
-	fetch 2,mem_len	
-	isub temp,null
-	branch error_payload,positive
+	/*
+	increase 1,pdata
+	nop 10
+	store 1,rf_pll_intg
+	nop 400
+	increase -1,pdata
+	nop 10
+	store 1,rf_pll_intg
+	*/
 	
-	// reserve one big buffer for host
-	arg mem_alloc_big_block,rega
-	call p_queue_get_len
-	beq 1,end_of_packet
-
-	call malloc_rcv_buffer_is_enough
-	branch end_of_packet,blank
-
-p_process_dmh_data_into_buff_normal:
-	call p_get_br_rcv_ptr
-	copy contr,contw
-
-	fetch 1,mem_lch_code
-	istore 1,contw
-	fetch 2,mem_len
-	istore 2,contw
-	branch process_dmh_data
-
-
-
-p_process_dmh_data_end:
-	parse demod,bucket,16  /* cycle through the crc */
-
-	call rf_debug_active_crc_error_line,crc_failed
-
-//	fetch 1,mem_tws_state
-//	beq TWS_STATE_SLAVE_CONNECTED,process_dmh_data_end_tws
-//	beq TWS_STATE_MASTER_LISTEN,process_dmh_data_end_tws
-//	beq TWS_STATE_MASTER_CONNECTED,process_dmh_data_end_tws
-	
-	branch error_payload_crc,crc_failed
-	bmark0 mark_fhs_eir,process_dmh_packet
-	set0 mark_fhs_eir,mark
-	rtn
-
-
-
-p_process_dmh_l2cap_packet:
-	// Just send buffer 
-	call p_hci_send_acl_encode_classic
-
-	branch process_dmh_cont
-
-
-
-
-
-
-// Classic Snd Manager
-/*********************************************************/
-//char* malloc(short len)
-//input: rega -> len
-//rtn: regb -> pbuff;return from pdata
-//val: queue -> i
-//val: timeup -> buff_cnt
-/*********************************************************/
-p_l2cap_malloc:
-	storer rega,2,mem_alloc_buffer_len
-
-	call malloc_br_snd_buffer
-	fetchr rega,2,mem_alloc_buffer_len
-	rtn
-
-/*********************************************************/
-//void* l2cap_malloc_fifo_out(void)
-//output:len -> temp
-//output:ptr ->pdata
-//only get ptr,not free
-/*********************************************************/
-p_l2cap_malloc_fifo_out:
-	arg mem_snd_br_block,rega
-	branch queue_get_read_ptr
-
-/*********************************************************/
-//void free_first_buff_in_fifo(void)
-//only free the first one
-/*********************************************************/
-p_l2cap_malloc_free:
-	call free_br_snd_buffer
-	branch p_hci_send_event_number_of_completed_packet_classic
-/*********************************************************/
-//void l2cap_malloc_discard(void)
-//discard the latest malloc
-/*********************************************************/
-p_l2cap_malloc_discard:
-	branch free_br_snd_buffer
-/*********************************************************/
-//bool fifo_is_full(void)
-//blank == 1: not full
-//blank == 0: full
-/*********************************************************/
-p_l2cap_malloc_is_fifo_full:
-	call malloc_buffer_is_full_big
-	branch setarg1,blank
-	branch setarg0
-
-/*********************************************************/
-//bool fifo_nearly_full(void)
-//blank == 1: nearly full
-//blank == 0: not nearly full
-/*********************************************************/
-
-//p_l2cap_malloc_is_fifo_nearly_full:
-//	arg mem_alloc_big_block,rega
-//	call queue_get_len
-//	copy pdata,regb
-
-//	arg mem_alloc_normal_block,rega
-//	call queue_get_len
-//	iadd regb,pdata
-
-//	// reserve 2 buffer, sometimes need send two packet.
-//	sub pdata,2,null
-
-//	branch setarg1,positive
-//	branch setarg0
-
-
-/*********************************************************/
-//bool fifo_is_empty(void)
-//blank == 1: empty
-//blank == 0: not empty
-/*********************************************************/
-p_l2cap_malloc_is_fifo_empty:
-	arg mem_snd_br_block,rega
-	branch p_queue_get_len
-
-/*********************************************************/
-//char* l2cap_malloc_fifo_get_first_ptr(void)
-//output:contr  -->ptr
-/*********************************************************/	
-p_l2cap_malloc_fifo_get_first_ptr:
-	branch assert
-
-
-
 
+	rtn
 
-p_scheduler_tx_l2cap_pkt:
-	call p_l2cap_malloc_is_fifo_empty
-	rtn blank //empty
-	
-	fetch 1,mem_op
-	rtnbit1 op_txl2cap
-	call l2cap_malloc_fifo_out
-	//store 2,mem_txptr
-	//copy pdata,contr
-	ifetch 2,contr
-	store 2,mem_tx_len
+p_wait_div_end:	
+	rtn modone
+	branch p_wait_div_end
+pp_pn9:
+	arg 1022,loopcnt
+ 	arg mem_pn9,contw
+  	setarg 0x1ff
+    	force 0,regb
+pp_pn9_loop:    
+    rshift3 pdata,rega
+    rshift rega,rega
+    ixor rega,rega
+    isolate1 0,rega
+    setflag true,9,pdata
+    rshift temp,temp
+    isolate1 0,pdata
+    setflag true,7,temp
+    rshift pdata,pdata
+    increase 1,regb
+    compare 0,regb,0x7
+    nbranch pp_pn9_loop,true
+    //copy temp,pdata
+    istoret 1,contw
+ //   inject mod,8
+    loop pp_pn9_loop
+    rtn
 
-	ifetch 1,contr
-	set1 2,pdata //set go bit
-	store 1,mem_tx_lch//start pkt
 	
-	copy contr,pdata
-	store 2,mem_txptr
-
-	fetch 2,mem_l2cap_tx_multi_offset
-	branch p_scheduler_tx_l2cap_start_pkt,blank
-	// not think continue will send 2dh5, reduce code size
-	branch scheduler_tx_l2cap_cont_pkt
-p_scheduler_tx_l2cap_start_pkt:
-	fetch 2,mem_tx_len
-	branch assert,blank
-	arg l2cap_max_pkt_len_new,temp //max len of 2dh5 pkt
-	isub temp,pdata
-	branch scheduler_Tx_l2cap_last_pkt,zero
-	branch scheduler_tx_l2cap_start_pkt+4
-
-
-
-
-
-
-p_init_lmp_work:
-	jam 0,mem_link_key_exists
-	branch  init_lmp_work+1
-
-
-
-
-
-
-
-
-
-
+	/* set all unused gpio to output mode to save power */
 /*
-	Dynamic load, use for "mergepatch.pl"
-*/
-p_zcode_entrance_2Bytes_common:
-	store 2, mem_zcode_temp_param0
-	branch p_zcode_entrance 
-
-p_zcode_entrance:
-	fetcht 2,mem_zcode_temp_param0 // zcode number @ high 4bit
-	rshift4 temp,temp
-	fetch 2,mem_zcode_current_number
-	isub temp,null
-	branch zcode_run,zero // if this zcode is already loaded, do not load again
-	storet 2,mem_zcode_current_number
-p_load_zcode:
-	//increase 1,temp
-	setarg ZCODE_BUFF_SIZE
-	imul32 temp,temp
-	fetch 3,mem_xip_flash_offset
-	isub temp,pdata
-	fetcht 3,mem_storage_start_addr
-	iadd temp,pdata
-	increase -4,pdata
-	store 3,mem_flash_address
-	setarg ZCODE_BUFF_SIZE
-	store 2,mem_flash_trans_length
-	setarg mem_zcode_buff_user
-	store 2,mem_flash_data_address
-	call qspi_get_lock
-	call check_m0_qspi_lock_and_pause
-	fetch 1,core_qspi_ctrl
-	store 1,mem_pdatatemp
-	call qspi_read
-	fetch 1,mem_pdatatemp
-	store 1,core_qspi_ctrl
-
-	jam 0,mem_qspi_lock_flag_respin
-	//call qspi_free_lock
-
-	setarg mem_zcode_buff_user
-	branch zcode_entrance0
-
-
-ifdef TEST_QUEUE_DEBUG
-//input: pdata
-test_buffer_check:
-	// start ptr
-	arg mem_alloc_big_block_start,rega
-	arg 10,loopcnt
-test_buffer_check_loop:
-	ifetcht 3,rega
-	isub temp,null
-	call ice_break,zero
-	// regb store the target ptr
-	add rega,3,rega
-	loop test_buffer_check_loop
+p_gpio:
+	fetch 4,core_gpio_pu0
+	fetcht 4,core_gpio_pd0
+	ior temp,pdata
+	pinvert
+	fetcht 4,core_gpio_oe0
+	ior temp,pdata
+	store 4,core_gpio_oe0
 	rtn
-endif
-
-p_send_lmp_detach:
-	force 2,pdata
-	call msg_send_lmp
-	fetch 1,mem_disconn_reason_send
-	istore 1,contw
-	call send_lmp_request
-p_prepare_disconnect:
-	fetch 1,mem_op
-	set1 op_disconn,pdata
-	store 1,mem_op
-	jam 1,mem_conn_timer
-	rtn	
-
-p_le_slave_disconn:
-	call le_att_destroy_notify_pool
-	//fall through
-p_le_disconnect:
-	call le_clear_connection_info+1
-	call app_disconn_reason_collect_ble
-ifdef SECURE_CONNECTION
-	call sp_initialize_256
-endif
-	jam BT_EVT_LE_DISCONNECTED,mem_fifo_temp
-	branch ui_ipc_send_event	
+	
+p_pause_c51:
+	jam 5,core_docd_ctrl
+	rtn
+*/
+p_assert:
+	branch p_assert
 
-p_le_master_disconn:
-	call p_le_disconnect
-	disable master
-	rtn	
+p_loop:
+	branch p_loop
 
-p_lpm_dispatch_unconn:
-	fetch 1,mem_context
-	rtnbit1 state_inconn					// wont sleep in connection
-	rtnbit1 state_inpage					// wont sleep when paging
-	fetch 1,mem_ssp_enable
-	branch p_lpm_unconn_nossp,blank
-	fetch 1,mem_sp_local_key_invalid	// simple pairing is not ready
-	rtn blank
-p_lpm_unconn_nossp:
-//	fetch 1,mem_le_adv_enable
-//	nbranch lpm_unconn_cont,blank
-	branch lpm_unconn_cont
-
-cb_enter_lpm:
-	fetch 1,mem_lmp_conn_state
-	store 1,mem_xlmp_conn_state
-	branch enter_hibernate_prepare_work
-	
-
-cb_enter_hibernate:
-//	call ice_break
-	jam MCU_STATE_HIBERNATE,mem_ipc_mcu_state
-	call ipc_check_ack
-
-enter_hibernate_prepare_work:
-	call qspi_powerdown_flash
-p_clear_gpio_before_sleep:	
-	call p_clear_gpio_before_sleep_sub2
-	arg 32,loopcnt
-	arg core_gpio_conf,contr
-p_setgpio_loop:
-	copy contr,contw
-	ifetch 1,contr
-	beq gpcfg_qspi_sck,p_setgpio_pulldown
-	beq gpcfg_qspi_io0,p_setgpio_pulldown
-	beq gpcfg_qspi_io1,p_setgpio_pulldown
-	beq gpcfg_qspi_io3 ,p_setgpio_pulldown
-	beq gpcfg_iic_scl,p_setgpio_pulldown
-	beq gpcfg_iic_sda,p_setgpio_pulldown
-	bne gpcfg_input,p_setgpio_loop_end
-p_setgpio_pulldown:
-	setarg gpcfg_pulldown
-	istore 1,contw
-p_setgpio_loop_end:
-	loop p_setgpio_loop
-	rtn
-
-p_clear_gpio_before_sleep_sub2:	
-	arg 8,loopcnt
-	arg core_gpio_conf1,contr
-	branch p_setgpio_loop
-
-p_lpm_dispatch:
-	fetch 1,mem_lpm_mode
-	rtn blank
-	call p_l2cap_malloc_is_fifo_empty
-	nrtn blank
-	arg mem_snd_ble_block,rega
-	call p_queue_get_len	
-	nrtn blank
-	arg mem_alloc_big_block,rega
-	call p_queue_get_len
-	fetcht 1,mem_alloc_normal_total_size
-	isub temp,null
-	nrtn zero
-	branch lpm_dispatch+12
+p_le_enable:
+	enable le
+	jam 7,rfen_ulp			/* enable ulp */
+	rtn
+p_set_freq_rx:
+		/* IF is +2MHz */
+	storet 1,mem_last_freq
+	add temp,rx_freq_offset,rega			/* index to frequency */
+	branch p_rf_write_freq
 
-//get qspi lock
-qspi_get_lock:
-	jam 1,mem_qspi_lock_flag_respin // I'm interested
-
-	jam QSPI_LOCK_VICTIM_RESPIN,mem_qspi_lock_victim// you go first
-qspi_get_lock_wait:
-	fetch 1,mem_qspi_lock_flag_cm0
-	rtn blank
-	
-	fetch 1,mem_qspi_lock_victim
-	rtnne DEBUG_LOG_LOCK_VICTIM_RESPIN
-	branch qspi_get_lock_wait
-
-//free qspi lock
-//qspi_free_lock:
-//	jam 0,mem_qspi_lock_flag_respin
+	
+//p_interface_for_usb_cmd:
+//	fetch 1,mem_usb0_setup+1
+//	beq COM_TEST_SC,p_dispose_test_sc
+//	//beq COM_TEST_CD,p_dipose_test_cd
+//	beq COM_TEST_DAT,p_dispose_rf_data
+//	beq COM_TEST_LOW_CH,p_dispose_test_low_ch
+//	beq COM_TEST_MID_CH,p_dispose_test_mid_ch
+//	beq COM_TEST_HIG_CH,p_dispose_test_hig_ch
+//	beq COM_TEST_SW_HIG,p_dispose_test_sw_hig
+//	beq COIM_TEST_SW_LOW,p_dispose_test_sw_low
+//	//beq COM_TEST_SW_STOP,p_dispose_test_sw_stop
+//	beq COM_TEST_POW_5,p_dispose_test_pow_5
+//	beq COM_TEST_POW_0,p_dispose_test_pow_0
+//	beq COM_TEST_POW_N5,p_dispose_test_pow_n5
+//	beq COM_TEST_POW_N10,p_dispose_test_pow_n10
+//	beq COM_TEST_EXIT,p_dispose_test_exit
 //	rtn
-ifdef FYT_LJ_TEST
-p_feasyblue_test:
-p_feasyblue_assert_patch_counts_protect:
-	arg mem_patch00,contr
-	arg 0x40,loopcnt
-	setarg 0
-p_feasyblue_assert_patch_counts_protect_loop:
-	ifetcht 1,contr
-	iadd temp,pdata
-	loop p_feasyblue_assert_patch_counts_protect_loop
-	arg 0x5b9,temp
-	isub temp,null
-	ncall ice_break,zero
+//p_dispose_test_sc:
+//	jam 0x20,mem_fcc_data_new
+//	jam 0,mem_usb0_setup+1
+//	rtn
+//p_dispose_rf_data:
+//	jam 0,mem_fcc_data_new
+//	jam 0,mem_usb0_setup+1
+//	rtn
+//p_dispose_test_low_ch:
+//	jam 2,mem_fcc_ch_new
+//	jam 0,mem_usb0_setup+1
+//	rtn
+//p_dispose_test_mid_ch:
+//	jam 41,mem_fcc_ch_new
+//	jam 0,mem_usb0_setup+1
+//	rtn
+//p_dispose_test_hig_ch:
+//	jam 80,mem_fcc_ch_new
+//	jam 0,mem_usb0_setup+1
 //	rtn
-p_headset_end_addr_blank_protect:
-	arg mem_headset_end,contr
-	arg 0x10,loopcnt
-	setarg 0
-p_headset_end_addr_blank_protect_loop:
-	ifetcht 1,contr
-	iadd temp,pdata
-	loop p_headset_end_addr_blank_protect_loop
-	ncall ice_break,blank
-	rtn
-endif
-
 /*
- *in remote test,it may occured that we received a wrong packet header in low probability.
- *the hv3 and 2ev3 type packet have no protection.
- * We didn't judge the length of the package,the value of mem_sco_rx_packet_len is zero in default. so command 'loop' may errors.
+p_dispose_test_sw_hig:
+	fetch 1,mem_fcc_ch_new
+	pincrease 1
+	store 1,mem_fcc_ch_new
+	jam 0,mem_usb0_setup+1
+	rtn
+p_dispose_test_sw_low:
+	fetch 1,mem_fcc_ch_new
+	increase -1,pdata
+	store 1,mem_fcc_ch_new
+	jam 0,mem_usb0_setup+1
+	rtn
 */
-p_rx_type_dispatch:
-	deposit type
-	beq type_hv3, end_of_packet
-	beq type_2ev3,end_of_packet
-	branch rx_type_dispatch+2
-	
\ No newline at end of file
+//p_dispose_test_pow_5:
+//	jam 0xdf,mem_rf_txon_param1
+//	jam 0xff,mem_rf_txon_param2
+//	jam 0xd0,mem_rf_shutdown_param1
+//	jam 0xe0,mem_rf_shutdown_param2
+//	jam 0,mem_usb0_setup+1
+//	arg mem_5db_tx_power_param,rega
+//	call p_copy_power_param_to_att_list
+//	branch p_fcc_start
+//p_dispose_test_pow_0:
+//	jam 0xd8,mem_rf_txon_param1
+//	jam 0xf0,mem_rf_txon_param2
+//	jam 0xd0,mem_rf_shutdown_param1
+//	jam 0xe0,mem_rf_shutdown_param2
+//	jam 0,mem_usb0_setup+1
+//	arg mem_0db_tx_power_param,rega
+//	call p_copy_power_param_to_att_list
+//	branch p_fcc_start
+//p_dispose_test_pow_n5:
+//	jam 0xd8,mem_rf_txon_param1
+//	jam 0xcb,mem_rf_txon_param2
+//	jam 0xd0,mem_rf_shutdown_param1
+//	jam 0xc0,mem_rf_shutdown_param2
+//	jam 0,mem_usb0_setup+1
+//	arg mem_f5db_tx_power_param,rega
+//	call p_copy_power_param_to_att_list
+//	branch p_fcc_start
+//p_dispose_test_pow_n10:
+//	jam 0xd8,mem_rf_txon_param1
+//	jam 0xc7,mem_rf_txon_param2//decrease
+//	jam 0xd0,mem_rf_shutdown_param1
+//	jam 0xc0,mem_rf_shutdown_param2
+//	jam 0,mem_usb0_setup+1
+//	arg mem_f10db_tx_power_param,rega
+//	call p_copy_power_param_to_att_list
+//	branch p_fcc_start
+p_copy_power_param_to_att_list:
+	arg 10,loopcnt
+	arg mem_le_att_list+468,contw
+	copy rega,contr
+	branch memcpy
+//p_dispose_test_exit:
+//	jam 0,mem_24g_test
+//	jam 0,mem_usb0_setup+1
+//	branch p_fcc_start
+	
Index: ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog	(nonexistent)
@@ -1,1813 +0,0 @@
-
-
-
-org z
-z_hci_parse_packet_cmd_ogf_link_control:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_INQUIRY,z_hci_parse_packet_cmd_ogf_link_control_inquiry	//1
-	beq HCI_INQUIRY_CANCEL,z_hci_parse_packet_cmd_ogf_link_control_inquiry_cancel	//2
-	beq HCI_CREATE_CONNECTION,z_hci_parse_packet_cmd_ogf_link_control_create_connection	//5
-	beq HCI_ACCEPT_CONNECTION,z_hci_parse_packet_cmd_ogf_link_control_accept_connection	//9
-
-	branch z_hci_parse_packet_cmd_ogf_link_control1
-	
-
-z_hci_parse_packet_cmd_ogf_link_control_inquiry:	//1
-	set1 mark_inquiry_on,mark
-	call p_ipc_rx_hci_data_thr_byte
-	store 3,mem_glap
-	call p_ipc_rx_hci_data_one_byte
-	arg 2048,temp
-	imul32 temp,pdata
-	arg 0xffff,temp
-	isub temp,null
-	nbranch z_hci_inquiry_nowrap,positive
-	deposit temp
-z_hci_inquiry_nowrap:
-	force inquiry_length_timer,queue
-	call timer_init
-	call p_ipc_rx_hci_data_one_byte //todo
-	store 1,mem_inquiry_num_responses
-	store 1,mem_inquiry_num_check
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_control_inquiry_cancel:	//2
-	jam hci_cmd_inquiry_cancel,mem_hci_cmd
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_link_control_create_connection:		//5
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_packet_type
-	call p_ipc_rx_hci_data_two_byte
-	store 1,mem_page_mode
-	call p_ipc_rx_hci_data_two_byte /*read clock*/
-//	bbit0 15,z_create_connection_unsave_clk_offset
-//	iadd clkn_bt,pdata
-//	and_into 0x1fc,pdata
-//	store 4,mem_page_clk
-//z_create_connection_unsave_clk_offset:
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_allow_switch
-	jam 1,mem_conn_status
-	jam hci_cmd_create_conn,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_control_accept_connection:	//9
-	fetch 1,mem_conn_req_status
-	beq 0,p_hci_send_event_command_status_err_unknown_connection
-	beq 2,p_hci_send_event_command_status_err_command_disallowed
-	fetch 1,mem_conn_status
-	beq 2,p_hci_send_event_command_status_err_command_disallowed
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	jam hci_cmd_accept_conn,mem_hci_cmd
-	call p_ipc_rx_hci_data_one_byte
-	beq 1,p_hci_send_event_command_status	
-	jam hci_cmd_accept_with_switch,mem_hci_cmd
-	call p_hci_send_event_command_status
-	branch accept_lmp_msg
-
-org z
-z_hci_parse_packet_cmd_ogf_controller_and_baseband:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_SET_EVENT_MASK,z_hci_parse_packet_cmd_ogf_controller_and_baseband_set_event_mask	//01
-	beq HCI_RESET,z_hci_parse_packet_cmd_ogf_controller_and_baseband_reset	//03
-	beq HCI_WRITE_LOCAL_NAME,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_local_name	//13
-	beq HCI_READ_LOCAL_NAME,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_local_name	//14
-	beq HCI_READ_PAGE_TIMEOUT,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_page_timeout	//17
-	beq HCI_WRITE_PAGE_TIMEOUT,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_page_timeout	//18
-	beq HCI_READ_SCAN_ENABLE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_scan_enable	//19
-	beq HCI_WRITE_SCAN_ENABLE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_scan_enable	//1A
-	beq HCI_READ_PAGE_SCAN_ACTIVITY,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_page_scan_activity	//1B
-	
-	branch z_hci_parse_packet_cmd_ogf_controller_and_baseband1
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_set_event_mask:
-	call p_ipc_rx_hci_data_eight_byte
-	store 8,mem_mesh_event_mask
-	branch p_hci_send_event_command_complete_without_payload
-	
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_reset:
-	call p_hci_send_event_command_complete_without_payload
-	branch p_hci_init_parameter
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_local_name:
-	call p_ipc_rx_restore_contr
-	arg mem_local_name,contw
-	arg 66,loopcnt
-	call memcpy
-	arg 66,loopcnt
-	arg mem_local_name,contr
-	arg 0,temp
-	call p_check_tx_length
-	storet 1,mem_local_name_length
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_local_name:
-	arg 249,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	arg mem_local_name,contr
-	arg 64,loopcnt
-	call memcpy_loop
-	arg 23,loopcnt
-	call memset0
-	branch ipc_hci_tx_start
-	
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_page_timeout:	//17
-	arg 3,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 2, mem_page_to
-	istore 2,contw
-	branch ipc_hci_tx_start
-	
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_page_timeout:	//18
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_page_to
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_scan_enable:	//19
-	arg 2,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_scan_mode
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_scan_enable:	//1A
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_scan_mode
-	branch p_hci_send_event_command_complete_without_payload
-
-
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_page_scan_activity:	//1B
-	arg 5,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	//setarg 0x0013
-	fetch 2,mem_pscan_interval
-	istore 2,contw
-	//setarg 0x0014
-	fetch 2,mem_pscan_window
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-
-org z
-z_hci_parse_packet_cmd_ogf_infomational_parameters:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_READ_LOCAL_VERSION_INFORMATION,z_hci_parse_packet_cmd_ogf_infomational_parameters_read_version_information
-	beq HCI_READ_LOCAL_SUPPORTED_COMMANDS,z_hci_parse_packet_cmd_ogf_infomational_parameters_read_supported_command
-	beq HCI_READ_LOCAL_SUPPORTED_FEATURES,z_hci_parse_packet_cmd_ogf_infomational_parameters_read_supported_features
-	beq HCI_READ_LOCAL_EXT_FEATURES,z_hci_parse_packet_cmd_ogf_infomational_parameters_read_local_ext_features
-	beq HCI_READ_BUFFER_SIZE,z_hci_parse_packet_cmd_ogf_infomational_parameters_read_buffer_size
-	beq HCI_READ_BD_ADDR,z_hci_parse_packet_cmd_ogf_infomational_parameters_read_bd_addr
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_infomational_parameters_read_version_information:
-	arg 9,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 8,mem_mesh_read_local_version_info
-	istore 8,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_infomational_parameters_read_supported_command:
-	arg 65,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	arg mem_mesh_read_local_support_command,contr
-	arg 64,loopcnt
-	call memcpy
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_infomational_parameters_read_supported_features:
-	arg 9,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 8,mem_features
-	istore 8,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_infomational_parameters_read_bd_addr:
-	arg 7,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 6,mem_lap
-	istore 6,contw
-	branch ipc_hci_tx_start
-z_hci_parse_packet_cmd_ogf_infomational_parameters_read_local_ext_features:
-z_hci_parse_packet_cmd_ogf_infomational_parameters_read_buffer_size:
-	arg 8,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	setarg 680
-	istore 2,contw
-	setarg 60
-	istore 1,contw
-	setarg 8
-	istore 2,contw
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-
-org z
-z_hci_parse_packet_cmd_ogf_le_controller:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_LE_SET_EVENT_MASK,z_hci_parse_packet_cmd_ogf_le_controller_set_event_mask	//01
-	beq HCI_LE_READ_BUFFER_SIZE,z_hci_parse_packet_cmd_ogf_le_controller_read_buffer_size		//02
-	beq HCI_LE_READ_LOCAL_SUPPORTED_FEATURES,z_hci_parse_packet_cmd_ogf_le_controller_read_supported_features	//03
-	beq HCI_LE_SET_RANDOM_ADDRESS,z_hci_parse_packet_cmd_ogf_le_controller_set_random_address		//05
-	beq HCI_LE_SET_ADVERTISING_PARAMETERS,z_hci_parse_packet_cmd_ogf_le_controller_set_adv_para	//06
-	
-	branch z_hci_parse_packet_cmd_ogf_le_controller1
-	
-z_hci_parse_packet_cmd_ogf_le_controller_set_event_mask:	//01
-	call p_ipc_rx_hci_data_eight_byte
-	store 8,mem_mesh_le_event_mask
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_read_buffer_size:	//02
-	arg 4,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	setarg 0x0400fb
-	istore 3,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_le_controller_read_supported_features:	//03
-	arg 9,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 8,mem_le_features
-	istore 8,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_random_address:		//05
-	fetch 1,mem_le_adv_enable
-	nbranch p_hci_send_event_command_complete_error_command_disallowed,blank
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_mesh_le_random_address
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_adv_para:		//06
-	fetch 1,mem_le_adv_enable
-	nbranch p_hci_send_event_command_complete_error_command_disallowed,blank
-	call p_ipc_rx_hci_data_two_byte	//Advertising interval min
-	store 2,mem_le_adv_interval_min
-	call p_ipc_rx_hci_data_two_byte	//Advertising interval max
-	store 2,mem_le_adv_interval_max
-	call p_ipc_rx_hci_data_one_byte	//Advertising type
-	call z_hci_check_advertising_type
-	storet 1,mem_le_adv_type
-	call p_ipc_rx_hci_data_one_byte	//Own address type
-	call z_hci_set_public_addr,blank
-	ncall z_hci_set_random_addr,blank
-	call p_ipc_rx_hci_data_one_byte	//Peer Address type
-	call p_ipc_rx_hci_data_six_byte	//Peer Address
-	call p_ipc_rx_hci_data_one_byte	//Advertising channel map
-	store 1,mem_le_adv_channel_map
-	call p_ipc_rx_hci_data_one_byte //Advertising_Filter_Policy
-	store 1,mem_le_white_list_filter_policy
-	branch p_hci_send_event_command_complete_without_payload	
-
-z_hci_check_advertising_type:
-	arg ADV_IND,temp
-	rtneq 0x00
-	arg ADV_NONCONN_IND,temp
-	rtneq 0x03
-	arg ADV_SCAN_IND,temp
-	rtneq 0x02
-	arg ADV_DIRECT_IND,temp
-	rtn
-
-z_hci_set_public_addr:
-	fetcht 6,mem_device_public_address
-	storet 6,mem_le_lap
-	jam PUBLIC_ADDR,mem_le_adv_own_addr_type
-	rtn
-z_hci_set_random_addr:
- 	jam RANDOM_ADDR,mem_le_adv_own_addr_type
-	rtn
-
-
-org z
-z_hci_parse_packet_cmd_ogf_link_policy:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_SNIFF_MODE,z_hci_parse_packet_cmd_ogf_link_policy_sniff_mode
-	beq HCI_EXIT_SNIFF_MODE,z_hci_parse_packet_cmd_ogf_link_policy_exit_sniff_mode
-	beq HCI_SWITCH_ROLE,z_hci_parse_packet_cmd_ogf_link_policy_switch_role	//B
-	beq HCI_READ_LINK_POLICY_SETTINGS,z_hci_parse_packet_cmd_ogf_link_policy_read_link_policy_settings    //C
-	beq HCI_WRITE_LINK_POLICY_SETTINGS,z_hci_parse_packet_cmd_ogf_link_policy_write_link_policy_settings    //D
-	branch z_hci_parse_packet_cmd_ogf_link_policy_branch1
-
-z_hci_parse_packet_cmd_ogf_link_policy_sniff_mode:
-	fetch 2,mem_link_policy_settings
-	bbit0 Sniff_Mode,p_hci_send_event_command_status_err_command_disallowed
-	fetch 2,mem_default_link_policy_settings
-	bbit0 Sniff_Mode,p_hci_send_event_command_status_err_command_disallowed
-	fetch 1,mem_conn_status
-	bne 2,p_hci_send_event_command_status_err_unknown_connection
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_hci_sniff_conn_handle
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_hci_sniff_max_interval
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_hci_sniff_min_interval
-	setarg 0x40
-	store 2,mem_sniff_param_interval
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_sniff_param_attempt
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_sniff_param_timeout
-	jam hci_cmd_in_sniff,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_policy_exit_sniff_mode:
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_hci_sniff_conn_handle
-	fetch 1,mem_mode
-	bbit0 acl_in_sniff,p_hci_send_event_command_status_err_command_disallowed
-	jam hci_cmd_exit_sniff,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_policy_switch_role:	//B
-	fetch 1,mem_conn_status
-	bne 2,p_hci_send_event_command_status_err_unknown_connection
-	fetch 2,mem_link_policy_settings
-	bbit0 Role_Switch,p_hci_send_event_command_status_err_command_disallowed
-	fetch 2,mem_default_link_policy_settings
-	bbit0 Role_Switch,p_hci_send_event_command_status_err_command_disallowed
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	call p_ipc_rx_hci_data_one_byte //todo deal
-	jam hci_cmd_role_switch,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_policy_read_link_policy_settings:
-	call p_hci_parse_connection_handle_check
-	arg 5,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	fetch 2,mem_link_policy_settings
-	istore 2,contw
-	branch ipc_hci_tx_start
-	
-z_hci_parse_packet_cmd_ogf_link_policy_write_link_policy_settings:
-	call p_hci_parse_connection_handle_check
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_link_policy_settings
-	arg 3,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-org z
-z_hci_parse_packet_cmd_ogf_link_policy_branch1:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_READ_DEFAULT_LINK_POLICY_SETTINGS,z_hci_parse_packet_cmd_ogf_link_policy_read_default_link_policy_settings    //E
-	beq HCI_WRITE_DEFAULT_LINK_POLICY_SETTINGS,z_hci_parse_packet_cmd_ogf_link_policy_write_default_link_policy_settings     //F
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-
-z_hci_parse_packet_cmd_ogf_link_policy_read_default_link_policy_settings:
-	arg 3,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 2,mem_default_link_policy_settings
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_link_policy_write_default_link_policy_settings:
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_default_link_policy_settings
-	branch p_hci_send_event_command_complete_without_payload
-	
-org z
-z_hci_parse_packet_cmd_ogf_controller_and_baseband1:
-	fetch 1,mem_mesh_hci_opcode_ocf	
-	beq HCI_WRITE_PAGE_SCAN_ACTIVITY,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_paga_scan_activity	//1C
-	beq HCI_READ_INQUIRY_SCAN_ACTIVITY,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_inquiry_scan_activity	//1D
-	beq HCI_WRITE_INQUIRY_SCAN_ACTIVITY,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_inquiry_scan_activity	//1E
-	beq HCI_READ_CLASS_OF_DEVICE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_class_of_device		//23
-	beq HCI_WRITE_CLASS_OF_DEVICE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_class_of_device		//24
-	beq HCI_READ_INQUIRY_SCAN_TYPE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_inquiry_scan_type	//42
-	beq HCI_WRITE_INQUIRY_SCAN_TYPE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_inquiry_scan_type	//43
-	beq HCI_READ_INQUIRY_MODE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_inquiry_mode	//44
-	beq HCI_WRITE_INQUIRY_MODE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_inquiry_mode	//45
-	beq HCI_READ_PAGE_SCAN_TYPE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_page_scan_type	//46
-	beq HCI_WRITE_PAGE_SCAN_TYPE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_page_scan_type	//47
-	beq HCI_READ_EXTENDED_INQUIRY_RESPONSE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_eir //51
-
-	branch z_hci_parse_packet_cmd_ogf_controller_and_baseband2
-	
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_paga_scan_activity:	//1C
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_pscan_interval
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_pscan_window
-	branch p_hci_send_event_command_complete_without_payload
-	
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_inquiry_scan_activity:	//1D
-	arg 5,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	//setarg 0x0013
-	fetch 2,mem_iscan_interval
-	istore 2,contw
-	//setarg 0x0014
-	fetch 2,mem_iscan_window
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_inquiry_scan_activity:	//1E
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_iscan_interval
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_iscan_window
-	branch p_hci_send_event_command_complete_without_payload
-
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_class_of_device:
-	arg 4,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 3,mem_class
-	istore 3,contw
-	branch ipc_hci_tx_start
-	
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_class_of_device:
-	call p_ipc_rx_hci_data_thr_byte
-	store 3,mem_class
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_inquiry_scan_type:	//42
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_inquiry_scan_type:	//43
-	call p_ipc_rx_hci_data_one_byte
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_inquiry_mode:	//44
-	arg 2,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_inquiry_mode
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_inquiry_mode:	//45
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_inquiry_mode
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_page_scan_type:	//46
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_page_scan_type:	//47
-	//Standard Scan, normal reply
-	call p_ipc_rx_hci_data_one_byte
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_eir:    //51
-	arg 242,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_fec_required
-	istore 1,contw
-	// TODO: here think use match length, like 240
-	arg mem_eir,contr
-	arg 100,loopcnt
-	call memcpy
-	//call memset0
-	branch ipc_hci_tx_start
-
-
-
-org z
-z_hci_parse_packet_cmd_ogf_link_control1:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_DISCONNECT,z_hci_parse_packet_cmd_ogf_link_control_disconnect	//6
-	beq HCI_CREATE_CONNECTION_CANCEL,z_hci_parse_packet_cmd_ogf_link_control_create_connection_cancel	//8
-	beq HCI_REJECT_CONNECTION,z_hci_parse_packet_cmd_ogf_link_control_reject_connection	//A
-
-	branch z_hci_parse_packet_cmd_ogf_link_control2
-	
-	
-z_hci_parse_packet_cmd_ogf_link_control_disconnect:
-	call p_ipc_rx_hci_data_two_byte	/*connect handle*/
-	store 1,mem_hci_conn_handle
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_disconn_reason_send
-	
-	call context_search_conn_handle
-	nbranch p_hci_send_event_command_status_err_unknown_connection,zero
-
-	// check is classic or ble
-	add rega,coffset_mode,contr
-	ifetch 1,contr
-	bbit1 mode_le,p_hci_control_disconnect_le
-
-z_hci_control_disconnect_classic:
-	jam hci_cmd_disconn,mem_hci_cmd
-	//jam 0x16,mem_disconn_reason
-	fetch 1,mem_hci_conn_handle
-	fetcht 1,mem_sco_handle
-	isub temp,null
-	nbranch p_hci_send_event_command_status,zero
-	jam hci_cmd_disconn_sco,mem_hci_cmd
-	fetch 1,mem_sco_asso_handle
-	store 1,mem_hci_conn_handle
-	branch p_hci_send_event_command_status
-
-
-z_hci_parse_packet_cmd_ogf_link_control_create_connection_cancel:	//8
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	jam hci_cmd_detach,mem_hci_cmd
-	fetch 1,mem_conn_status
-	beq 0x01,z_hci_create_conn_cancel_success
-	beq 0x02,z_hci_connection_already_exists_err
-	branch z_hci_connection_cancel_err_no_connection
-z_hci_connection_already_exists_err:
-	jam HCI_ERROR_MAX_ACL_CONNECTIONS,mem_mesh_command_complete_return_parameter_status
-	branch z_hci_connection_cancel_err
-z_hci_create_conn_cancel_success:
-	jam COMMAND_SUCCEEDED,mem_mesh_command_complete_return_parameter_status
-	call z_hci_connection_cancel_err
-	jam HCI_ERROR_NO_CONNECTION,mem_mesh_event_parameter_status
-	branch p_hci_send_connection_rtn_error
-z_hci_connection_cancel_err_no_connection:
-	jam HCI_ERROR_NO_CONNECTION,mem_mesh_command_complete_return_parameter_status
-z_hci_connection_cancel_err:
-	arg 7,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status
-	fetch 6,mem_hci_plap
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_link_control_reject_connection:	//A
-	fetch 1,mem_conn_req_status
-	beq 0,p_hci_send_event_command_status_err_unknown_connection
-	beq 2,p_hci_send_event_command_status_err_command_disallowed
-	fetch 1,mem_conn_status
-	beq 2,p_hci_send_event_command_status_err_command_disallowed
-	jam 2,mem_conn_req_status
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	call p_ipc_rx_hci_data_one_byte	//todo
-	store 1,mem_mesh_event_parameter_status
-	jam hci_cmd_reject_conn,mem_hci_cmd
-	call p_hci_send_event_command_status
-	branch p_hci_send_connection_rtn_error
-
-
-org z
-z_hci_parse_packet_cmd_ogf_link_control2:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_LINK_KEY_REQUEST_REPLY,z_hci_parse_packet_cmd_ogf_link_control_link_key_request_reply	//B
-	beq HCI_LINK_KEY_REQUEST_NEGATIVE_REPLY,z_hci_parse_packet_cmd_ogf_link_control_link_key_request_negative_replay	//C
-	beq HCI_PIN_CODE_REQUEST_REPLY,z_hci_pin_code_request_reply
-	beq HCI_PIN_CODE_REQUEST_NEGATIVE_REPLY,z_hci_pin_code_request_negative_reply
-	beq HCI_AUTHENTICATION_REQUESTED,z_hci_parse_packet_cmd_ogf_link_control_authentication_requested	//11
-	beq HCI_SET_CONNECTION_ENCRYPTION,z_hci_parse_packet_cmd_ogf_link_control_set_connection_encryption	//13
-
-	branch z_hci_parse_packet_cmd_ogf_link_control3
-	
-
-z_hci_parse_packet_cmd_ogf_link_control_link_key_request_reply:	//B
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	arg mem_link_key,contw
-	force 16,loopcnt
-	call p_ipc_rx_hci_data_n_byte
-	jam 1,mem_link_key_exists
-	jam hci_cmd_linkkey,mem_hci_cmd
-	branch z_hci_pin_code_reply
-
-z_hci_parse_packet_cmd_ogf_link_control_link_key_request_negative_replay:	//C
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	jam hci_cmd_nokey,mem_hci_cmd
-	call z_hci_pin_code_reply
-	call p_sp_check_ssp_available
-	nbranch p_hci_send_pincode_req_event,true
-	//force 0x01,pdata
-	//store 1,mem_io_cap_flag
-	//fetch 1,mem_simple_pairing_mode
-	//beq  1,p_hci_send_io_cap_req_event
-	//branch p_hci_send_pincode_req_event
-	//rtn
-
-
-z_hci_pin_code_request_reply:
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_pin_length
-	iforce loopcnt
-	arg mem_pin,contw
-	call p_ipc_rx_hci_data_n_byte
-	jam hci_cmd_pair,mem_hci_cmd
-	branch z_hci_pin_code_reply
-
-z_hci_pin_code_request_negative_reply:
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	jam hci_cmd_nopair,mem_hci_cmd
-z_hci_pin_code_reply:
-	arg 7,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 6,mem_plap
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-
-z_hci_parse_packet_cmd_ogf_link_control_authentication_requested:	//11
-	call p_ipc_rx_hci_data_two_byte
-	store 1,mem_hci_conn_handle
-	jam hci_cmd_auth,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_control_set_connection_encryption:	//13
-	call p_ipc_rx_hci_data_two_byte
-	store 1,mem_hci_conn_handle
-	call p_ipc_rx_hci_data_one_byte
-	increase hci_cmd_stopencrypt,pdata
-	store 1,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-org z
-z_hci_parse_packet_cmd_ogf_link_control3:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_REMOTE_NAME_REQUEST,z_hci_parse_packet_cmd_ogf_link_control_remote_name_request	//19
-	beq HCI_READ_REMOTE_EXT_FEATURES,z_hci_parse_packet_cmd_ogf_link_control_read_remote_ext_features	//1C
-	beq HCI_READ_REMOTE_VERSION_INFORMATION,z_hci_parse_packet_cmd_ogf_link_control_read_remote_version_information	//1D
-	beq HCI_IO_CAP_REQUEST_REPLY,p_hci_parse_packet_cmd_ogf_link_control_io_cap_request_reply	//2B
-	beq HCI_USER_CONFIRMATION_REQUEST_REPLY,p_hci_parse_packet_cmd_ogf_link_control_user_confirmation_request_reply	//2C
-	beq HCI_READ_REMOTE_SUPPORTED_FEATURES,z_hci_parse_packet_cmd_ogf_link_control_read_remote_supported_features	//1B
-
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_link_control_remote_name_request:	//19
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_hci_plap
-	call p_ipc_rx_hci_data_two_byte
-	store 1,mem_page_mode
-	call p_ipc_rx_hci_data_two_byte
-	iadd clkn_bt,pdata
-	and_into 0x1fc,pdata
-	store 4,mem_page_clk
-	jam hci_cmd_remote_name_req,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-
-z_hci_parse_packet_cmd_ogf_link_control_read_remote_ext_features:	//1C
-	fetch 1,mem_conn_status
-	bne 2,p_hci_send_event_command_status_err_unknown_connection
-	call p_ipc_rx_hci_data_two_byte
-	branch p_hci_send_event_command_status_err_unknown_connection,blank
-	call p_ipc_rx_hci_data_one_byte
-	store 1, mem_ext_features_page
-	jam hci_cmd_remote_ext_features_req,mem_hci_cmd
-	branch p_hci_send_event_command_status
-
-z_hci_parse_packet_cmd_ogf_link_control_read_remote_version_information:
-	call p_ipc_rx_hci_data_two_byte	//connect handle
-	store 1,mem_hci_conn_handle
-
-	call context_search_conn_handle
-	nbranch p_hci_send_event_command_status_err_unknown_connection,zero
-
-	// check is classic or ble
-	add rega,coffset_mode,contr
-	ifetch 1,contr
-	bbit1 mode_le,z_hci_control_read_remote_version_le
-
-z_hci_control_read_remote_version_classic:
-	call p_hci_send_event_command_status
-	branch cmd_version_req
-
-z_hci_control_read_remote_version_le:
-	call p_hci_send_event_command_status
-	branch le_send_version_ind
-	
-
-z_hci_parse_packet_cmd_ogf_link_control_read_remote_supported_features:	//1B
-	// TODO: Think judge link exist or not.
-	fetch 1,mem_conn_status
-	bne 2,p_hci_send_event_command_status_err_unknown_connection
-	call p_ipc_rx_hci_data_two_byte		//rx parameters first
-	store 1,mem_hci_conn_handle
-	branch p_hci_send_event_command_status_err_unknown_connection,blank
-	call p_hci_send_event_command_status
-	fetch 8,mem_remote_features
-	nbranch z_hci_send_read_remote_supported_features_complete_event,blank
-	jam hci_cmd_remote_feature_req,mem_hci_cmd
-	rtn
-
-
-z_hci_send_read_remote_supported_features_complete_event:
-	//Status(1), Connection_Handle(2), LMP_Features(8)
-	jam 11,mem_mesh_event_para_total_length
-	jam HCI_EVENT_READ_REMOTE_FEATURES_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0
-	istore 1,contw
-	// Connection_Handle
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	// link type, 0:SCO, 1:ACL
-	fetch 8,mem_remote_features
-	istore 8,contw
-	branch ipc_hci_tx_start
-
-org z
-z_hci_parse_packet_cmd_ogf_controller_and_baseband2:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_WRITE_LINK_SUPERVISION_TIMEOUT,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_link_supervision_timeout  //37
-	beq HCI_WRITE_EXTENDED_INQUIRY_RESPONSE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_eir  //52
-	beq HCI_READ_SIMPLE_PAIRING_MODE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_simple_pairing_mode //55
-	beq HCI_WRITE_SIMPLE_PAIRING_MODE,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_simple_pairing_mode //56
-	beq HCI_READ_LE_HOST_SUPPORT,z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_le_host_support	//6C
-	beq HCI_WRITE_LE_HOST_SUPPORT,z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_le_host_support	//6D
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_link_supervision_timeout:  //37
-	call p_hci_parse_connection_handle_check
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_supervision_to
-	arg 3,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	jam hci_cmd_send_supervision,mem_hci_cmd
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_eir:   //52
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_fec_required
-	arg 100,loopcnt
-	arg mem_eir,contw
-	call p_ipc_rx_hci_data_n_byte
-	branch p_hci_send_event_command_complete_without_payload
-	
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_simple_pairing_mode:  //55
-	arg 2,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_simple_pairing_mode
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_simple_pairing_mode:  //56
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_simple_pairing_mode
-	branch p_hci_send_event_command_complete_error_command_invalid_param,blank
-	branch p_hci_send_event_command_complete_without_payload
-
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_read_le_host_support:  //6C
-	arg 3,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 2,mem_le_supported_host
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_write_le_host_support:  //6D
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_le_supported_host
-	branch p_hci_send_event_command_complete_without_payload
-
-	
-org z
-z_hci_parse_packet_cmd_ogf_le_controller1:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_LE_SET_ADVERTISING_DATA,z_hci_parse_packet_cmd_ogf_le_controller_set_adv_data	//08
-	beq HCI_LE_SET_SCAN_RESPONSE_DATA,z_hci_parse_packet_cmd_ogf_le_controller_set_scan_rsp_data	//09
-	beq HCI_LE_SET_SCAN_PARAMETERS,z_hci_parse_packet_cmd_ogf_le_controller_set_scan_para		//0b
-	beq HCI_LE_SET_SCAN_ENABLE,z_hci_parse_packet_cmd_ogf_le_controller_set_scan_enable		//0c
-	beq HCI_LE_CREATE_CONNECTION,z_hci_parse_packet_cmd_ogf_le_controller_create_connection		//0d
-
-	branch z_hci_parse_packet_cmd_ogf_le_controller2
-	
-	
-z_hci_parse_packet_cmd_ogf_le_controller_set_adv_data:	//OCF:0x0008
-	call p_ipc_rx_hci_data_one_byte	//Advertising_Data_length
-	store 1,mem_le_adv_data_len
-	copy pdata,loopcnt
-	call p_ipc_rx_hci_data_n_byte
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_scan_rsp_data:	//OCF:0x0009
-	call p_ipc_rx_hci_data_one_byte	//Advertising_Data_length
-	store 1,mem_le_scan_data_len
-	copy pdata,loopcnt
-	call p_ipc_rx_hci_data_n_byte
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_scan_para:		//OCF:0x000B	
-	fetch 1,mem_le_scan_enable
-	nbranch p_hci_send_event_command_complete_error_command_disallowed,blank
-	call p_ipc_rx_hci_data_one_byte		//LE Scan Type
-	store 1,mem_le_scan_type
-	call p_ipc_rx_hci_data_two_byte		//LE Scan Interval
-	store 2,mem_le_scan_interval
-	call p_ipc_rx_hci_data_two_byte		//LE Scan Window
-	store 2,mem_le_scan_window
-	call p_ipc_rx_hci_data_one_byte		//Own Address Type
-	store 1,mem_le_scan_own_addr_type
-	call p_ipc_rx_hci_data_one_byte		//Scanning Filter Policy
-	store 1,mem_le_white_list_filter_policy
-	// avoid param same
-	fetch 2,mem_le_scan_interval
-	fetcht 2,mem_le_scan_window
-	isub temp,null
-	nbranch p_hci_send_event_command_complete_without_payload,zero
-	lshift pdata,pdata
-	store 2,mem_le_scan_interval
-	
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_scan_enable:	//OCF:0x000C
-	call p_ipc_rx_hci_data_one_byte		//LE Scan Enable
-	store 1,mem_le_scan_enable
-	call p_ipc_rx_hci_data_one_byte		//Filter Duplicates
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_create_connection:		//OCF:0x000D
-	call p_ipc_rx_hci_data_two_byte		//LE Scan Interval
-	store 2,mem_le_scan_interval
-	call p_ipc_rx_hci_data_two_byte		//LE Scan Window
-	store 2,mem_le_scan_window
-	call p_ipc_rx_hci_data_one_byte		//initiator filter policy
-	call p_ipc_rx_hci_data_one_byte		//peer address type
-	call p_ipc_rx_hci_data_six_byte		//peer address
-	store 6,mem_le_conn_peer_addr
-	call p_ipc_rx_hci_data_one_byte		//own address type
-	store 1,mem_le_conn_peer_addr_type
-	call p_ipc_rx_hci_data_two_byte		//connect interval min
-	lshift2 pdata,pdata
-	store 2,mem_le_conn_interval
-	call p_ipc_rx_hci_data_two_byte		//connect interval max
-	call p_ipc_rx_hci_data_two_byte		//connect latency
-	store 2,mem_le_conn_latency	
-	call p_ipc_rx_hci_data_two_byte		//supervision timeout
-	store 2,mem_le_conn_superto
-	jam ON,mem_le_scan_enable
-	jam CREAT_CONNECTION,mem_mesh_creat_connection_flag
-	branch p_hci_send_event_command_status
-
-org z
-z_hci_parse_packet_cmd_ogf_le_controller2:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_LE_SET_ADVERTISE_ENABLE,z_hci_parse_packet_cmd_ogf_le_controller_set_adv_enable		//0a
-	beq HCI_LE_CREATE_CONNECTION_CANCEL,z_hci_parse_packet_cmd_ogf_le_controller_create_connection_cancel
-	beq HCI_LE_CONNECTION_UPDATE,p_hci_parse_packet_cmd_ogf_le_controller_connection_update
-	beq HCI_LE_READ_REMOTE_FEATURES,p_hci_parse_packet_cmd_ogf_le_controller_read_remote_features
-	beq HCI_LE_ENCRYPT,p_hci_parse_packet_cmd_ogf_le_controller_encrypt
-	beq HCI_LE_RAND,p_hci_parse_packet_cmd_ogf_le_controller_rand
-	beq HCI_LE_START_ENCRYPTION,p_hci_parse_packet_cmd_ogf_le_controller_start_encryption
-	beq HCI_LE_LONG_TERM_KEY_REQUEST_REPLY,p_hci_parse_packet_cmd_ogf_le_controller_ltk_request_reply
-	beq HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY,p_hci_parse_packet_cmd_ogf_le_controller_ltk_request_negative_reply
-
-	beq HCI_LE_READ_WHITE_LIST_SIZE,z_hci_parse_packet_cmd_ogf_le_controller_read_white_list_size
-	beq HCI_LE_CLEAR_WHITE_LIST,z_hci_parse_packet_cmd_ogf_le_controller_clear_white_list
-	beq HCI_LE_ADD_DEVICE_TO_WHITE_LIST,z_hci_parse_packet_cmd_ogf_le_controller_add_device_to_white_list
-	
-	branch z_hci_parse_packet_cmd_ogf_le_controller3
-
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_adv_enable:	//OCF:0x000A
-	call p_ipc_rx_hci_data_one_byte
-	store 1,mem_le_adv_enable
-	branch p_hci_send_event_command_complete_without_payload
-
-
-z_hci_parse_packet_cmd_ogf_le_controller_create_connection_cancel:
-	jam OFF,mem_le_scan_enable
-	jam CANCEL_CONNECTION,mem_mesh_creat_connection_flag
-	branch p_hci_send_event_command_complete_without_payload
-
-z_hci_parse_packet_cmd_ogf_le_controller_read_white_list_size:
-	arg 2,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	setarg LE_WHITE_LIST_MAX_SIZE
-	istore 1,contw
-	branch ipc_hci_tx_start
-z_hci_parse_packet_cmd_ogf_le_controller_clear_white_list:
-	jam 0,mem_le_white_list_cnt
-	jam 0,mem_le_white_list_type_and_bd_addr
-	jam 0,mem_le_white_list
-	branch p_hci_send_event_command_complete_without_payload
-z_hci_parse_packet_cmd_ogf_le_controller_add_device_to_white_list:
-	fetcht 1,mem_le_white_list_cnt
-	sub temp,LE_WHITE_LIST_MAX_SIZE,null
-	branch p_hci_send_event_command_complete_error_command_disallowed,zero
-	call p_ipc_rx_hci_data_seven_byte
-	store 7,mem_le_white_list_type_and_bd_addr
-	call z_le_add_device_to_white_list
-	branch p_hci_send_event_command_complete_without_payload
-
-
-
-// input: rega
-z_le_add_device_to_white_list:
-	fetch 1,mem_le_white_list_cnt
-	arg mem_le_white_list,contw
-	mul32 pdata,7,pdata
-	iadd contw,contw
-	fetch 7,mem_le_white_list_type_and_bd_addr
-	istore 7,contw
-	fetch 1,mem_le_white_list_cnt
-	pincrease 1
-	store 1,mem_le_white_list_cnt
-	rtn
-
-
-org z
-z_l2cap_init_queue:
-	fetch 1,mem_queue_init_flag
-	nbranch z_l2cap_link_queue_init,blank
-
-	jam 1,mem_queue_init_flag
-
-//	// TODO: here may occur l2cap buffer rcv error.
-//	jam BLOCK_MAX_NUM_NEW,mem_l2cap_rx_malloc_num
-//	setarg L2CAP_BIG_BUFF_LENTH
-//	store 2,mem_l2cap_rx_max_lenth
-	call z_init_all_queue
-
-	// init the big buffer queue
-	fetchr loopcnt,1,mem_alloc_big_total_size
-	fetchr regb,2,mem_param_alloc_big_buffer_start_address
-	fetch 2,mem_param_alloc_big_buffer_max_length
-	store 2,mem_temp
-	setarg mem_alloc_big_block
-	store 2,mem_temp1
-	call z_queue_init_loop
-	
-	// store the big block ptr to list
-	fetch 1,mem_alloc_big_total_size
-	mul32 pdata,3,loopcnt
-	arg mem_alloc_big_block_start,contr
-	arg mem_big_block_ptr_list,contw
-	call memcpy_fast
-	
-	// init the normal buffer queue
-	fetchr loopcnt,1,mem_alloc_normal_total_size
-	fetchr regb,2,mem_param_alloc_normal_buffer_start_address
-	fetch 2,mem_param_alloc_normal_buffer_max_length
-	store 2,mem_temp
-	setarg mem_alloc_normal_block
-	store 2,mem_temp1
-	call z_queue_init_loop
-
-	// store the big block ptr to list
-	fetch 1,mem_alloc_normal_total_size
-	mul32 pdata,3,loopcnt
-	arg mem_alloc_normal_block_start,contr
-	arg mem_normal_block_ptr_list,contw
-	branch memcpy_fast
-	
-z_queue_init_loop:
-	fetchr rega,2,mem_temp1
-	call queue_insert
-	fetch 2,mem_temp
-	iadd regb,regb
-	loop z_queue_init_loop
-	rtn
-
-z_init_all_queue:
-	setarg mem_alloc_normal_block
-	call z_queue_init
-	setarg mem_alloc_big_block
-	call z_queue_init
-	setarg mem_snd_br_block
-	call z_queue_init
-	setarg mem_snd_ble_block
-	call z_queue_init
-	setarg mem_snd_hci_block
-//input: pdata: queue start addr
-z_queue_init:
-	copy pdata,contw
-	add pdata,BLOCK_TOTAL_SIZE_OFFSET,rega // point to data ptr
-	add pdata,BLOCK_DATA_OFFSET,pdata // point to data ptr
-	istore 2,contw // header
-	istore 2,contw // rptr
-	istore 2,contw // wptr
-
-	ifetcht 1,rega // get total buffer size.
-	mul32 temp,3,temp
-	iadd temp,pdata
-	istore 2,contw // end ptr
-
-	increase 1,contw // skip total length
-
-	setarg 0
-	istore 1,contw // cur len
-
-	copy temp,loopcnt
-	branch clear_mem
-/*	
-//input:pdata
-queue_get_wrtie_ptr:
-	add rega,BLOCK_WPTR_OFFSET,pdata
-	ifetcht 2,pdata
-	ifetch 3,temp
-	branch get_pdata_contw
-*/
-
-
-org z
-z_l2cap_link_queue_init:
-	fetch 3,mem_rcv_br_queue_ptr
-	ncall z_l2cap_link_queue_free_rx_buffer,blank
-//	fetch 3,mem_rcv_ble_queue_ptr
-//	ncall z_l2cap_link_queue_free_rx_buffer,blank
-	
-	setarg 0
-	store 3,mem_rcv_br_queue_ptr
-//	store 3,mem_rcv_ble_queue_ptr
-	
-//	call z_l2cap_ble_link_queue_init
-z_l2cap_br_link_queue_init:
-	arg mem_snd_br_block,pdata
-	store 2,mem_temp
-	
-	branch z_l2cap_queue_free_all
-
-//z_l2cap_ble_queue_init:
-//	fetch 3,mem_rcv_ble_queue_ptr
-//	ncall z_l2cap_link_queue_free_rx_buffer,blank	
-//	setarg 0
-//	store 3,mem_rcv_ble_queue_ptr
-//	branch  z_l2cap_ble_link_queue_init 
-
-//z_l2cap_ble_link_queue_init:
-//	arg mem_snd_ble_block,pdata
-//	store 2,mem_temp
-//input: rega: queue block
-z_l2cap_queue_free_all:
-	fetchr rega,2,mem_temp
-	call p_queue_get_len
-	rtn blank
-	// get len will change rega
-	fetchr rega,2,mem_temp
-	call queue_delete
-	call free_buffer
-	branch z_l2cap_queue_free_all
-	
-z_l2cap_link_queue_free_rx_buffer:
-	copy pdata,regb
-	branch free_buffer
-	
-org z
-z_hci_parse_complete_packet:
-	fetch 1,mem_mesh_hci_opcode_ogf
-	beq HCI_OGF_LINK_CONTROL,z_hci_parse_packet_cmd_ogf_link_control_base
-	beq HCI_OGF_LINK_POLICY,z_hci_parse_packet_cmd_ogf_link_policy_base
-	beq HCI_OGF_CONTROLLER_AND_BASEBAND,z_hci_parse_packet_cmd_ogf_controller_and_baseband_base
-	beq HCI_OGF_INFOMATIONAL_PARAM,z_hci_parse_packet_cmd_ogf_infomational_parameters_base
-	beq HCI_OGF_STATUS_PARAM,z_hci_parse_packet_cmd_ogf_status_parameters_base
-	beq HCI_OGF_TEST,z_hci_parse_packet_cmd_ogf_testing_base
-	beq HCI_OGF_LE_CONTROLLER,z_hci_parse_packet_cmd_ogf_le_controller_base
-	beq HCI_OGF_VENDOR_SPECIFIC_DEBUG,z_hci_parse_packet_cmd_ogf_vendorspecific_debug_base
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_link_control_base:
-	branch z_hci_parse_packet_cmd_ogf_link_control
-
-z_hci_parse_packet_cmd_ogf_controller_and_baseband_base:
-	branch z_hci_parse_packet_cmd_ogf_controller_and_baseband
-
-z_hci_parse_packet_cmd_ogf_infomational_parameters_base:
-	branch z_hci_parse_packet_cmd_ogf_infomational_parameters
-
-z_hci_parse_packet_cmd_ogf_le_controller_base:
-	branch z_hci_parse_packet_cmd_ogf_le_controller
-	
-z_hci_parse_packet_cmd_ogf_link_policy_base:
-	branch z_hci_parse_packet_cmd_ogf_link_policy
-
-/*********
-	HCI_OGF_INFOMATIONAL_PARAM
-*********/
-
-/*********
-	HCI_OGF_STATUS_PARAM
-*********/
-z_hci_parse_packet_cmd_ogf_status_parameters_base:
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-
-/*********
-	HCI_OGF_TEST
-*********/
-z_hci_parse_packet_cmd_ogf_testing_base:
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-
-
-/*********
-	HCI_OGF_VENDOR_SPECIFIC_DEBUG
-*********/
-z_hci_parse_packet_cmd_ogf_vendorspecific_debug_base:
-	fetch 1,mem_mesh_hci_opcode_ocf
-	beq HCI_WRITE_BD_ADDR,z_hci_parse_packet_cmd_ogf_vendorspecific_write_bd_addr
-ifdef FSC_RTK_HOST
-	beq 0x17,z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_17
-	beq 0x20,z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_20
-	beq 0xa3,z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_a3
-	beq 0x60,z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_read_svn_version
-endif
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_vendorspecific_write_bd_addr:
-	call p_ipc_rx_hci_data_six_byte
-	store 6,mem_device_public_address
-	call p_hci_init_bd_address
-	branch p_hci_send_event_command_complete_without_payload
-
-
-ifdef FSC_RTK_HOST
-z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_17:
-	jam 0x3f,mem_fsc_rtk_host
-	branch p_hci_send_event_command_complete_without_payload
-
-
-
-z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_20:
-	arg 0x02,loopcnt
-	call p_hci_prepare_send_event_command_complete
-	setarg 0
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_a3:
-	call p_ipc_rx_hci_data_two_byte// Opcode
-	fetcht 1,mem_conn_handle
-	isub temp,null
-	branch z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_a3_event,zero
-	fetcht 1,mem_le_conn_handle
-	isub temp,null
-	nrtn zero
-z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_a3_event:	
-	storet 1,mem_hci_conn_handle
-	arg 0x03,loopcnt
-	call p_hci_prepare_send_event_command_complete
-	fetch 1,mem_hci_conn_handle
-	istore 2,contw
-	fetch 1,mem_rssi
-	call p_rssi_convert
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-z_hci_parse_packet_cmd_ogf_vendorspecific_rtk_read_svn_version:
-	arg 2,loopcnt
-	call p_hci_prepare_send_event_command_complete
-	fetch 2,mem_hci_version_svnid
-	istore 2,contw
-	branch ipc_hci_tx_start
-endif	
-
-
-org z
-z_hci_send_connection_rtn_error:
-	jam 11,mem_mesh_event_para_total_length
-	jam HCI_EVENT_CONNECTION_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 1,mem_mesh_event_parameter_status
-	istore 1,contw
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	fetch 6,mem_plap
-	istore 6,contw
-	force 1,pdata				/* connection type=1:ACL */
-	istore 1,contw
-	force 0,pdata
-	fetcht 1,mem_state_map
-	isolate1 smap_encryption,temp
-	setflag true,0,pdata
-	istore 1,contw
-	//TODO: restore connection handle
-	fetch 1,mem_conn_handle
-	branch ipc_hci_tx_start
-
-	/* temp is connection type 0=sco,1=acl */
-
-org z
-z_hci_send_page_scan_repetition_mode_change:
-	jam 7,mem_mesh_event_para_total_length
-	jam HCI_EVENT_PAGE_SCAN_REPETITION_MODE_CHANGE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 6,mem_plap
-	istore 6,contw
-	fetch 1,mem_page_scan_repetition_mode
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-org z
-z_hci_send_max_slots_change:
-	jam 3,mem_mesh_event_para_total_length
-	jam HCI_EVENT_MAX_SLOTS_CHANGE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	fetch 1,mem_max_slot
-	istore 1,contw
-	branch ipc_hci_tx_start
-	
-
-org z
-z_hci_send_disconnect_complete:
-	jam 4,mem_mesh_event_para_total_length
-	jam HCI_EVENT_DISCONNECTION_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0x00
-	istore 1,contw
-	fetch 1,mem_hci_record_disc_conn_handle
-	istore 2,contw
-	fetch 1,mem_disconn_reason_send
-	istore 1,contw
-	fetch 1,mem_state_map
-	set0 smap_edr,pdata
-	store 1,mem_state_map
-	branch ipc_hci_tx_start
-
-	
-org z
-z_hci_send_mode_change:
-	jam 6,mem_mesh_event_para_total_length
-	jam HCI_EVENT_MODE_CHANGE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 1,mem_mesh_event_parameter_rtn
-	istore 1,contw
-	fetch 1,mem_conn_handle
-	istore 2,contw
-	fetch 1,mem_mesh_event_parameter_status
-	istore 1,contw
-	branch z_hci_send_mode_change_active,blank
-	fetch 2,mem_tsniff
-	rshift pdata,pdata
-	branch z_hci_send_mode_change_sniff
-z_hci_send_mode_change_active:
-	setarg 0
-z_hci_send_mode_change_sniff:
-	istore 2,contw
-	branch ipc_hci_tx_start
-
-org z
-z_hci_parse_packet_cmd_ogf_le_controller3:
- 	fetch 1,mem_mesh_hci_opcode_ocf
- 	beq HCI_LE_REMOVE_DEVICE_FROM_WHITE_LIST,z_hci_parse_packet_cmd_ogf_le_controller_remove_device_from_white_list
-	beq HCI_LE_SET_DATA_LENGTH,z_hci_parse_packet_cmd_ogf_le_controller_set_data_length
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
-z_hci_parse_packet_cmd_ogf_le_controller_remove_device_from_white_list:
-	fetch 1,mem_le_white_list_cnt
-	branch p_hci_send_event_command_complete_error_command_disallowed,blank
-	call p_ipc_rx_hci_data_seven_byte
-	store 7,mem_le_white_list_type_and_bd_addr
-	call z_le_remove_device_from_white_list
-	fetch 1,mem_le_white_list_cnt
-	pincrease -1
-	store 1,mem_le_white_list_cnt
-	branch p_hci_send_event_command_complete_without_payload
-
-z_le_remove_device_from_white_list:
-	call p_check_addr_in_white_list
-	nbranch p_hci_send_event_command_complete_error_command_disallowed,blank
-z_le_remove_device_from_white_list_loop:
-	copy regb,contw
-	increase 7,regb
-	copy regb,contr
-	ifetch 7,contr
-	istore 7,contw
-	loop z_le_remove_device_from_white_list_loop
-	setarg 0
-	increase -7,contw
-	istore 7,contw
-	rtn
-	
-
-z_hci_parse_packet_cmd_ogf_le_controller_set_data_length:
-	//length
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_local_tx_max_octets
-	//time
-	call p_ipc_rx_hci_data_two_byte
-	store 2,mem_local_tx_max_time
-	call p_le_send_data_length_req
-	
-	arg 3,loopcnt
-	call p_hci_prepare_send_event_command_complete_with_status_success
-	fetch 1,mem_le_conn_handle
-	istore 2,contw
-	branch ipc_hci_tx_start
-	//branch p_hci_send_event_command_complete_without_payload
-	
-org z
-z_hci_inquiry_reply_check_eir:
-	fetch 1,mem_inquiry_mode
-	bne 2,z_hci_inquiry_reply
-	call inquiry_receive_eir
-	nrtn sync
-	rtnmark1 mark_fhs_eir	
-z_hci_inquiry_reply:
-	//call inquiry_receive_eir_rtn
-	fetcht 6,extm_lap
-	call context_search_plap2
-	rtn zero
-	call p_estimate_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg 0x01
-	//Num_responses
-	istore 1,contw
-	fetch 6,extm_lap
-	//bd_addr
-	istore 6,contw
-	fetch 1, extm_fhs_misc
-	copy pdata, temp
-	rshift3 pdata, pdata
-	rshift3 pdata, pdata
-	//page_scan_repetition_mode
-	istore 1,contw
-	setarg 0x00
-	//reserved1
-	istore 1,contw
-	fetch 1,mem_inquiry_mode
-	bne 0,z_hci_inquiry_reply_mode1		
-z_hci_inquiry_reply_mode0:
-	setarg 0x00
-	//reseved2
-	istore 1,contw
-	fetch 3, extm_class
-	istore 3,contw
-	fetch 4,mem_clke_bt
-	isub clkn_bt,pdata
-	istore 2,contw
-	branch ipc_hci_tx_start
-z_hci_inquiry_reply_mode1:
-	fetch 3, extm_class
-	istore 3,contw
-	fetch 4,mem_clke_bt
-	isub clkn_bt,pdata
-	istore 2,contw
-	fetch 1,mem_rssi
-	call p_rssi_convert
-	istore 1,contw
-	fetch 1,mem_inquiry_mode
-	beq 2,z_hci_inquiry_reply_mode2
-	branch ipc_hci_tx_start
-z_hci_inquiry_reply_mode2:
-	fetch 3,mem_rcv_br_queue_ptr
-	copy pdata,contr
-	ifetch 1,contr
-	ifetch 2,contr
-	rtn blank
-	copy pdata,temp
-	copy pdata,loopcnt
-	call memcpy_fast
-	sub temp,240,loopcnt
-	call clear_mem
-	branch ipc_hci_tx_start
-
-org z
-z_send_lmp_escape:
-	fetch 1,mem_lmp_to_send
-	beq LMP_EXT_FEATURES_RES,z_send_lmpext_features_res
-	beq LMP_EXT_FEATURES_REQ,z_send_lmpext_features_req
-	branch send_lmp_escape
-z_send_lmpext_features_res:
-	fetcht 1,mem_simple_pairing_mode
-	storet 1,mem_lmpext_ssp_enable+1
-	branch send_lmpext_features_res
-z_send_lmpext_features_req:
-	fetcht 1,mem_simple_pairing_mode
-	storet 1,mem_lmpext_ssp_enable+1
-	branch send_lmpext_features_req
-
-org z
-z_hci_send_linkkey_notification:
-	jam 0x17,mem_mesh_event_para_total_length
-	jam HCI_EVENT_LINK_KEY_NOTIFICATION,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	fetch 6,mem_plap
-	istore 6,contw
-	arg mem_link_key,contr
-	force 16,loopcnt
-	call memcpy_fast
-	force 0,pdata
-	istore 1,contw
-	branch ipc_hci_tx_start
-
-org z
-
-//input:temp connection handle
-//MASTER_CONNECTION_HANDLE
-//SLAVE_CONNECTION_HANDLE
-z_hci_send_event_le_connection_complete:
-	fetch 8,mem_mesh_le_event_mask
-	rtnbit0 LE_CONNECTION_COMPLETE_EVENT
-	jam 19,mem_mesh_event_para_total_length
-	jam HCI_EVENT_LE_META_EVENT,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg HCI_LE_SUBEVENT_CONN_COMPLETE
-	istore 2,contw	//subevent code & status
-	fetch 1,mem_le_conn_handle
-	istore 2,contw	//connection handle
-	call p_le_get_role
-	istoret 1,contw	//role
-	fetch 1,mem_le_conn_peer_addr_type
-	istore 1,contw	//peer address type
-	fetch 6,mem_le_plap
-	istore 6,contw	//peer address
-	fetch 2,mem_le_tsniff
-	rshift2 pdata,pdata
-	istore 2,contw	//connection interval
-	fetch 4,mem_le_slave_latency
-	istore 4,contw	//connect latency & supervision timeout
-	fetch 1,mem_le_peer_sca
-	istore 1,contw	//master clock accuracy
-	fetch 1,mem_le_conn_handle
-	branch ipc_hci_tx_start
-
-org z
-z_hci_send_le_connection_update_commplete:
-	fetch 8,mem_mesh_le_event_mask
-	rtnbit0 LE_CONNECTION_UPDATE_COMPLETE_EVENT
-	jam 10,mem_mesh_event_para_total_length
-	jam HCI_EVENT_LE_META_EVENT,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg HCI_LE_SUBEVENT_CONN_UPDATE_COMPLETE
-	istore 2,contw		//subevent code & status
-	fetch 1,mem_le_conn_handle
-	istore 2,contw
-	fetch 6,mem_le_new_conninterval
-	istore 6,contw
-	branch ipc_hci_tx_start
-
-org z
-z_hci_send_le_read_remote_features_complete:
-	fetch 8,mem_mesh_le_event_mask
-	rtnbit0 LE_READ_REMOTE_FEATURES_COMPLETE_EVENT
-	jam 12,mem_mesh_event_para_total_length
-	jam HCI_EVENT_LE_META_EVENT,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg HCI_LE_SUBEVENT_REMOTE_FEATURE_COMPLETE
-	istore 2,contw		//subevent code & status
-	fetch 1,mem_le_conn_handle
-	istore 2,contw
-	fetch 8,mem_mesh_le_features
-	istore 8,contw
-	branch ipc_hci_tx_start
-
-org z
-z_hci_send_event_le_connection_data_length_change:
-	//fetch 8,mem_mesh_le_event_mask
-	//rtnbit0 LE_CONNECTION_UPDATE_COMPLETE_EVENT
-	jam 11,mem_mesh_event_para_total_length
-	jam HCI_EVENT_LE_META_EVENT,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg HCI_LE_SUBEVENT_DATA_LENGTH_CHANGE_EVENT
-	istore 1,contw		//subevent code
-	fetch 1,mem_le_conn_handle
-	istore 2,contw
-	fetch 8,mem_remote_rx_max_octets
-	istore 8,contw
-	branch ipc_hci_tx_start
-
-z_hci_send_read_remote_version_information_complete:
-	fetch 8,mem_mesh_le_event_mask
-	rtnbit0 READ_REMOTE_VERSION_INFORMATION_COMPLETE_EVENT
-	jam 8,mem_mesh_event_para_total_length
-	jam HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE,mem_mesh_event_head_event_code
-	call p_hci_prepare_send_event
-	setarg COMMAND_SUCCEEDED
-	istore 1,contw		//subevent code & status
-	fetch 1,mem_le_conn_handle
-	istore 2,contw
-	fetch 5,mem_mesh_le_version
-	istore 5,contw
-	branch ipc_hci_tx_start
-
-org z
-z_parse_lmp_escape:
-	//bpatchx patch2e_1,mem_patch2e
-	fetch 1,mem_rxbuf+1
-	set1 7,pdata
-	store 1,mem_lmi_opcode2
-	beq LMP_EXT_FEATURES_REQ,z_parse_lmpext_features_req
-	beq LMP_EXT_FEATURES_RES,z_parse_lmpext_features_res
-	beq LMP_IO_CAP_REQ,z_parse_lmpext_iocap_req
-	beq LMP_IO_CAP_RES,z_parse_lmpext_iocap_res
-	branch parse_lmp_escape+4
-
-z_parse_lmpext_features_req:
-	call parse_lmpext_features_req
-// TODO: judge page index.
-z_store_remote_ext_features:
-	// features page & max supported page
-	fetch 2,mem_rxbuf+2
-	// extended features
-	fetch 8,mem_rxbuf+4
-	store 8,mem_remote_ext_features0
-	rtn	
-
-z_parse_lmpext_features_res:
-	call parse_lmpext_features_res
-	branch z_store_remote_ext_features	
-
-z_parse_lmpext_iocap_req:
-	call iocap_lmpext_load
-	call p_hci_send_io_cap_response_event
-	branch p_hci_send_io_cap_req_event	
-
-z_parse_lmpext_iocap_res:
-	call p_hci_send_io_cap_response_event
-	call iocap_lmpext_load
-	call iocap_lmpext_hci
-	jam SP_FLAG_COMMIT,mem_master_sp_flag
-	jam SP_STAT_KEY_SEND,mem_master_sp_state
-	rtn	
-	
-org z
-// input --- mem_encryp_inital_value  output --- mem_encryp_inital_value
-z_efuse_custom_encryption:
-	arg 0x20,pdata
-	arg mem_efuse_encryp_data,rega
-	arg 32,temp
-	call efuse_read_data
-//	setarg 0xaa55
-//	store 2,mem_encryp_inital_value
-	arg mem_efuse_encryp_data,contr
-	ifetch 2,contr
-	rtn blank
-	store 2,mem_encryp_param
-	call z_efuse_custom_encryption_init
-	call z_efuse_custom_encryption_read_efuse_data_add_loop
-	call z_efuse_custom_encryption_init
-	branch z_efuse_custom_encryption_read_efuse_data_ixor_loop
-	
-z_efuse_custom_encryption_init:
-	arg mem_efuse_encryp_data+2,rega
-	arg 6,loopcnt
-	jam 1,mem_encryp_count
-	rtn
-	
-// input:pdata----read efuse addr
-z_efuse_custom_encryption_read_efuse_data_add_loop:
-	ifetch 2,rega
-	fetcht 2,mem_encryp_inital_value
-	iadd temp,pdata
-	store 2,mem_encryp_inital_value
-	fetch 1,mem_encryp_count
-	iadd rega,rega
-	increase 2,rega
-	fetch 1,mem_encryp_count
-	pincrease 1
-	store 1,mem_encryp_count
-	loop z_efuse_custom_encryption_read_efuse_data_add_loop
-	rtn
-z_efuse_custom_encryption_read_efuse_data_ixor_loop:
-	ifetch 2,rega
-	fetcht 2,mem_encryp_inital_value
-	ixor temp,pdata
-	store 2,mem_encryp_inital_value
-	fetch 1,mem_encryp_count
-	iadd rega,rega
-	add rega,2,rega
-	fetch 1,mem_encryp_count
-	pincrease 1
-	store 1,mem_encryp_count
-	loop z_efuse_custom_encryption_read_efuse_data_ixor_loop
-	fetch 2,mem_encryp_inital_value
-	fetcht 2,mem_encryp_param
-	isub temp,null
-	nbranch assert,zero
-	rtn
-
-org z
-z_ipc_rx_hci:
-	fetcht 3,mem_ipc_data_rx_buf_payload_ptr
-	call p_ipc_rx_store_contr1
-	call p_ipc_rx_hci_data_one_byte
-	beq HCI_H4_TYPE_CMD,z_hci_parse_packet_cmd
-	beq HCI_H4_TYPE_ACL,z_hci_parse_packet_acl
-	branch assert
-
-z_hci_parse_packet_cmd:
-	call p_ipc_rx_hci_data_two_byte// Opcode
-	store 2,mem_mesh_hci_opcode
-	arg 0x3ff,temp
-	iand temp,temp	//low 10bit
-	storet 2,mem_mesh_hci_opcode_ocf
-	rshift2 pdata,pdata
-	rshift8 pdata,pdata	//high 6bit
-	store 1,mem_mesh_hci_opcode_ogf
-	call p_ipc_rx_hci_data_one_byte	// parameter total length
-	store 1,mem_mesh_hci_cmd_len
-	branch z_hci_parse_complete_packet
-
-
-org z
-z_hci_parse_packet_acl:
-	call p_ipc_rx_hci_data_two_byte// Opcode
-	store 1,mem_hci_conn_handle
-	call z_hci_parse_packet_acl_FB_flag
-	call p_ipc_rx_hci_data_two_byte// length
-	store 2,mem_temp
-
-	call context_search_conn_handle
-	// TODO: here need change to other work.
-	nrtn zero
-
-	// check is classic or ble
-	add rega,coffset_mode,contr
-	ifetch 1,contr
-	bbit1 mode_le,z_hci_parse_packet_acl_le
-z_hci_parse_packet_acl_classic:
-	fetch 2,mem_temp
-	store 2,mem_alloc_buffer_len
-	call malloc_buffer_is_enough
-	call ice_break,blank
-
-	
-	fetch 2,mem_temp
-	copy pdata,rega
-	copy pdata,regb
-	//TODO: classic need do here
-	call l2cap_malloc//return with pdata ptr
-	copy regb,contw
-	// l2cap payload header
-	fetch 2,mem_temp
-	istore 2,contw
-	istorer type,1,contw
-z_hci_parse_packet_acl_end:
-	fetch 2,mem_temp
-	copy pdata,loopcnt
-	call p_ipc_rx_restore_contr
-	branch memcpy_fast
-	
-
-z_hci_parse_packet_acl_le:	
-	// Think to judge classic or ble.
-	fetch 2,mem_temp	
-	call z_le_fifo_check_full
-	nrtn blank
-	fetch 2,mem_temp
-	copy pdata,rega
-	copy pdata,regb
-	call le_fifo_malloc_tx
-	branch z_hci_parse_packet_acl_end
-
-z_hci_parse_packet_acl_FB_flag:
-	rshift8 pdata,pdata
-	rshift4 pdata,pdata
-	force LLID_CONTINUE,type
-	rtneq BT_ACL_CONT
-	force LLID_START,type
-	rtn
-
-z_le_fifo_check_full:
-	call malloc_buffer_is_full_raw
-	branch setarg1,blank
-	branch setarg0
-
-org z
-z_l2cap_ble_queue_init:
-	fetch 3,mem_rcv_ble_queue_ptr
-	ncall z_l2cap_ble_queue_free_rx_buffer,blank	
-	setarg 0
-	store 3,mem_rcv_ble_queue_ptr
-z_l2cap_ble_link_queue_init:
-	arg mem_snd_ble_block,pdata
-	store 2,mem_temp
-//input: rega: queue block
-z_l2cap_ble_queue_free_all:
-	fetchr rega,2,mem_temp
-	call p_queue_get_len
-	rtn blank
-	// get len will change rega
-	fetchr rega,2,mem_temp
-	call queue_delete
-	call free_buffer
-	branch z_l2cap_ble_queue_free_all
-	
-z_l2cap_ble_queue_free_rx_buffer:
-	copy pdata,regb
-	branch free_buffer
-
-org z
-z_le_adv:
-	fetch 1,mem_le_adv_enable
-	rtn blank
-	arg le_adv_interval_timer,queue
-	call timer_check
-	nrtn blank
-	disable master
-	enable swfine
-	call le_init_adv
-	call le_next_adv_channel
-	call le_send_adv_ind
-	nbranch le_adv_not_match,match
-	fetch 1,mem_le_req_rcv
-	increase 1,pdata
-	store 1,mem_le_req_rcv
-	fetch 1,mem_le_rxbuf
-	and pdata,0x0f,pdata
-	beq SCAN_REQ,z_le_send_scan_response
-	branch le_adv+18
-
-z_le_send_scan_response:
-	arg SCAN_RSP,temp
-	fetch 1,mem_le_adv_own_addr_type
-	nsetflag blank,LE_SENDER_ADDR_BIT,temp
-	storet 1,mem_le_txheader
-	fetcht 1,mem_le_scan_data_len
-	add temp,6,pdata
-	store 1,mem_le_txlen
-	copy temp,loopcnt
-	fetch 1,mem_le_adv_own_addr_type
-	call p_le_get_public_addr,blank
-	ncall p_le_get_random_addr,blank
-	storet 6,mem_le_txpayload
-	arg mem_le_scan_data,contr
-	call memcpy
-	branch le_transmit_norx
-	
-
-org z
-z_le_scan:
-	fetch 1,mem_le_scan_enable
-	rtnne LE_SCAN_ENABLE
-	arg le_scan_interval_timer,queue
-	call timer_check
-	nrtn blank
-	
-	fetch 2,mem_le_scan_interval
-	arg le_scan_interval_timer,queue
-	call timer_init
-	
-	call le_init_adv
-	call le_next_adv_channel
-	fetch 2,mem_le_scan_window
-	store 2,mem_le_scan_window_temp
-	branch z_le_scan_loop
-z_le_scan_loop:	
-	disable master
-	disable swfine
-	fetchr timeup,2,mem_le_scan_window_temp
-	call z_le_receive_packet
-	nbranch z_le_scan_timeout_check,match	
-z_le_scan_match:
-	call le_scan_check_sender_addr_type
-	copy rega,pdata
-	store 1,mem_le_conn_peer_addr_type
-ifdef WHITE_LIST
-	arg mem_le_white_list_type_and_bd_addr,contw
-	istore 1,contw
-	fetch 6,mem_le_rxbuf+2
-	istore 6,contw
-	fetch 1,mem_le_white_list_cnt
-	beq 0,z_le_scan_match_send_event
-	fetch 1,mem_le_white_list_filter_policy
-	beq NONE_FILTER,z_le_scan_match_send_event
-	beq WHITE_LIST_SCAN_FILTER,z_white_filter_scan_check
-	beq WHITE_LIST_CONNECT_FILTER,z_le_scan_match_send_event
-	beq WHITE_LIST_CONN_SCAN_FILTER,z_white_filter_scan_check
-z_white_filter_scan_check:
-	call p_check_addr_in_white_list
-	nbranch z_le_scan_timeout_check,blank
-endif
-z_le_scan_match_send_event:
-	fetch 6,mem_le_rxbuf+2
-	store 6,mem_le_plap
-	
-	fetch 1,mem_mesh_creat_connection_flag
-	beq CREAT_CONNECTION,p_le_create_conn
-	call p_hci_send_event_le_advertising_report
-	
-	call le_send_scan_request
-	nbranch z_le_scan_timeout_check,match
-	fetch 1,mem_le_rxbuf+1
-	beq 6,z_le_scan_timeout_check
-	call p_hci_send_event_le_advertising_report
-z_le_scan_timeout_check:	
-	fetch 2,mem_le_scan_window_temp
-	nbranch  z_le_scan_loop,blank
-	rtn	
-
-z_le_receive_packet:
-	call lerx_setfreq
-z_le_receive_rxon:
-	call le_prep
-	disable match
-	enable decode_fec0
-	enable is_rx
-	disable is_tx
-	copy timeup,stop_watch
-	correlate null,timeout
-	deposit stop_watch
-	store 2,mem_le_scan_window_temp
-	branch le_receive_rxon+7
-
-org z
-z_app_init_efuse_data:
-	setarg EFUSE_UCODE_ADC_GPIO_0_5
-	arg mem_efuse_adc_offset,rega
-	arg 8,temp
-	branch efuse_read_data
-	
Index: ModuleDemo/25_OTA/bt_demo/BT/sched/patch.dat
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/sched/patch.dat	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/sched/patch.dat	(working copy)
@@ -1,64 +1,63 @@
-
 mem_patch00:     
-04   #mem_patch00
-40   #mem_patch01
-01   #mem_patch02
-50   #mem_patch03
-11   #mem_patch04
+00   #mem_patch00
+00   #mem_patch01
+00   #mem_patch02
+00   #mem_patch03
+00   #mem_patch04
 00   #mem_patch05
-04   #mem_patch06
-44   #mem_patch07
-12   #mem_patch08
+00   #mem_patch06
+00   #mem_patch07
+00   #mem_patch08
 00   #mem_patch09
-10   #mem_patch0A
-31   #mem_patch0B
+00   #mem_patch0A
+00   #mem_patch0B
 00   #mem_patch0C
-0c   #mem_patch0D
+00   #mem_patch0D
 00   #mem_patch0E
 00   #mem_patch0F
-62   #mem_patch10
+00   #mem_patch10
 00   #mem_patch11
 00   #mem_patch12
 40   #mem_patch13
-11   #mem_patch14
-01   #mem_patch15
+00   #mem_patch14
+00   #mem_patch15
 00   #mem_patch16
-06   #mem_patch17
+00   #mem_patch17
 00   #mem_patch18
 00   #mem_patch19
 00   #mem_patch1A
 00   #mem_patch1B
-01   #mem_patch1C
-00   #mem_patch1D  
+00   #mem_patch1C
+00   #mem_patch1D
 00   #mem_patch1E
 00   #mem_patch1F
-80   #mem_patch20
-10   #mem_patch21
-1c   #mem_patch22
+00   #mem_patch20
+00   #mem_patch21
+00   #mem_patch22
 00   #mem_patch23
-e8   #mem_patch24
-07   #mem_patch25
+00   #mem_patch24
+00   #mem_patch25
 00   #mem_patch26
-c8   #mem_patch27
-06   #mem_patch28
-88   #mem_patch29
-04   #mem_patch2A
-29   #mem_patch2B
-11   #mem_patch2C
-40   #mem_patch2D
-17    #mem_patch2E
+00   #mem_patch27
+00   #mem_patch28
+00   #mem_patch29
+00   #mem_patch2A
+00   #mem_patch2B
+00   #mem_patch2C
+00   #mem_patch2D
+00  #mem_patch2E
 00   #mem_patch2F
 00   #mem_patch30
-03   #mem_patch31
-04   #mem_patch32
+00   #mem_patch31
+00   #mem_patch32
 00   #mem_patch33
-60   #mem_patch34
+00   #mem_patch34
 00   #mem_patch35
-04   #mem_patch36
+00   #mem_patch36
 00   #mem_patch37
 00   #mem_patch38
 00   #mem_patch39
-10   #mem_patch3A
+00   #mem_patch3A
 00   #mem_patch3B
 00   #mem_patch3C
 00   #mem_patch3D
Index: ModuleDemo/25_OTA/bt_demo/BT/sched/user.dat
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/sched/user.dat	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/BT/sched/user.dat	(working copy)
@@ -111,15 +111,15 @@
 7b
 83
 
-mem_le_features:
-21				//length extension
-00
-00
-00
-00
-00
-00
-00
+#mem_le_features:
+#21				#length extension
+#00
+#00
+#00
+#00
+#00
+#00
+#00
 
 
 mem_xip_option:5d 40 bb
@@ -273,25 +273,25 @@
 00 00 00 00 00 00 00 00 		00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 		00 00 00 00 00 00 00 00 00 00 00 00
 mem_simple_pairing_mode:00	
-mem_conn_status:00
-mem_io_cap_flag:00
-mem_inquiry_mode:00
+#mem_conn_status:00
+#mem_io_cap_flag:00
+#mem_inquiry_mode:00
 
 
-mem_param_alloc_normal_buffer_start_address:00 18
-mem_param_alloc_normal_buffer_max_length:83 00
-mem_param_alloc_big_buffer_start_address:00 20
-mem_param_alloc_big_buffer_max_length:b0 02
-mem_l2cap_rx_max_lenth:b0 02
+#mem_param_alloc_normal_buffer_start_address:00 18
+#mem_param_alloc_normal_buffer_max_length:83 00
+#mem_param_alloc_big_buffer_start_address:00 20
+#mem_param_alloc_big_buffer_max_length:b0 02
+#mem_l2cap_rx_max_lenth:b0 02
 
 
-mem_alloc_normal_total_size:0a
-mem_alloc_big_total_size:0a
-mem_snd_br_total_size:0a
-mem_snd_ble_total_size:0a
-mem_snd_hci_total_size:0a
+#mem_alloc_normal_total_size:0a
+#mem_alloc_big_total_size:0a
+#mem_snd_br_total_size:0a
+#mem_snd_ble_total_size:0a
+#mem_snd_hci_total_size:0a
 
-mem_hci_version_svnid:3987
+#mem_hci_version_svnid:3987
 
 mem_keyscan_switch:00
 
@@ -308,17 +308,17 @@
 
 mem_mesh_command_complete_num_hci_command_packet:01
 
-mem_mesh_read_local_version_info:
-09		#hci_version BT_HCI_VERSION_5_0
-00 00	#hci_revsion
-09		#lmp_version RADIO_BLE_VERSION_NUMBER:BT_HCI_VERSION_5_0
-0e 05	#manufacture_name Yichip Microelectronics (Hangzhou) Co.,Ltd.
-FF FF	#LPM_subversion
+#mem_mesh_read_local_version_info:
+#09		#hci_version BT_HCI_VERSION_5_0
+#00 00	#hci_revsion
+#09		#lmp_version RADIO_BLE_VERSION_NUMBER:BT_HCI_VERSION_5_0
+#0e 05	#manufacture_name Yichip Microelectronics (Hangzhou) Co.,Ltd.
+#FF FF	#LPM_subversion
 
-mem_mesh_read_local_support_command:02 05 ff
+#mem_mesh_read_local_support_command:02 05 ff
 
-mem_device_public_address:11 22 33 44 55 66
+#mem_device_public_address:11 22 33 44 55 66
 
-mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  
+#mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  
 
 
Index: ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvoptx
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvoptx	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvoptx	(working copy)
@@ -256,7 +256,6 @@
       <pMultCmdsp></pMultCmdsp>
       <DebugDescription>
         <Enable>1</Enable>
-        <EnableFlashSeq>0</EnableFlashSeq>
         <EnableLog>0</EnableLog>
         <Protocol>1</Protocol>
         <DbgClock>10000000</DbgClock>
Index: ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvprojx
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvprojx	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvprojx	(working copy)
@@ -16,7 +16,7 @@
         <TargetCommonOption>
           <Device>ARMCM0</Device>
           <Vendor>ARM</Vendor>
-          <PackID>ARM.CMSIS.5.5.1</PackID>
+          <PackID>ARM.CMSIS.5.3.0</PackID>
           <PackURL>http://www.keil.com/pack/</PackURL>
           <Cpu>IROM(0x00000000,0x00040000) IRAM(0x20000000,0x00020000) CPUTYPE("Cortex-M0") CLOCK(12000000) ESEL ELITTLE</Cpu>
           <FlashUtilSpec></FlashUtilSpec>
@@ -33,7 +33,7 @@
           <SLE66CMisc></SLE66CMisc>
           <SLE66AMisc></SLE66AMisc>
           <SLE66LinkerMisc></SLE66LinkerMisc>
-          <SFDFile></SFDFile>
+          <SFDFile>$$Device:ARMCM0$Device\ARM\SVD\ARMCM0.svd</SFDFile>
           <bCustSvd>0</bCustSvd>
           <UseEnv>0</UseEnv>
           <BinPath></BinPath>
@@ -184,7 +184,6 @@
             <hadXRAM>0</hadXRAM>
             <uocXRam>0</uocXRam>
             <RvdsVP>0</RvdsVP>
-            <RvdsMve>0</RvdsMve>
             <hadIRAM2>0</hadIRAM2>
             <hadIROM2>0</hadIROM2>
             <StupSel>8</StupSel>
Index: ModuleDemo/25_OTA/bt_demo/CM0/User/btreg.h
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/User/btreg.h	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/User/btreg.h	(working copy)
@@ -1548,151 +1548,59 @@
 #define	mem_last_transmite_clock                	0x4c04
 #define	mem_module_le_att_list                  	0x4c08
 #define	mem_module_le_att_list_end              	0x4c09
-#define	mem_le_disconnect_reason                	0x4c09
-#define	mem_mesh_le_features                    	0x4c0a
-#define	mem_mesh_le_version                     	0x4c12
-#define	mem_mesh_le_version_exchange_times      	0x4c17
-#define	mem_mesh_hci_opcode_ocf                 	0x4c18
-#define	mem_mesh_hci_opcode_ogf                 	0x4c1a
-#define	mem_mesh_hci_cmd_len                    	0x4c1b
-#define	mem_mesh_event_mask                     	0x4c1c
-#define	mem_mesh_read_local_version_info        	0x4c24
-#define	mem_mesh_read_local_version_info_hci_version	0x4c24
-#define	mem_mesh_read_local_version_info_hci_revision	0x4c25
-#define	mem_mesh_read_local_version_info_lmp_version	0x4c27
-#define	mem_mesh_read_local_version_info_manufacturer	0x4c28
-#define	mem_mesh_read_local_version_info_lmp_subversion	0x4c2a
-#define	mem_mesh_read_local_support_command     	0x4c2c
-#define	mem_mesh_le_event_mask                  	0x4c6c
-#define	mem_mesh_le_public_address              	0x4c74
-#define	mem_mesh_le_random_address              	0x4c7a
-#define	mem_mesh_vendor_tx_flag                 	0x4c80
-#define	mem_mesh_vendor_tx_freq                 	0x4c81
-#define	mem_mesh_vendor_tx_data                 	0x4c82
-#define	mem_mesh_vendor_tx_power_calibration    	0x4c83
-#define	mem_mesh_vendor_rx_flag                 	0x4c84
-#define	mem_mesh_vendor_rx_freq                 	0x4c85
-#define	mem_mesh_event_head_type                	0x4c86
-#define	mem_mesh_event_head_event_code          	0x4c87
-#define	mem_mesh_event_para_total_length        	0x4c88
-#define	mem_mesh_event_parameter_rtn            	0x4c89
-#define	mem_mesh_event_parameter_status         	0x4c8a
-#define	mem_mesh_creat_connection_flag          	0x4c8b
-#define	mem_mesh_recevie_acl_packet_number      	0x4c8c
-#define	mem_device_public_address               	0x4c8d
-#define	mem_mesh_command_complete_num_hci_command_packet	0x4c93
-#define	mem_mesh_command_complete_command_opcode	0x4c94
-#define	mem_mesh_hci_opcode                     	0x4c94
-#define	mem_mesh_command_complete_return_parameter_status	0x4c96
-#define	mem_simple_pairing_mode                 	0x4c97
-#define	mem_fec_required                        	0x4c98
-#define	mem_inquiry_num_responses               	0x4c99
-#define	mem_inquiry_num_check                   	0x4c9a
-#define	mem_conn_status                         	0x4c9b
-#define	mem_inquiry_mode                        	0x4c9c
-#define	mem_inquiry_eir_data                    	0x4c9d
-#define	mem_io_cap_flag                         	0x4c9f
-#define	mem_page_scan_repetition_mode           	0x4ca0
-#define	mem_conn_req_status                     	0x4ca1
-#define	mem_alloc_normal_block                  	0x4ca2
-#define	mem_alloc_normal_header                 	0x4ca2
-#define	mem_alloc_normal_rptr                   	0x4ca4
-#define	mem_alloc_normal_wptr                   	0x4ca6
-#define	mem_alloc_normal_end                    	0x4ca8
-#define	mem_alloc_normal_total_size             	0x4caa
-#define	mem_alloc_normal_cur_len                	0x4cab
-#define	mem_alloc_normal_block_start            	0x4cac
-#define	mem_alloc_big_block                     	0x4cca
-#define	mem_alloc_big_header                    	0x4cca
-#define	mem_alloc_big_rptr                      	0x4ccc
-#define	mem_alloc_big_wptr                      	0x4cce
-#define	mem_alloc_big_end                       	0x4cd0
-#define	mem_alloc_big_total_size                	0x4cd2
-#define	mem_alloc_big_cur_len                   	0x4cd3
-#define	mem_alloc_big_block_start               	0x4cd4
-#define	mem_normal_block_ptr_list               	0x4cf2
-#define	mem_big_block_ptr_list                  	0x4d10
-#define	mem_rcv_br_queue_ptr                    	0x4d2e
-#define	mem_rcv_ble_queue_ptr                   	0x4d31
-#define	mem_snd_br_block                        	0x4d34
-#define	mem_snd_br_header                       	0x4d34
-#define	mem_snd_br_rptr                         	0x4d36
-#define	mem_snd_br_wptr                         	0x4d38
-#define	mem_snd_br_end                          	0x4d3a
-#define	mem_snd_br_total_size                   	0x4d3c
-#define	mem_snd_br_cur_len                      	0x4d3d
-#define	mem_snd_br_block_start                  	0x4d3e
-#define	mem_snd_ble_block                       	0x4d5c
-#define	mem_snd_ble_header                      	0x4d5c
-#define	mem_snd_ble_rptr                        	0x4d5e
-#define	mem_snd_ble_wptr                        	0x4d60
-#define	mem_snd_ble_end                         	0x4d62
-#define	mem_snd_ble_total_size                  	0x4d64
-#define	mem_snd_ble_cur_len                     	0x4d65
-#define	mem_snd_ble_block_start                 	0x4d66
-#define	mem_snd_hci_block                       	0x4d84
-#define	mem_snd_hci_header                      	0x4d84
-#define	mem_snd_hci_rptr                        	0x4d86
-#define	mem_snd_hci_wptr                        	0x4d88
-#define	mem_snd_hci_end                         	0x4d8a
-#define	mem_snd_hci_total_size                  	0x4d8c
-#define	mem_snd_hci_cur_len                     	0x4d8e
-#define	mem_snd_hci_block_start                 	0x4d8f
-#define	mem_regd                                	0x4dad
-#define	mem_alloc_buffer_len                    	0x4db1
-#define	mem_temp_alloc_big_malloc_cnt           	0x4db3
-#define	mem_temp_alloc_normal_malloc_cnt        	0x4db5
-#define	mem_temp_send_br_malloc_cnt             	0x4db7
-#define	mem_temp_media_malloc_cnt               	0x4db9
-#define	mem_temp_lcp_malloc_cnt                 	0x4dbb
-#define	mem_temp_sco_rx_malloc_cnt              	0x4dbd
-#define	mem_temp_sco_tx_malloc_cnt              	0x4dbf
-#define	mem_temp_alloc_big_free_cnt             	0x4dc1
-#define	mem_temp_alloc_normal_free_cnt          	0x4dc3
-#define	mem_temp_send_br_free_cnt               	0x4dc5
-#define	mem_temp_media_free_cnt                 	0x4dc7
-#define	mem_temp_lcp_free_cnt                   	0x4dc9
-#define	mem_temp_sco_rx_free_cnt                	0x4dcb
-#define	mem_temp_sco_tx_free_cnt                	0x4dcd
-#define	mem_param_alloc_normal_buffer_start_address	0x4dcf
-#define	mem_param_alloc_normal_buffer_max_length	0x4dd1
-#define	mem_param_alloc_big_buffer_start_address	0x4dd3
-#define	mem_param_alloc_big_buffer_max_length   	0x4dd5
-#define	mem_ipc_data_rx_buf_subtype             	0x4dd7
-#define	mem_ipc_data_rx_buf_payload_ptr         	0x4dd8
-#define	mem_ipc_data_tx_buf_subtype             	0x4ddb
-#define	mem_ipc_data_tx_buf_payload_ptr         	0x4ddc
-#define	mem_le_features                         	0x4ddf
-#define	mem_le_supported_host                   	0x4de7
-#define	mem_simultaneous_le_host                	0x4de8
-#define	mem_default_link_policy_settings        	0x4de9
-#define	mem_link_policy_settings                	0x4deb
-#define	mem_le_white_list_cnt                   	0x4ded
-#define	mem_le_white_list                       	0x4dee
-#define	mem_le_white_list_type_and_bd_addr      	0x4e0a
-#define	mem_le_white_list_filter_policy         	0x4e11
-#define	mem_hci_acl_packet_pb_flag              	0x4e12
-#define	mem_hci_acl_packet_len_recved           	0x4e13
-#define	mem_hci_acl_packet_payload_ptr          	0x4e15
-#define	mem_le_first_packet_count               	0x4e17
-#define	mem_hci_record_disc_conn_handle         	0x4e18
-#define	mem_fsc_rtk_host                        	0x4e19
-#define	mem_remote_features                     	0x4e1a
-#define	mem_remote_ext_features0                	0x4e22
-#define	mem_remote_ext_features1                	0x4e2a
-#define	mem_le_scan_window_temp                 	0x4e32
-#define	mem_zcode_buff_user                     	0x4e34
-#define	mem_queue_init_flag                     	0x4f34
-#define	mem_hci_version_svnid                   	0x4f35
-#define	mem_bd_addr_new                         	0x4f37
-#define	mem_efuse_encryp_data                   	0x4f3d
-#define	mem_encryp_inital_value                 	0x4f5d
-#define	mem_encryp_param                        	0x4f5f
-#define	mem_encryp_count                        	0x4f61
-#define	mem_qspi_lock_flag_cm0                  	0x4f62
-#define	mem_qspi_lock_flag_respin               	0x4f63
-#define	mem_qspi_lock_victim                    	0x4f64
-#define	mem_headset_end                         	0x4f65
+#define	mem_mesh_le_event_mask                  	0x4c09
+#define	mem_mesh_le_public_address              	0x4c11
+#define	mem_mesh_le_random_address              	0x4c17
+#define	mem_mesh_vendor_tx_flag                 	0x4c1d
+#define	mem_mesh_vendor_tx_freq                 	0x4c1e
+#define	mem_mesh_vendor_tx_data                 	0x4c1f
+#define	mem_mesh_vendor_tx_power_calibration    	0x4c20
+#define	mem_mesh_vendor_rx_flag                 	0x4c21
+#define	mem_mesh_vendor_rx_freq                 	0x4c22
+#define	mem_mesh_event_head_type                	0x4c23
+#define	mem_mesh_event_head_event_code          	0x4c24
+#define	mem_mesh_event_para_total_length        	0x4c25
+#define	mem_mesh_event_parameter_rtn            	0x4c26
+#define	mem_mesh_event_parameter_status         	0x4c27
+#define	mem_mesh_creat_connection_flag          	0x4c28
+#define	mem_mesh_recevie_acl_packet_number      	0x4c29
+#define	mem_device_public_address               	0x4c2a
+#define	mem_mesh_command_complete_num_hci_command_packet	0x4c30
+#define	mem_mesh_command_complete_command_opcode	0x4c31
+#define	mem_mesh_hci_opcode                     	0x4c31
+#define	mem_mesh_command_complete_return_parameter_status	0x4c33
+#define	mem_simple_pairing_mode                 	0x4c34
+#define	mem_fec_required                        	0x4c35
+#define	mem_conn_req_status                     	0x4c36
+#define	mem_regd                                	0x4c37
+#define	mem_le_first_packet_count               	0x4c3b
+#define	mem_hci_record_disc_conn_handle         	0x4c3c
+#define	mem_fsc_rtk_host                        	0x4c3d
+#define	mem_fcc_param_new                       	0x4c3e
+#define	mem_fcc_ch_new                          	0x4c3e
+#define	mem_fcc_mod_new                         	0x4c3f
+#define	mem_fcc_txrx_new                        	0x4c40
+#define	mem_fcc_btble_new                       	0x4c41
+#define	mem_fcc_data_new                        	0x4c42
+#define	mem_fcc_data_length_new                 	0x4c43
+#define	mem_fcc_hop_new                         	0x4c44
+#define	mem_fcc_param                           	0x4c45
+#define	mem_fcc_ch                              	0x4c45
+#define	mem_fcc_mod                             	0x4c46
+#define	mem_fcc_txrx                            	0x4c47
+#define	mem_fcc_btble                           	0x4c48
+#define	mem_fcc_data                            	0x4c49
+#define	mem_fcc_data_length                     	0x4c4a
+#define	mem_fcc_hop                             	0x4c4b
+#define	mem_random_ch                           	0x4c4c
+#define	mem_tx_power_fcc                        	0x4c4d
+#define	mem_24g_test                            	0x4c4e
+#define	mem_rf_txon_param1                      	0x4c4f
+#define	mem_rf_txon_param2                      	0x4c50
+#define	mem_rf_shutdown_param1                  	0x4c51
+#define	mem_rf_shutdown_param2                  	0x4c52
+#define	mem_0db_tx_power_param                  	0x4c53
+#define	mem_headset_end                         	0x4c5d
 #define	mem_usb_mouse_data                      	0x4ace
 #define	mem_usb_kb_data                         	0x4ade
 #define	mem_usb_kb_multikey                     	0x4aee
@@ -2233,6 +2141,7 @@
 #define	TWS_SPEC_ADV_FLAG_NAME                  	0x30
 #define	TWS_SPEC_ADV_FLAG_UPDATE_FLASH          	0x35
 #define	TWS_SPEC_ADV_FLAG_TEST_MUSIC            	0x37
+#define	mem_pn9                                 	0x3000
 #define	HCI_ROLE_MASTER                         	0x00
 #define	HCI_ROLE_SLAVE                          	0x01
 #define	LE_WHITE_LIST_MAX_SIZE                  	0x04
Index: ModuleDemo/25_OTA/bt_demo/CM0/User/main.c
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/User/main.c	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/User/main.c	(working copy)
@@ -12,6 +12,73 @@
 #include "yc_drv_common.h"
 #include "yc11xx_h4.h"
 
+#define GFSK_1M_BR		0x01
+#define DQPSK_2M_EDR	0x03
+#define DPSK_3M_EDR		0x07
+
+#define FCC_TX	0x01
+#define FCC_RX	0x02
+#define FCC_OFF	0x03
+
+#define FCC_BT_MODE		0x01
+#define FCC_BLE_MODE	0x02
+
+
+#define FCC_CARRIER		0x20
+#define FCC_DATA			0x00
+
+
+#define DH1	0x19
+#define DH3	0x78
+#define DH5	0xf0
+
+#define HOP_FREQ	0x01
+#define FIX_FREQ	0x02
+
+
+
+typedef struct 
+{
+	uint8_t ch;
+	uint8_t mod;
+	uint8_t txrx;
+	uint8_t mode;
+	uint8_t data;
+	uint8_t data_len;
+	uint8_t hop;
+}FccConfigTypeDef;
+
+#define IS_FccChannel(ch)     			 ((ch>0) && (ch <= 0x50))		/*2401Mhz~2480Mhz*/
+#define IS_FccMod(mod)        			 (mod == GFSK_1M_BR) || (mod == DQPSK_2M_EDR) || (mod == DPSK_3M_EDR)
+#define IS_FccTxRx(txrx) 						 (txrx == FCC_TX) || (txrx == FCC_RX) || (txrx == FCC_OFF)
+#define IS_FccMode(mode)			 			 (mode == FCC_BT_MODE) || (mode == FCC_BLE_MODE)
+#define IS_FccData(data)						 (data == FCC_CARRIER) || (data == FCC_DATA)
+#define IS_FccDataLen(data_len)			 (data_len == DH1) || (data_len == DH3) || (data_len == DH5)				
+#define IS_FccHop(hop)			 				 (hop == HOP_FREQ) || (hop == FIX_FREQ)
+
+void Fcc_Config(FccConfigTypeDef* Fcc_ConfigStruct);
+
+void Fcc_Config(FccConfigTypeDef* Fcc_ConfigStruct)
+{
+	_ASSERT(IS_FccChannel(Fcc_ConfigStruct->ch));
+	_ASSERT(IS_FccMod(Fcc_ConfigStruct->mod));
+	_ASSERT(IS_FccTxRx(Fcc_ConfigStruct->txrx));
+	_ASSERT(IS_FccMode(Fcc_ConfigStruct->mode));
+	_ASSERT(IS_FccData(Fcc_ConfigStruct->data));
+	_ASSERT(IS_FccDataLen(Fcc_ConfigStruct->data_len));
+	_ASSERT(IS_FccHop(Fcc_ConfigStruct->hop));
+	
+	HWRITE(mem_fcc_ch_new,Fcc_ConfigStruct->ch);
+	HWRITE(mem_fcc_mod_new,Fcc_ConfigStruct->mod);
+	HWRITE(mem_fcc_txrx_new,Fcc_ConfigStruct->txrx);
+	HWRITE(mem_fcc_btble_new,Fcc_ConfigStruct->mode);
+	HWRITE(mem_fcc_data_new,Fcc_ConfigStruct->data);
+	HWRITE(mem_fcc_data_length_new,Fcc_ConfigStruct->data_len);
+	HWRITE(mem_fcc_hop_new,Fcc_ConfigStruct->hop);
+	
+}
+	
+
 
 #define LPM_ENABLE    HWRITE(mem_lpm_mode,1);
 #define sleep_500ms	HWRITEW(mem_lpm_interval,800);		//*0.625ms	
@@ -62,54 +129,68 @@
 #endif
 	h4_init();
 
-	sleep_500ms;
-	LPM_ENABLE;
+//	sleep_500ms;
+//	LPM_ENABLE;
 //	POWER_OFF;
 	while (1)
 	{
+	/*	
+		uint8_t My_test,value;
+		My_test = HREAD(0x4ff0);
+		value = HREAD(mem_fcc_ch_new);
+		if(My_test == 0x01){
+			if (value == 0x03)
+			{
+				while(1);
+			}
+			else{
+				HWRITE(mem_fcc_ch_new, 0x03);
+			}
+		}
+	*/	
 #ifdef FUNCTION_WATCH_DOG
 		WDT_Kick();
 #endif
 		//For respin log print
 		
 
-		switch (HREAD(IPC_MCU_STATE))
-		{
-			case IPC_MCU_STATE_RUNNING:
-				//always first init bt
-				IPC_HandleRxPacket();
-				
-				//Bt_watchdog();
-				if (gBRState.topState != BR_POWER_OFF)
-				{
-					DEBUG_POLLING_PRINT();
-					SYS_timerPolling();
-
-					h4_polling_rx();
-				}
-				Lpm_unLockLpm(M0_LPM_FLAG);
-				break;
-			case IPC_MCU_STATE_LMP:
-				if (IPC_IsTxBuffEmpty()
-					&& DEBUG_LOG_BUFFER_IS_EMPTY())
-				{
-					OS_ENTER_CRITICAL();
-					Bt_ActionBeforeLpm();
-					HWRITE(IPC_MCU_STATE,IPC_MCU_STATE_STOP);
-				}
-				else
-				{
-					HWRITE(IPC_MCU_STATE,IPC_MCU_STATE_RUNNING);
-				}
-				break;
-			case IPC_MCU_STATE_HIBERNATE:
-				OS_ENTER_CRITICAL();
-				Bt_ActionBeforeHibernate();
-				HWRITE(IPC_MCU_STATE,IPC_MCU_STATE_STOP);
-				break;
-			case IPC_MCU_STATE_STOP:
-				break;
-		}
+//		switch (HREAD(IPC_MCU_STATE))
+//		{
+//			case IPC_MCU_STATE_RUNNING:
+//				//always first init bt
+//				IPC_HandleRxPacket();
+//				
+//				//Bt_watchdog();
+//				if (gBRState.topState != BR_POWER_OFF)
+//				{
+//					DEBUG_POLLING_PRINT();
+//					SYS_timerPolling();
+
+//					h4_polling_rx();
+//				}
+//				Lpm_unLockLpm(M0_LPM_FLAG);
+//				break;
+//			case IPC_MCU_STATE_LMP:
+//				if (IPC_IsTxBuffEmpty()
+//					&& DEBUG_LOG_BUFFER_IS_EMPTY())
+//				{
+//					OS_ENTER_CRITICAL();
+//					Bt_ActionBeforeLpm();
+//					HWRITE(IPC_MCU_STATE,IPC_MCU_STATE_STOP);
+//				}
+//				else
+//				{
+//					HWRITE(IPC_MCU_STATE,IPC_MCU_STATE_RUNNING);
+//				}
+//				break;
+//			case IPC_MCU_STATE_HIBERNATE:
+//				OS_ENTER_CRITICAL();
+//				Bt_ActionBeforeHibernate();
+//				HWRITE(IPC_MCU_STATE,IPC_MCU_STATE_STOP);
+//				break;
+//			case IPC_MCU_STATE_STOP:
+//				break;
+//		}
 		//hw_delay();
 	};
 }
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/memmap.format
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/memmap.format	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/memmap.format	(working copy)
@@ -1546,151 +1546,59 @@
 0x4c04 mem_last_transmite_clock
 0x4c08 mem_module_le_att_list
 0x4c09 mem_module_le_att_list_end
-0x4c09 mem_le_disconnect_reason
-0x4c0a mem_mesh_le_features
-0x4c12 mem_mesh_le_version
-0x4c17 mem_mesh_le_version_exchange_times
-0x4c18 mem_mesh_hci_opcode_ocf
-0x4c1a mem_mesh_hci_opcode_ogf
-0x4c1b mem_mesh_hci_cmd_len
-0x4c1c mem_mesh_event_mask
-0x4c24 mem_mesh_read_local_version_info
-0x4c24 mem_mesh_read_local_version_info_hci_version
-0x4c25 mem_mesh_read_local_version_info_hci_revision
-0x4c27 mem_mesh_read_local_version_info_lmp_version
-0x4c28 mem_mesh_read_local_version_info_manufacturer
-0x4c2a mem_mesh_read_local_version_info_lmp_subversion
-0x4c2c mem_mesh_read_local_support_command
-0x4c6c mem_mesh_le_event_mask
-0x4c74 mem_mesh_le_public_address
-0x4c7a mem_mesh_le_random_address
-0x4c80 mem_mesh_vendor_tx_flag
-0x4c81 mem_mesh_vendor_tx_freq
-0x4c82 mem_mesh_vendor_tx_data
-0x4c83 mem_mesh_vendor_tx_power_calibration
-0x4c84 mem_mesh_vendor_rx_flag
-0x4c85 mem_mesh_vendor_rx_freq
-0x4c86 mem_mesh_event_head_type
-0x4c87 mem_mesh_event_head_event_code
-0x4c88 mem_mesh_event_para_total_length
-0x4c89 mem_mesh_event_parameter_rtn
-0x4c8a mem_mesh_event_parameter_status
-0x4c8b mem_mesh_creat_connection_flag
-0x4c8c mem_mesh_recevie_acl_packet_number
-0x4c8d mem_device_public_address
-0x4c93 mem_mesh_command_complete_num_hci_command_packet
-0x4c94 mem_mesh_command_complete_command_opcode
-0x4c94 mem_mesh_hci_opcode
-0x4c96 mem_mesh_command_complete_return_parameter_status
-0x4c97 mem_simple_pairing_mode
-0x4c98 mem_fec_required
-0x4c99 mem_inquiry_num_responses
-0x4c9a mem_inquiry_num_check
-0x4c9b mem_conn_status
-0x4c9c mem_inquiry_mode
-0x4c9d mem_inquiry_eir_data
-0x4c9f mem_io_cap_flag
-0x4ca0 mem_page_scan_repetition_mode
-0x4ca1 mem_conn_req_status
-0x4ca2 mem_alloc_normal_block
-0x4ca2 mem_alloc_normal_header
-0x4ca4 mem_alloc_normal_rptr
-0x4ca6 mem_alloc_normal_wptr
-0x4ca8 mem_alloc_normal_end
-0x4caa mem_alloc_normal_total_size
-0x4cab mem_alloc_normal_cur_len
-0x4cac mem_alloc_normal_block_start
-0x4cca mem_alloc_big_block
-0x4cca mem_alloc_big_header
-0x4ccc mem_alloc_big_rptr
-0x4cce mem_alloc_big_wptr
-0x4cd0 mem_alloc_big_end
-0x4cd2 mem_alloc_big_total_size
-0x4cd3 mem_alloc_big_cur_len
-0x4cd4 mem_alloc_big_block_start
-0x4cf2 mem_normal_block_ptr_list
-0x4d10 mem_big_block_ptr_list
-0x4d2e mem_rcv_br_queue_ptr
-0x4d31 mem_rcv_ble_queue_ptr
-0x4d34 mem_snd_br_block
-0x4d34 mem_snd_br_header
-0x4d36 mem_snd_br_rptr
-0x4d38 mem_snd_br_wptr
-0x4d3a mem_snd_br_end
-0x4d3c mem_snd_br_total_size
-0x4d3d mem_snd_br_cur_len
-0x4d3e mem_snd_br_block_start
-0x4d5c mem_snd_ble_block
-0x4d5c mem_snd_ble_header
-0x4d5e mem_snd_ble_rptr
-0x4d60 mem_snd_ble_wptr
-0x4d62 mem_snd_ble_end
-0x4d64 mem_snd_ble_total_size
-0x4d65 mem_snd_ble_cur_len
-0x4d66 mem_snd_ble_block_start
-0x4d84 mem_snd_hci_block
-0x4d84 mem_snd_hci_header
-0x4d86 mem_snd_hci_rptr
-0x4d88 mem_snd_hci_wptr
-0x4d8a mem_snd_hci_end
-0x4d8c mem_snd_hci_total_size
-0x4d8e mem_snd_hci_cur_len
-0x4d8f mem_snd_hci_block_start
-0x4dad mem_regd
-0x4db1 mem_alloc_buffer_len
-0x4db3 mem_temp_alloc_big_malloc_cnt
-0x4db5 mem_temp_alloc_normal_malloc_cnt
-0x4db7 mem_temp_send_br_malloc_cnt
-0x4db9 mem_temp_media_malloc_cnt
-0x4dbb mem_temp_lcp_malloc_cnt
-0x4dbd mem_temp_sco_rx_malloc_cnt
-0x4dbf mem_temp_sco_tx_malloc_cnt
-0x4dc1 mem_temp_alloc_big_free_cnt
-0x4dc3 mem_temp_alloc_normal_free_cnt
-0x4dc5 mem_temp_send_br_free_cnt
-0x4dc7 mem_temp_media_free_cnt
-0x4dc9 mem_temp_lcp_free_cnt
-0x4dcb mem_temp_sco_rx_free_cnt
-0x4dcd mem_temp_sco_tx_free_cnt
-0x4dcf mem_param_alloc_normal_buffer_start_address
-0x4dd1 mem_param_alloc_normal_buffer_max_length
-0x4dd3 mem_param_alloc_big_buffer_start_address
-0x4dd5 mem_param_alloc_big_buffer_max_length
-0x4dd7 mem_ipc_data_rx_buf_subtype
-0x4dd8 mem_ipc_data_rx_buf_payload_ptr
-0x4ddb mem_ipc_data_tx_buf_subtype
-0x4ddc mem_ipc_data_tx_buf_payload_ptr
-0x4ddf mem_le_features
-0x4de7 mem_le_supported_host
-0x4de8 mem_simultaneous_le_host
-0x4de9 mem_default_link_policy_settings
-0x4deb mem_link_policy_settings
-0x4ded mem_le_white_list_cnt
-0x4dee mem_le_white_list
-0x4e0a mem_le_white_list_type_and_bd_addr
-0x4e11 mem_le_white_list_filter_policy
-0x4e12 mem_hci_acl_packet_pb_flag
-0x4e13 mem_hci_acl_packet_len_recved
-0x4e15 mem_hci_acl_packet_payload_ptr
-0x4e17 mem_le_first_packet_count
-0x4e18 mem_hci_record_disc_conn_handle
-0x4e19 mem_fsc_rtk_host
-0x4e1a mem_remote_features
-0x4e22 mem_remote_ext_features0
-0x4e2a mem_remote_ext_features1
-0x4e32 mem_le_scan_window_temp
-0x4e34 mem_zcode_buff_user
-0x4f34 mem_queue_init_flag
-0x4f35 mem_hci_version_svnid
-0x4f37 mem_bd_addr_new
-0x4f3d mem_efuse_encryp_data
-0x4f5d mem_encryp_inital_value
-0x4f5f mem_encryp_param
-0x4f61 mem_encryp_count
-0x4f62 mem_qspi_lock_flag_cm0
-0x4f63 mem_qspi_lock_flag_respin
-0x4f64 mem_qspi_lock_victim
-0x4f65 mem_headset_end
+0x4c09 mem_mesh_le_event_mask
+0x4c11 mem_mesh_le_public_address
+0x4c17 mem_mesh_le_random_address
+0x4c1d mem_mesh_vendor_tx_flag
+0x4c1e mem_mesh_vendor_tx_freq
+0x4c1f mem_mesh_vendor_tx_data
+0x4c20 mem_mesh_vendor_tx_power_calibration
+0x4c21 mem_mesh_vendor_rx_flag
+0x4c22 mem_mesh_vendor_rx_freq
+0x4c23 mem_mesh_event_head_type
+0x4c24 mem_mesh_event_head_event_code
+0x4c25 mem_mesh_event_para_total_length
+0x4c26 mem_mesh_event_parameter_rtn
+0x4c27 mem_mesh_event_parameter_status
+0x4c28 mem_mesh_creat_connection_flag
+0x4c29 mem_mesh_recevie_acl_packet_number
+0x4c2a mem_device_public_address
+0x4c30 mem_mesh_command_complete_num_hci_command_packet
+0x4c31 mem_mesh_command_complete_command_opcode
+0x4c31 mem_mesh_hci_opcode
+0x4c33 mem_mesh_command_complete_return_parameter_status
+0x4c34 mem_simple_pairing_mode
+0x4c35 mem_fec_required
+0x4c36 mem_conn_req_status
+0x4c37 mem_regd
+0x4c3b mem_le_first_packet_count
+0x4c3c mem_hci_record_disc_conn_handle
+0x4c3d mem_fsc_rtk_host
+0x4c3e mem_fcc_param_new
+0x4c3e mem_fcc_ch_new
+0x4c3f mem_fcc_mod_new
+0x4c40 mem_fcc_txrx_new
+0x4c41 mem_fcc_btble_new
+0x4c42 mem_fcc_data_new
+0x4c43 mem_fcc_data_length_new
+0x4c44 mem_fcc_hop_new
+0x4c45 mem_fcc_param
+0x4c45 mem_fcc_ch
+0x4c46 mem_fcc_mod
+0x4c47 mem_fcc_txrx
+0x4c48 mem_fcc_btble
+0x4c49 mem_fcc_data
+0x4c4a mem_fcc_data_length
+0x4c4b mem_fcc_hop
+0x4c4c mem_random_ch
+0x4c4d mem_tx_power_fcc
+0x4c4e mem_24g_test
+0x4c4f mem_rf_txon_param1
+0x4c50 mem_rf_txon_param2
+0x4c51 mem_rf_shutdown_param1
+0x4c52 mem_rf_shutdown_param2
+0x4c53 mem_0db_tx_power_param
+0x4c5d mem_headset_end
 0x4ace mem_usb_mouse_data
 0x4ade mem_usb_kb_data
 0x4aee mem_usb_kb_multikey
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/ramcode.rom
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/ramcode.rom	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/ramcode.rom	(working copy)
@@ -1,2044 +1,588 @@
-20200040
-20000001
-20000002
-20000003
-20000004
-20000005
-20000006
-20000007
-20000008
-20000009
-2000000a
-2000000b
-2000000c
-2000000d
-2000000e
-2000000f
-20000010
-20000011
-20000012
-20000013
-20000014
-20000015
-20000016
-20000017
-20000018
-20000019
-2000001a
-2000001b
-2000001c
-2000001d
-2000001e
-2000001f
-20000020
-20000021
-20000022
-20000023
-20000024
-20000025
-20000026
-20000027
-20000028
-20000029
-2000002a
-2000002b
-2000002c
-2000002d
-2000002e
-2000002f
-20000030
-20000031
-20000032
-20000033
-20000034
-20000035
-20000036
-20000037
-20000038
-20000039
-2000003a
-2000003b
-2000003c
-2000003d
-2000003e
-2000003f
-c284005e
-c0010084
-c00701f9
-c0080207
-c00e01cb
-c00f020a
-c01002e9
-c0120267
-c01901b2
-c01d01bf
-c01f028c
-c020825c
-c0220294
-c02a07b0
-c02c0700
-c02e071c
-c02e8722
-c0350229
-c035824d
-c04080c0
-c04280dd
-c04300a3
-c04f00a7
-c0500162
-c052079c
-c054077b
-c05c812e
-c05d062b
-c0700159
+c04f0002
 20202baf
-c003811f
-c006031e
-c00905b1
-c00985d4
-c00a05b3
-c01185c7
-c0128724
-c0130728
-c013872a
-c014072c
-c014872d
-c0150732
-c01d84dd
-c01f04e6
-c01f8453
-c020853b
-c0210772
-c025853f
-c027851f
-c029064a
-c02c0467
-c02d8663
-c02e84d3
-c0300668
-c0320664
-c0370748
-c03802b2
-c03887b4
-c03902c2
-c03a0164
-c0440111
-c0448117
-c0490733
-c0528677
-c053067d
-c1590000
-c16a0000
-20202baf
-20406490
-20406863
-20406326
-2040009f
-2040203c
-20403153
-2040008e
-2040233d
-20400094
-20202021
-c68e0000
-18000e02
-20407148
-7d3a001c
-243a209e
-20200222
-6fe24133
-c4008000
-6fe20030
-c3800000
-18000e06
-20407148
-247a0000
-68444151
-78487c00
-18423600
-202023b7
-204045b4
-204007b6
-20404909
-202045b8
-6fe24013
-793ffe06
-67e24013
-202000a9
-204000a9
-20202bd8
-20405900
-70894bba
-204000b2
-708907ff
-20402a70
-70895074
-7089520e
-70896d07
-20600000
-6fe242b4
-c00080b6
-c00200bc
-c00100b6
-5888e0d0
-67e68955
-584a103c
-67e68958
-70895468
+204057bf
+dec00080
+704c4e01
+da204c53
+20400248
+20400018
+2040003d
+2040022d
+202000f9
+d8a00000
+df200400
+20400014
+6fe28308
+c4010000
+d8a04000
+df200200
+20400014
 20600000
-5888c0d0
-67e68955
-584a106c
-202000b9
-203080cc
-708955d4
-20000004
-708955d2
-20000004
-708955d1
-20000004
-6fe242b4
-c00080ca
-c00200da
-708955d0
-708956e0
-18002a08
-18002a00
-7850fc00
-78507c00
-782f7c00
-70890200
-70890100
-70890000
-70890300
-70890470
-6fe28906
-793ffe00
-67e28906
+18007e00
+e7f00005
+c2000015
 20600000
-708955d0
-708956c0
-202000cc
-60420017
-1840a200
-6fe242b5
-245a2a2d
-20402a7b
-58000250
-20402bb1
-204000b2
-6fe28906
-79207e00
-67e28906
-7089003c
-708901e0
-2000000a
-70890201
-7089023d
-2000000a
-708903b7
-2000000a
-7089027d
-6fe242b4
-c0000104
-c00200ff
+588fffff
+67e64138
+589d83fe
+793ffe02
+e7e60005
+58008359
+e7e40005
+58001177
+67e64140
+58000033
+67e64143
+589e8b33
+67e64147
+58000012
+67e4414d
+58001000
+67e4414f
+58000200
+67e44151
+58000800
+67e44153
+58000020
+67e4415b
+58000020
+67e44157
+58002000
+67e44159
+70468906
+58535442
+67e6468a
+58344950
+67e6468d
+70415d02
+70009760
+70417005
+70413303
+20600000
+70804206
+70890700
+70890800
+70890900
+70890aff
+70890bff
+70890f2e
+70891247
 70894cfb
 70894def
 70894eec
 70894f5e
-c0008106
-c00280fb
-20202a51
-708956ff
-20402a5d
-708955ff
-20600000
-2040010a
-708956cc
-20402a5d
-708955d8
-20600000
-2040010a
-20202a49
-708956f7
-20402a5d
-708955df
-20600000
-70894c5b
-70894d96
-70894e2c
-70894f46
+70896f88
+70897300
+70895a4a
+70895c80
+704c4220
+704c3e01
+708930a9
+70892fad
+70892eb1
+70892db5
+70892cb9
+70892bbd
+70892ac2
+708929c6
+708928ca
+708927ce
+708926d2
+708925d6
+708924da
+708923de
+708922e2
+708921e6
+708920ea
+70891fee
+70891ef2
+70891df6
+70891cfb
+70891bfb
+70891afb
+708947f5
+708946e6
+708945d7
+708944d6
+708943c7
+708942c6
+70894187
+70894086
+70893f85
+70893e46
+70893d07
+70893c06
+70893bc7
+70893ac6
+708939c5
+708938c4
+708937c3
+708936c2
+708935c1
+708934c0
+70893380
+70893280
+70893180
+70894a7f
+708949f8
+70894800
+70894bba
+6fe24c51
+67e28955
+6fe24c52
+67e28956
+70895788
+7089586c
+70895910
+58300000
+67e68969
+70896864
+70415e24
+204000b4
+708968e4
+79202a03
+18002a00
+20400093
+204000a5
 20600000
-d8e00009
-20207357
-204057f1
-6fe2487a
-c0000115
+70890602
+582625a0
+204000ec
+7089007f
+20000082
+70890110
+70895230
+200000c8
+708952f0
+18007232
+6fe28990
+c28280a0
+c200009d
+67e2416e
+70890100
+70890000
+70890600
 20600000
-2040011a
-202057fa
-6fe2487a
-c1808000
-202057f5
-6fe3f000
-d840001c
+6fe2416e
+79207e05
+67e28952
+68428950
+18410407
+1fe9fe00
 9841fe00
-67e3f000
-20600000
-20400326
-2040010f
-20203e60
-6848833e
-6048804c
-70804de6
-20400127
-70800520
-37d98200
-37d98200
-37d98200
-37d98200
-37d98200
-20600000
-20600000
-71f0001c
-70804205
-20400122
-6fe28341
-67e24bce
-6fe24bef
-67e206ab
-245587b8
-20407988
-58000630
-67e4431d
-58000159
-67e4431f
-5800012d
-67e4431b
-58000783
-67e44315
-58000786
-67e44313
-20558154
-24358147
-20403e79
-204057bf
-700f0d66
-20203f28
-58001171
-67e44f5d
-204007ba
-204057bf
-6fec4140
-67ec4340
-6fe24bce
-c2828151
-700f0d65
-20203f28
-2040015a
-700f0d6a
-20203f28
-204054b0
-204054b5
-200007d0
-2040553b
-20600000
-20600000
-6fe8833e
-793ffe1d
-67e8804c
-2020015e
-37d98200
-70800520
-37d98200
-20600000
-d85fffff
-20202cb8
-78547c00
-204052b0
-6fe20048
-207a0000
-da201001
-68420048
-20407a08
-6fe20048
-c28387bc
-c0188189
-c0060198
-c0038768
-c0058172
-20204f6c
-6fe20b9c
-203a0178
-204052e7
-2040d2da
-2440d2d6
-20200179
-204052da
-204052f6
-18007e11
-2040528d
-d8c00749
-204070de
-2020017f
-6842004c
-18410401
-6fe20048
-1fe3fe00
-c5908186
-7d34fe00
-202052ab
-7934fe00
-9842fe00
-202052ab
-6fe20030
+67e28950
+6fe28951
+793ffe00
+67e28951
+6fe28952
+793ffe05
+67e28952
+20600000
+6fe2896b
+793ffe04
+793ffe05
+67e2896b
+70890500
+70890470
+708905ff
+6fe2896b
 79207e04
-67e20030
-1c427e00
-67e806c2
-6fe206ab
-c2818196
-79207e03
-67e206ab
-204001f2
-18007e01
-2040528d
-202052a6
-70004800
-20600000
-da204140
-2040604d
-18007e05
-2040528d
-6fe80779
-e7e80005
-d84006af
-204052d0
-20406142
-204052e7
-202081a8
-7006b101
-c51081ae
-6fe20b9c
-207a0000
-70007c0b
-c51081ae
-6fe24293
-207a0000
-204052e7
-242081ae
-20600000
-c6908000
-793f8021
-204007be
-202002f5
-6fe20183
-203a2378
-d8c00183
-df2000f0
-d8400000
-204001ba
-60440099
-2020238d
-efe20006
-207a0000
-18408401
-c20001ba
-20600000
-20405b02
-20402588
-2436a429
-20402bab
-20405b20
-20402500
-2040245a
-20402841
-20402827
-20404b89
-204001ce
-20202425
-20404b89
-204001ce
-20202198
-6fe242a7
-207a0000
-6fe2007c
-247a0000
-204033cc
-242281e1
-6fe242a7
-c001b3e2
-c004b3e8
-c00533f4
-c005b3fa
-c0063404
-c0043446
-c00c33da
-c003b3d4
-c00cb3d8
-c00d345d
-c0093422
-c00981e9
-204033d0
-247a0000
-6fe242a7
-c00681eb
-c00e81e7
-202033bf
-70007c37
-202033ca
-70007c18
-202033ca
-6fe2004b
-79207e01
-67e2004b
-6fe20030
-c283b413
-204002fd
-202033ca
-704c9b02
-704c8a00
-202001f7
-704c9b00
-704ca100
-704c9f00
-202007c0
-6fe24c9a
-203a07c2
-6fe24c99
-203a0222
-1fe0ffff
-67e24c99
-202007c2
-6fe20018
-1ff18400
-184f840a
-1fe17e0f
-98408400
-18467e00
-20600000
-20402108
-704c8a04
-202001f5
-204024d2
-7854fc00
-6fe24c9b
-c0008207
-6fe2004c
-c28221c5
-6fe20030
-c30221c4
-202003a4
-6fe24c9c
-c0000219
-c000821c
-c001021f
-704c8702
-20600000
-704c880f
-704c8702
-20600000
-704c880f
-704c8722
+79207e05
+67e2896b
+204000c6
+70804205
 20600000
-704c88ff
-704c872f
+70804208
+70890500
+70890470
 20600000
-793f801c
-704c8801
-704c8701
-204003ea
-58000000
-e7e20005
-202003f4
-c595822e
-1c40a200
-20348231
-1d00a200
-20200231
-1c40a203
-20348231
-1d00a203
-68440032
-1a227e00
-793ffe1b
-9846fc00
-6fe40075
-204071c9
-18072600
-9a667e00
-2021023b
-9840fe00
-9a20fe00
-67e80034
-7046cf00
-6fe20030
-79207e01
-67e20030
-6fe20073
-67e20092
-58000000
-67e64208
-67e6420b
-67e241f8
-6fe44161
-67e4003e
-2434824b
-18808fff
-704c8a02
-2020025b
-6fe20030
-c4008000
-793ffe01
-67e20030
-6fe4415f
-67e4003e
-7855fc00
-704c8a00
-2020025b
-2040032d
-68420046
+68468336
+58100f0f
 98467c00
 20628000
-20200380
-202007c4
-20402337
-202c0264
-204024ca
-243a025c
-78587c00
-1d027e00
-67e84169
+67e6804c
+70804fca
+204000ce
 20600000
-704c8a00
-2040029b
-2020248f
-204021ec
-24740000
-78547c00
-70001120
-793f800b
-20402b71
-2040232b
-c5058277
-204024ca
-243a026c
-78547c00
-1c427e00
-67e84169
-78387c00
-7834fc00
-202002a5
-20402b6f
-d8200010
-20402321
-78587c00
-7854fc00
-20402917
-204024ab
-204024f3
-20368283
-204024ca
-243a027e
-20200271
-18000401
-6fe20031
-793ffe01
-67e20031
-20402bab
-20402940
-78347c00
-704c8a01
-2020029b
-70011600
-70015000
-204024d2
-793f8011
-2040724d
-6fe24c9b
-207a0000
-202003a4
-20404b82
-204024ce
-1fe67c0f
-24210299
-202024b9
-70416f01
-202024b9
-704c8808
-704c8712
-204003ea
-18007e00
-e7e20005
-6fec0040
-e7ec0005
-6fe24c8a
-e7e20005
-202003f4
-704c8a00
-243482a8
-704c8a01
-704c8808
-704c8712
-204003ea
-18007e35
-e7e20005
-6fec0040
-e7ec0005
-6fe24c8a
-e7e20005
-202003f4
-da201000
-68440738
-20407a08
-6fe2007d
-c00206d7
-c01386e9
-c0198306
-c00382e1
-c01706ed
-c01406f7
-c00582d7
-c00402e5
-c00882c8
-c00602ca
-c00b82d4
-20204ba4
-6fe20739
-67e206a3
-c00882c6
-20204cad
-20404d0a
-202006cd
-20404e14
-202006cd
-da200040
-2040604d
-6fe80739
-68480779
-98467c00
-202282d1
-20204d8b
-20404d8e
-c6108000
-202002f5
-6fe44de9
-c3014e10
-20204def
-20404d6f
-67e206af
-20404f51
-70007c0c
-6fe24293
-247a0000
-6fe20030
-c3830000
-20404d80
-202002fd
-6fe20739
-67e206a4
-2040076d
-20204d51
-20404f51
-7006ae01
-20400303
-20204d60
-6fe20030
-c283a1e1
-6fe20b9c
-203a21e1
-700b9c00
-6fe2004b
-2feffe01
-793ffe01
-67e2004b
-204021e1
-c6108000
-202007be
-704c8803
-704c8706
-204003ea
-18007e00
-e7e20005
-6fe20046
-e7e40005
-202003f4
-704c8806
-704c8717
-204003ea
-6fec0040
-e7ec0005
-202003f4
-704c8806
-704c8716
-202002ff
-20200307
-6fe24ca1
-c0008316
-2040031b
-704c880a
-704c8704
-204003ea
-6fec0040
-e7ec0005
-6fe60146
-e7e60005
 58000001
-e7e20005
-6fec0040
-67ec4f37
-202003f4
-6fec4f37
-684c0040
-98467c00
-20228309
-20600000
-704ca101
-704c9b00
-20600000
-6fe243de
-207a0000
-20403e9d
-20628000
-1fe20c00
-20403e92
-c0058372
-20203ef4
-70442901
-20758000
-70442900
-20600000
-20400341
-2040712d
-2020033e
-20400341
-efe40006
-2020033e
-20400341
-efe60006
-2020033e
-20400341
-efec0006
-2020033e
-20400341
-efee0006
-2020033e
-20400341
-eff00006
-2020033e
-20400341
-efe20006
-18c20400
-60464bf2
-20600000
-68464bf2
-18420c00
-20600000
-6fe206a4
-67e20f12
-20404894
-20200392
-5800003f
-67f04c6c
-5fffffff
-67f04c1c
-58000000
-67ec4c7a
-67e244de
-67e244d9
-67e24133
-6fec4c8d
-67ec4639
-67ec4140
-20600000
-2040032d
-20400392
-202004ac
-2020037e
-20600000
-704ddb00
-2020035e
-704ddb03
-2020035e
-62464ddc
-58004b4a
-67e443e3
-1fe20a00
-5800000a
-e7e20005
-18007e04
-e7e20005
-6fe24ddb
-e7e20005
-6fe64ddc
-e7e60005
-18007e06
-67e243e2
-20203f1a
-204007c6
-6a464dd8
-2020035a
-6a464dd8
-202005f3
-20403e92
-20403e92
-67e24dd7
-df200003
-d8a04dd8
-20403e88
-6fe24dd7
-c0000370
-c001836d
-20202baf
-704c9612
-20200383
-704c9601
-20200383
-704c960c
-20200383
-704c9600
-df200001
-20400387
-202003f4
-704c9600
-2040038b
-6fe24c96
-e7e20005
-20600000
-704c870e
-1f20fe03
-67e24c88
-204003ea
-6fe64c93
-e7e60005
-20600000
-700f1200
-20200397
-700f120c
-20200397
-700f1202
-704c870f
-704c8804
-204003ea
-6fe20f12
-e7e20005
-6fe64c93
-e7e60005
-202003f4
-6ff04c6c
-c4020000
-6fe20639
-67e24e18
-202007c8
-6fe20046
-67e24e18
-793f8021
-70004600
-704ca100
-704c9b00
-202007c8
-6fe20624
-d8400000
-c1018000
-d8400001
-20600000
-6fe204db
-1fe17e0f
-d8400000
-c1000000
-d8400001
-c1008000
-d8400002
-c1030000
-d8400003
-c1010000
-d8400004
-20600000
-6ff04c6c
-c4008000
-dfe00006
-684204dc
-9840fe00
-67e24c88
-1fe0fe03
-67e44db1
-20400607
-207a0000
-704c873e
-204003ea
-58000002
-e7e20005
-58000001
-e7e20005
-204003b0
-e0420005
-204047d5
-1a227e00
-e7e20005
-684204dc
-184085fa
-efec0006
-e7ec0005
-e0420005
-18427200
-2040712d
-20400200
-e7e20005
-202003f4
-6fe20046
-67e242a8
-202003e0
-6fe20639
-67e242a8
-704c8805
-704c8713
-204003ea
-58000001
-e7e20005
-6fe242a8
-e7e40005
-58000001
-e7e40005
-202003f4
-6fe24c88
-1fe0fe03
-67e44db1
-204003f1
-6fe64c86
-e7e60005
-20600000
-204005d1
-1a420a00
-20600000
-da204d84
-20403fa5
-2020035c
-18000400
-18000201
-60421001
-6842063a
-79200405
-18417efc
-9821fe00
-67e2063a
-1fe17e1f
-280ffe26
-7920fe04
-67e21000
+37d98200
+67e28005
+37d98200
+37d98200
 20600000
-6fe2063a
-c3828000
-20400426
-2040043a
-203a03f7
-efe20006
-ea220006
-9a267e00
-18c20a00
-68444953
-2040726f
-1fe20400
-18a20c00
-e8220006
-1a227e00
-98c08c00
-d8a01002
-18427200
-2040712d
-2040480e
-204003f9
-2040043a
-efe20006
-1fe22200
-18c23000
-ea420006
-9a467e00
-68444953
-2040726f
-9a40fe00
-e7e20018
-9a267c00
-24628000
-202049f1
-6fe24683
-203a480c
-20400430
-c6130000
-da204d5c
-204005c4
-c000480c
-c000c80c
-79200026
+20000064
+708955d4
+20000028
+708955d2
+20000028
+708955d1
+20000028
+6fe24c51
+67e28955
+6fe24c52
+67e28956
+708955d0
+708956e0
+18002a00
+7850fc00
+78507c00
+782f7c00
+70890600
+70890300
+70890470
+70890200
+70890100
+70890000
 20600000
-2040043a
-203a480c
-efe20006
-e8420006
-98460400
-6fe44953
-98467c00
-2021480c
-79200026
+1fe37e00
+1fe0fffd
+1fe0ffff
+242280ee
+18007e00
 20600000
-da204d5c
-20203fa1
-2040043e
-20202739
-204045bd
-204045cd
-20407a47
+70890477
+70890303
+2000000a
+70890383
+7089047f
+708903a7
+20600000
+68424c3f
+18417e0f
+c00080ff
+c00180ff
+c00380ff
+704c3f01
+6fe24c40
+1fe17e03
+67e24c40
+c0008106
+c0010106
+c0018106
+704c4001
+6fe24c41
+1fe17e03
+67e24c41
+c000810c
+c001010c
+704c4101
+6fe24c42
+1fe17e30
+67e24c42
+c0000112
+c0100112
+704c4200
+6fe24c43
+c0000115
+20200116
+704c4319
+6fe24c44
+1fe17e03
+67e24c44
+c000811c
+c001011c
+704c4402
+6fe24c3e
+c0000121
+d8400051
+98467c00
+24210122
+704c3e02
+6fee4c3e
+67ee4c45
+6fe24c47
+c0008127
+c0010138
+68424c45
+184085ff
+6fe24c48
+c0008155
+c001012c
+204000f2
+204001f7
+20400242
 79202a00
 782efc00
 78307c00
 7850fc00
 20404644
-19317e00
-1fecfe00
-1ff1fe00
-08008628
-7823fc00
-7824fc00
-6fe21000
-08008608
-efe20006
-1fe27200
-08008608
-2022c6a6
-202046a3
-204045aa
-20404766
-20400404
-2040043c
-20400598
-20404594
-203405a7
-2020458a
-6fec0633
-684c4627
-98467c00
-24628000
-20402266
-24628000
-204046f1
-2040454a
-7042a700
-70065b00
-204047d2
-202007ca
-6fe204dd
-c00104a1
-c0040495
-c004849e
-c00604a4
-c0008470
-c00a048a
-c00a847f
-20204868
-efea0006
-67ea4528
-efe40006
-67e40643
-6844063d
-98467c00
-24214890
-6fe20623
-79207e06
-67e20623
-20600000
-98467c00
-20610000
-1fe20400
-20600000
-eff00006
-67f04953
-6fe44953
-6844495f
-2040047b
-60444953
-6fe44957
-6844495b
-2040047b
-60444957
-202007cc
-2040047f
-da200009
-d8200003
-204049ab
-58000015
-e7e20005
-6ff0495b
-e7f00005
-20600000
-da400014
-2020048b
-2040049e
-da200009
-d8200003
-204049ab
-58000009
-e7e20005
-6ff04ddf
-e7f00005
-20600000
-eff00006
-67f04c0a
-202007ce
-efe20006
-67e206a4
-20204890
-efea0006
-67ea4c12
-2034800b
-6fe24c17
-247a0000
-1fe0fe01
-67e24c17
-202048f0
-da200009
-d8200003
-204049ab
-58000008
-e7e20005
-6ff04ddf
-e7f00005
-20600000
-2040061f
-67e64e15
-58000000
-67e64d2e
-6fe20046
-67e242a8
-704ddb05
-202004c3
-20400625
-67e64e15
-58000000
-67e64d31
-6fe20639
-67e242a8
-704ddb04
-58004b4a
-67e443e3
-1fe20a00
-5800000a
-e7e20005
-18007e06
-e7e20005
-6fe24ddb
-e7e20005
-6fe64e15
-e7e60005
-6fe242a8
-e7e40005
-18007e08
-67e243e2
-20203f1a
-6fe204db
-684c4639
-c28384d7
-202004d8
-684c4c7a
-6fec04e3
-98467c00
-24628000
-2040493a
-202007ca
-20404536
-70100001
-70100100
-5800001b
-67e44953
-204024ce
-1fe0fe18
-67e20639
-20600000
-204045b4
-2040315c
-6fe20624
-c00184ed
-20204579
-2040043e
-202005ab
-7834fc00
-204048fd
-20210778
-204045fc
-20400404
-7856fc00
-204004eb
-24368513
-2040050e
-20404766
-20400598
-20404594
-203404fc
-7854fc00
-20202739
-20400404
-20400502
-78377c00
-204005ab
-203684f5
-202004fa
-20400504
-20202739
-204045bd
-204045cd
-79202a00
+6fe24c49
+67e28908
+2020016c
+202000d4
+68424c45
+184085ff
+6fe24c48
+2fe01e01
+20408150
+24408143
+6fee4c45
+684e4c3e
+98467c00
+2022813e
+202000f9
+20400137
+20400245
+58000500
+20402bb1
+20202a23
+784efc00
+784e7c00
+7846fc00
+78467c00
+7844fc00
+78477c00
+7843fc00
+202000d4
+20400137
+20400245
+68424c46
+18412a07
+20202b08
+204000f2
+204001f7
+7843fc00
 782efc00
 78307c00
-7850fc00
-2040050c
-20200446
-37c18200
-20600000
-6fe20623
-c3818000
-79207e03
-67e20623
-20600000
-6fe20623
-c28184fa
-6fe24e17
-1fe67c06
-24210778
-1fe0fe01
-67e24e17
-202004fa
-684c4639
-20600000
-684c4c7a
-20600000
-6fe2461b
-c000c6bd
-6fe2461c
-1ff27e00
-1febfe00
-6842461b
-9840fe00
-67e24536
-684244df
-1840fe06
-67e24537
-18427200
-6fe2461c
-205a051b
-245a051d
-604c4538
-d8c044e0
-2040712d
-202046cd
-6fe20623
-c4028000
-6fe4063d
-68440643
-98467e00
-67e40124
-24610000
-2040473e
-202007d0
-20404972
-2040475a
-20400532
-20202940
-78287c00
-6fe40631
-68484644
-98409600
-204045c7
-204045bd
-7856fc00
-78567c00
-7826fc00
-7830fc00
-78507c00
-19623600
-37c18400
-2037054f
-1b420400
-604c00a4
-242c2739
-20370556
-dd2001e0
-1c225000
-6fe20623
-c3018556
-2055ac9c
-20402abc
-7823fc00
-7824fc00
-09800008
-19897e00
-67e204db
-6842063a
-1fe37e00
-9842fe00
-2feffe02
-7920800f
-09800008
-19897e00
-67e204dc
+68424c46
+18422a00
+6fe24c49
+67e28908
+c000016a
+6fe24c4a
 1fe27200
-67e2068c
-203a0580
-6fe204db
-1fe17e03
-c0018575
-c5078577
-da204cca
-204005c4
-c0008577
-2040061b
-203a0577
-20400625
-18c20a00
-6fe404db
-e7e40005
-2020057c
-d8a004dd
-2020057c
-09800008
-19897e00
-c2000577
-78367c00
-20200580
-09800008
-19897e00
-e7e20005
-c200057c
-09800018
-78287c00
-db600664
-20360587
-1fef7e00
-1ff17e00
-e7e60005
-20232739
-7836fc00
-6fe242b5
-243a058e
-6fe20017
-1fe0a200
-20402a7b
-7846fc00
-20202a17
+d8c03000
 efe20006
-1fe17e03
-67e2068d
+08008608
+c2000162
+6fee4c45
+684e4c3e
+98467c00
+2022815f
+202000f9
+6fe24c4b
+c00081bf
+6fe24c46
+c0008171
+c001818b
+c0038198
+20600000
+6fe24c4a
+c00c8175
+c03c0178
+c078017b
+df200035
+d8c03000
+2020017e
+df2000cb
+d8c03000
+2020017e
+df200162
+d8c03000
+2020017e
 efe20006
-67e2068c
-207a0000
-60c4068e
-20600000
-c6078000
-c68d0000
-20760000
-6fe204dc
-207a0000
-6fe204db
-1fe17e03
-c001c866
-20400625
-20400590
-6fe2068c
-207a0000
-6fe2068d
-c001c866
-202004bc
-78377c00
-204005ab
-2036c582
-2020458a
-68420017
-20402a1f
-20402a23
+08008608
+c200017e
+20400137
 78287c00
-d9601388
-20200544
-2040010f
-202007d2
-1a208409
-efe20002
-203a2baf
-1a20fe02
-e844003f
-ea460002
-58000000
-e7e60002
-1840a603
-20403f8d
-1a20fe02
-e264003f
-1a208409
-efe20002
-1fe0ffff
-e7e20002
-20600000
-1a208409
-efe20002
-20600000
-dee002a8
-6fe204d5
-c1018000
-20204146
-204005e6
-da204d34
-20203f94
-da204d34
-20403fa5
-202005f3
-204005e6
-da204d84
-20203f94
-1a20fe04
-e844003f
-e2460002
-1840a603
-20403f8d
-1a20fe04
-e264003f
-1a20a609
-e8420013
-18408401
-e0420013
-1a20a608
-efe20013
-98467c00
-24212baf
-1a420c00
-1a427e00
-20600000
-20400607
-203a2baf
-6fe44dd1
-68444db1
-98467c00
-202105ee
-da204cca
-20203fa5
-da204ca2
-204005c4
-203a05ec
-da204ca2
-20203fa5
-204005ff
-da204ca2
-203a05f8
-da204cca
-20203f94
-204005fc
-203a2baf
-da204ca2
-20203f94
-6f224caa
-d8c04cf2
-20200601
-6f224cd2
-d8c04d10
-efe60006
-9a467c00
-20228605
-c2000601
-1f227e00
-20600000
-6fe44dd1
-68444db1
-98467c00
-2021060d
-da204cca
-202005c4
-da204ca2
-204005c4
-247a0000
-2020060b
-6fe44dd5
-20200614
-58000010
-67e44db1
-62280f1e
-20400607
-6a280f1e
+db600350
+202180f9
+6fee4c45
+684e4c3e
+98467c00
+20228184
+20400137
+202000f9
+6fe24c4a
+c00c818f
+c03c0192
+c0780195
+df200057
+d8c03000
+2020017e
+df200183
+d8c03000
+2020017e
+df2002ae
+d8c03000
+2020017e
+6fe24c4a
+c00c819c
+c03c019f
+c07801a2
+df200078
+d8c03000
+2020017e
+df20023a
+d8c03000
+2020017e
+df2003fe
+d8c03000
+2020017e
+6fe24c4a
+c00c81a9
+c03c01ac
+c07801af
+df200069
+d8c03000
+202001d1
+df200195
+d8c03000
+202001d1
+df2002c1
+d8c03000
+202001d1
+6fe24c4a
+c00c81b6
+c03c01b9
+c07801bc
+df200078
+d8c03000
+202001d1
+df20024e
+d8c03000
+202001d1
+df2003e8
+d8c03000
+202001d1
+6fe24c46
+c00081c4
+c00181a5
+c00381b2
+20600000
+6fe24c4a
+c00c81c8
+c03c01cb
+c07801ce
+df200037
+d8c03000
+202001d1
+df2000cd
+d8c03000
+202001d1
+df200163
+d8c03000
+202001d1
+efe20006
+08008608
+c20001d1
+202001db
+6fee4c45
+684e4c3e
+98467c00
+2022816c
+20400137
+202000f9
+20400137
+20407148
+d8e0000f
+58000001
+20407141
+d8e0000f
+20407148
+203a01e8
+6fee4c45
+684e4c3e
+98467c00
+202281e0
+202000f9
+180a7e00
+67e24c4c
+6fe24c4c
+1fe67c50
+202101f0
+1fe0ffb0
+67e24c4c
+202001ea
+6fe24c4c
+c00001f5
+c00081f5
+67e24c3e
+202000f9
+704c3e02
+202000f9
+60420017
+1840a201
+20400215
+58000500
+204000ec
+70890601
+7089003c
+708901e0
+70896d12
+2000000a
+70890201
+7089023d
+2000000a
+708903b7
+2000000a
+7089027d
+6fe24c50
+67e28956
+20000004
+708955d1
+20000004
+708955d2
+20000004
+708955d8
+20000004
+6fe24c4f
+67e28955
+708955d8
+708956f0
 20600000
-da204cca
-20203fa5
-6fe44d2e
-247a0000
-da204cca
-202005c4
-6fe64d2e
-243a7111
-20400619
-1a427e00
-67e64d2e
-20207111
-6fe64d31
-243a7111
-20400619
-1a427e00
-67e64d31
-20207111
-da2047dc
-2040725d
-207a0000
-1fe22600
-20203190
-1a627e00
-c00a8633
-20203168
-704c8c00
-704c1700
-204007d4
-2040039f
-202031c3
-6842063a
-284c0005
-20608000
-6fe204db
+58000960
+9a208400
+6fe2415d
+70895f04
+984ffe00
+6842415e
+9846fc00
+2040022b
+1807a200
+18077e00
+1ff07e00
+1ff27e00
+9846fc00
+2040022b
+1807fe00
+1fed7e00
 1fe3fe00
-9842fe00
-c4018000
-793f8405
-79400403
-6042063a
-28400603
-24608000
-6fe245b5
-c0014794
-6fe21002
-c0010778
-c002c790
-20600000
-20404906
-20400638
-6fe204db
-2feffe04
-79208027
+9a21fe00
+67e88960
+70895f44
+70895fc4
+20600000
+207a8000
+2020022b
+df2003fe
+d8a03000
+580001ff
+18002400
+1fe92200
+1a232200
+9a22a200
+2a2ffe00
+7920fe09
+18430400
+2feffe00
+79208407
 1fe37e00
-9842fe00
-2feffe02
-7920800f
-6fe204dc
-203a065c
-6fe20623
-c302065c
-c6078000
-20406246
-204061b6
-793a001a
-247a0000
-20760000
-c6078000
-7920001a
-6842063a
-79400402
-6042063a
-20600000
-202007d6
-20400674
-18227e00
-c1018000
-202003de
-62244db1
-20400671
-1a420a00
-6fe44db1
-e7e20005
-58000000
-e7e20005
-e0220005
-20600000
-204005e6
-da204d5c
-20203f94
-da204d5c
-20403fa5
-202005f3
-6fe20b97
-207a0000
-700b9700
-6fe20b95
-c0048684
-20206472
-6fe20b98
-207a0000
-700b9800
-6fe20b96
-c009068d
-c0048684
-20206481
-204063ce
-202006c5
-202052d6
-700b960f
-204052da
-204052f2
-2020e406
-20206410
-20600000
-700b9801
-700b9613
-20600000
-20400333
-67ec42a9
-20400330
-67e647ce
-df200007
-20400386
-6fec0040
-e7ec0005
-204003f4
-6fe24c9f
-c000869d
-7042a716
-20600000
-204033e5
-700b9b01
-20600000
-20400333
-67ec42a9
-204006b4
-df200007
-20400386
-6fec0040
-e7ec0005
-202003f4
-7840fc00
-6fe24c97
-207a0000
-6fe406a8
-684206aa
-98417e00
-6fe20b95
-247a0000
-204006bf
-704c9f01
-7820fc00
-20600000
-700b950a
-700b9701
-20600000
-704c8809
-704c8732
-204003ea
-6fec0040
-e7ec0005
-6fe647d3
-e7e60005
-202003f4
-704c8806
-704c8731
-204003ea
-6fec0040
-e7ec0005
-202003f4
-704c8807
-704c8736
-204003ea
-58000000
-e7e20005
-6fec0040
-e7ec0005
-202003f4
-704c8804
-704c8708
-204003ea
-58000000
-e7e20005
-68420046
-e0440005
-58000001
-e7e20005
-202003f4
-6fe20739
-67e206a3
-c00586db
-20204cc0
-6fe24132
-c087cd22
-6fe24293
-207a0000
-68420055
-70005500
-70429300
-6fe2073a
-c1830000
-60420055
-700b9b01
-204006a8
-24208303
-20600000
-20404dc7
-6ff00739
-67f04e1a
-20600000
-6fe24170
-1fe0fe01
-68420739
-98467c00
-242106f5
-60424170
-20404d51
-202007d8
-70007c04
-20600000
-20404edd
-202006ea
-6fe20151
-1fe17e03
-c080a68a
-da204cca
-20403fb4
-203a2739
-2020268a
-1f227e00
-67e4012c
-203a06f9
-9ea67c00
-20212729
-18017e01
-243a070b
-6fe20151
-1fe17e03
-c001a649
-c507a6f0
-684444d2
-184085fd
-6fe4012c
-98467c00
-20212729
-da204cca
-204005c4
-c000a739
-2040061b
-203a2739
-2040061f
-18c20a00
-6fe20151
-e7e20005
-6fe4012c
-e7e40005
-20202686
-09800010
-20437a57
-20232722
-c58026ba
-793f8000
-20600000
-204004b4
-202026dd
-62244db1
-204005cb
-6a244db1
-20600000
-da204d34
-20203fa1
-204005ce
-202003db
-202005ce
-20400611
-203a729b
-2020729d
-da204d34
-202005c4
-20202baf
-20400730
-207a0000
-6fe2004b
-c3830000
-2040419e
-efe40006
-67e40099
-efe20006
-79207e02
-67e20098
-18c27e00
-67e4013c
-6fe4442c
-203a0742
-20205b2e
-6fe40099
-203a2baf
-d84002a7
-98467e00
-2022db44
-20205b3e
-70429300
-20204b77
-67e40fb7
-2020074c
-68440fb7
-18518400
-6fe44881
-98467c00
-2022d86b
-60444881
-58000100
-984f8400
-6fe6487b
-98467e00
-6846433d
-9840fe00
-1fe0fffc
-67e6023c
-58000100
-67e40241
-58004e34
-67e4023f
-204007a9
-204057e8
-6fe280a0
-67e20124
-20405589
-6fe20124
-67e280a0
-704f6300
-58004e34
-20205866
-18007e02
-2040528d
-6fe206a4
-e7e20005
-204052a6
-6fe2004b
-79207e03
-67e2004b
-70007201
-20600000
-20404528
-204045a4
-20403212
-2040682b
-700f0d15
-20206b2e
-20400773
-7854fc00
+1a40a401
+2a400e00
+24208231
+e0420005
+c2000231
 20600000
-6fe24040
-c3800000
-c3818000
-6fe247cd
-203a0782
-6fe24724
-207a0000
-20202d53
-6fe206ab
-67e24bef
-20200788
-7043dd01
-20403f41
-2040554f
-20400799
-df200020
-d8c08080
-18c20a00
-efe20006
-c0018795
-c0020795
-c0028795
-c0038795
-c0160795
-c0168795
-c0800797
-58000080
-e7e20005
-c200078c
+20200240
+20200241
+783b7c00
+70891407
 20600000
-df200008
-d8c0812a
-2020078c
-6fe24131
-207a0000
-20400730
-247a0000
-da204d5c
-204005c4
-247a0000
-da204cca
-204005c4
-68424caa
-98467c00
-24628000
-20202d15
-704f6301
-704f6453
-6fe24f62
-207a0000
-6fe24f64
-c1a98000
-202007ab
-18227e00
-c003a739
-c0032739
-202025df
-580001e0
-2020074a
-58000240
-2020074a
-58000250
-2020074a
-580001f0
-2020074a
-58000180
-2020074a
-58000190
-2020074a
-58000110
-2020074a
-58000170
-2020074a
-58000150
-2020074a
-58000200
-2020074a
-58000140
-2020074a
-580001a0
-2020074a
-580001d0
-2020074a
-580001c0
-2020074a
-580001b0
-2020074a
-580000e0
-2020074a
-58000220
-2020074a
-58000230
-2020074a
-58000130
-2020074a
-58000080
-2020074a
-58000070
-2020074a
-580000c0
-2020074a
-58000060
-2020074a
-580000b0
-2020074a
-58000090
-2020074a
-580000a0
-2020074a
-580000d0
-2020074a
-58000160
-2020074a
-580000f0
-2020074a
-58000010
-2020074a
-58000020
-2020074a
-58000030
-2020074a
-58000040
-2020074a
-58000050
-2020074a
-58000210
-2020074a
-58000100
-2020074a
+60420017
+1840a204
+20200215
+df20000a
+d8a04d82
+1a220c00
+2020713a
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/sched.rom
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/sched.rom	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/sched.rom	(working copy)
@@ -1,64 +1,63 @@
-
 mem_patch00:     
-04   #mem_patch00
-40   #mem_patch01
-01   #mem_patch02
-50   #mem_patch03
-11   #mem_patch04
+00   #mem_patch00
+00   #mem_patch01
+00   #mem_patch02
+00   #mem_patch03
+00   #mem_patch04
 00   #mem_patch05
-04   #mem_patch06
-44   #mem_patch07
-12   #mem_patch08
+00   #mem_patch06
+00   #mem_patch07
+00   #mem_patch08
 00   #mem_patch09
-10   #mem_patch0A
-31   #mem_patch0B
+00   #mem_patch0A
+00   #mem_patch0B
 00   #mem_patch0C
-0c   #mem_patch0D
+00   #mem_patch0D
 00   #mem_patch0E
 00   #mem_patch0F
-62   #mem_patch10
+00   #mem_patch10
 00   #mem_patch11
 00   #mem_patch12
 40   #mem_patch13
-11   #mem_patch14
-01   #mem_patch15
+00   #mem_patch14
+00   #mem_patch15
 00   #mem_patch16
-06   #mem_patch17
+00   #mem_patch17
 00   #mem_patch18
 00   #mem_patch19
 00   #mem_patch1A
 00   #mem_patch1B
-01   #mem_patch1C
-00   #mem_patch1D  
+00   #mem_patch1C
+00   #mem_patch1D
 00   #mem_patch1E
 00   #mem_patch1F
-80   #mem_patch20
-10   #mem_patch21
-1c   #mem_patch22
+00   #mem_patch20
+00   #mem_patch21
+00   #mem_patch22
 00   #mem_patch23
-e8   #mem_patch24
-07   #mem_patch25
+00   #mem_patch24
+00   #mem_patch25
 00   #mem_patch26
-c8   #mem_patch27
-06   #mem_patch28
-88   #mem_patch29
-04   #mem_patch2A
-29   #mem_patch2B
-11   #mem_patch2C
-40   #mem_patch2D
-17    #mem_patch2E
+00   #mem_patch27
+00   #mem_patch28
+00   #mem_patch29
+00   #mem_patch2A
+00   #mem_patch2B
+00   #mem_patch2C
+00   #mem_patch2D
+00  #mem_patch2E
 00   #mem_patch2F
 00   #mem_patch30
-03   #mem_patch31
-04   #mem_patch32
+00   #mem_patch31
+00   #mem_patch32
 00   #mem_patch33
-60   #mem_patch34
+00   #mem_patch34
 00   #mem_patch35
-04   #mem_patch36
+00   #mem_patch36
 00   #mem_patch37
 00   #mem_patch38
 00   #mem_patch39
-10   #mem_patch3A
+00   #mem_patch3A
 00   #mem_patch3B
 00   #mem_patch3C
 00   #mem_patch3D
@@ -178,15 +177,15 @@
 7b
 83
 
-mem_le_features:
-21				//length extension
-00
-00
-00
-00
-00
-00
-00
+#mem_le_features:
+#21				#length extension
+#00
+#00
+#00
+#00
+#00
+#00
+#00
 
 
 mem_xip_option:5d 40 bb
@@ -340,25 +339,25 @@
 00 00 00 00 00 00 00 00 		00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 		00 00 00 00 00 00 00 00 00 00 00 00
 mem_simple_pairing_mode:00	
-mem_conn_status:00
-mem_io_cap_flag:00
-mem_inquiry_mode:00
+#mem_conn_status:00
+#mem_io_cap_flag:00
+#mem_inquiry_mode:00
 
 
-mem_param_alloc_normal_buffer_start_address:00 18
-mem_param_alloc_normal_buffer_max_length:83 00
-mem_param_alloc_big_buffer_start_address:00 20
-mem_param_alloc_big_buffer_max_length:b0 02
-mem_l2cap_rx_max_lenth:b0 02
+#mem_param_alloc_normal_buffer_start_address:00 18
+#mem_param_alloc_normal_buffer_max_length:83 00
+#mem_param_alloc_big_buffer_start_address:00 20
+#mem_param_alloc_big_buffer_max_length:b0 02
+#mem_l2cap_rx_max_lenth:b0 02
 
 
-mem_alloc_normal_total_size:0a
-mem_alloc_big_total_size:0a
-mem_snd_br_total_size:0a
-mem_snd_ble_total_size:0a
-mem_snd_hci_total_size:0a
+#mem_alloc_normal_total_size:0a
+#mem_alloc_big_total_size:0a
+#mem_snd_br_total_size:0a
+#mem_snd_ble_total_size:0a
+#mem_snd_hci_total_size:0a
 
-mem_hci_version_svnid:3987
+#mem_hci_version_svnid:3987
 
 mem_keyscan_switch:00
 
@@ -375,18 +374,18 @@
 
 mem_mesh_command_complete_num_hci_command_packet:01
 
-mem_mesh_read_local_version_info:
-09		#hci_version BT_HCI_VERSION_5_0
-00 00	#hci_revsion
-09		#lmp_version RADIO_BLE_VERSION_NUMBER:BT_HCI_VERSION_5_0
-0e 05	#manufacture_name Yichip Microelectronics (Hangzhou) Co.,Ltd.
-FF FF	#LPM_subversion
+#mem_mesh_read_local_version_info:
+#09		#hci_version BT_HCI_VERSION_5_0
+#00 00	#hci_revsion
+#09		#lmp_version RADIO_BLE_VERSION_NUMBER:BT_HCI_VERSION_5_0
+#0e 05	#manufacture_name Yichip Microelectronics (Hangzhou) Co.,Ltd.
+#FF FF	#LPM_subversion
 
-mem_mesh_read_local_support_command:02 05 ff
+#mem_mesh_read_local_support_command:02 05 ff
 
-mem_device_public_address:11 22 33 44 55 66
+#mem_device_public_address:11 22 33 44 55 66
 
-mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  
+#mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  
 
 
 mem_lpm_config:8f 10 ca
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom	(revision 4490)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle_fix_freq/ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom	(working copy)
@@ -1,8 +1,4 @@
 20200040
-58000034
-da204be7
-d8400008
-202056bd
 00000000
 00000000
 00000000
@@ -62,2306 +58,6 @@
 00000000
 00000000
 00000000
-20200040
-6fe244d9
-c1808000
-d8e00003
-20407148
-247a0000
-6fe444da
-d8e00003
-20407141
-20404735
-2040460a
-6fe444dc
-67e44e32
-2020000e
-7854fc00
-78487c00
-69644e32
-20400023
-24368020
-204047d5
-1a227e00
-67e24626
-6fec04dd
-67ec0633
-6fe24c8b
-c000845b
-204003bc
-204046d3
-24368020
-6fe204dc
-c0030020
-204003bc
-6fe44e32
-243a000e
-20600000
-204045c7
-204045bd
-7856fc00
-7826fc00
-7830fc00
-78507c00
-19623600
-37c18400
-1b627e00
-67e44e32
-2020465b
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe244de
-207a0000
-d8e00001
-20407148
-247a0000
-7854fc00
-78287c00
-20404735
-2040460a
-204046ad
-2436c91c
-6fe20003
-1fe0fe01
-67e20003
-6fe204db
-1fe17e0f
-c0018013
-2020491b
-d8400004
-6fe2461c
-7d3a0406
-60424536
-684244ff
-1840fe06
-67e24537
-18427200
-6fe2461c
-205a051b
-245a051d
-604c4538
-d8c04500
-2040713a
-2020468c
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe64d31
-245a000e
-58000000
-67e64d31
-dfe04d5c
-67e40f12
-6a240f12
-204005c4
-207a0000
-6a240f12
-20403fa5
-204005f3
-20200007
-1fe22400
-202005f3
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-2040032d
-67e242a8
-20400023
-2040032d
-67e40f12
-20402284
-24628000
-1a208c01
-efe20006
-c280001b
-6fe40f12
-67e44db1
-20400607
-205a723a
-6fe40f12
-1fe22200
-1fe22400
-20404185
-1a420a00
-6fe40f12
-e7e40005
-e0220005
-6fe40f12
-1fe27200
-20400341
-2020712d
-6fe40f12
-20400029
-247a0000
-6fe40f12
-1fe22200
-1fe22400
-204049ab
-20200017
-1fecfe00
-1ff1fe00
-18000201
-c1008000
-18000202
-20600000
-20400614
-203a729b
-2020729d
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-68464dd8
-2040033f
-2040033c
-c0008007
-c00107f8
-20202baf
-2040032d
-67e44c94
-d84003ff
-98410400
-60444c18
-1feb7e00
-1fecfe00
-67e24c1a
-2040033c
-67e24c1b
-202007fa
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-dfe00020
-da204f3d
-d8400020
-204056bd
-d8c04f3d
-efe40006
-207a0000
-67e44f5f
-2040000d
-20400011
-2040000d
-2020001d
-da204f3f
-df200006
-704f6101
-20600000
-efe40011
-68444f5d
-9840fe00
-67e44f5d
-6fe24f61
-9a20a200
-1a20a202
-6fe24f61
-1fe0fe01
-67e24f61
-c2000011
-20600000
-efe40011
-68444f5d
-9842fe00
-67e44f5d
-6fe24f61
-9a20a200
-1a20a202
-6fe24f61
-1fe0fe01
-67e24f61
-c200001d
-6fe44f5d
-68444f5f
-98467c00
-2422abaf
-20600000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe20739
-79207e07
-67e2007d
-c0418009
-c042000e
-c04c8010
-c04d0013
-20204c5a
-20404c9e
-6fe4073a
-6ff0073c
-67f04e22
-20600000
-20404ca0
-2020000a
-20404c78
-204006b7
-202006bf
-204006b7
-20404c78
-20404c7c
-700b9801
-700b9603
-20600000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c880b
-704c873e
-204003ea
-58000007
-e7e20005
-6fe20639
-e7e40005
-6ff04953
-e7f00005
-202003f4
-6ff04c6c
-c4028000
-704c8808
-704c870c
-204003ea
-58000000
-e7e20005
-6fe20639
-e7e40005
-6fea4c12
-e7ea0005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6ff04c6c
-c4018000
-704c880c
-704c873e
-204003ea
-58000004
-e7e40005
-6fe20639
-e7e40005
-6ff04c0a
-e7f00005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6ff04c6c
-c4010000
-704c880a
-704c873e
-204003ea
-58000003
-e7e40005
-6fe20639
-e7e40005
-6fec4530
-e7ec0005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6ff04c6c
-c4000000
-704c8813
-704c873e
-204003ea
-58000001
-e7e40005
-6fe20639
-e7e40005
-204003ab
-e0420005
-6fe24626
-e7e20005
-6fec0633
-e7ec0005
-6fe40625
-1feb7e00
-e7e40005
-6fe80650
-e7e80005
-6fe2065b
-e7e20005
-6fe20639
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c8817
-704c8718
-204003ea
-6fec0040
-e7ec0005
-d8c04297
-18007210
-2040712d
-18007e00
-e7e20005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe20048
-c0420005
-c0418008
-20204f9d
-68424c97
-604206a9
-20205046
-68424c97
-604206a9
-202050ba
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c9c
-c0810006
-204020dc
-246c0000
-c6000000
-684c0149
-20402289
-20628000
-20400213
-204003ea
-58000001
-e7e20005
-6fec0149
-e7ec0005
-6fe20144
-1fe20400
-1fe97e00
-1fe97e00
-e7e20005
-58000000
-e7e20005
-6fe24c9c
-c0800020
-58000000
-e7e20005
-6fe60146
-e7e60005
-6fe80132
-9c467e00
-e7e40005
-202003f4
-6fe60146
-e7e60005
-6fe80132
-9c467e00
-e7e40005
-6fe20018
-20400200
-e7e20005
-6fe24c9c
-c001002b
-202003f4
-6fe64d2e
-1fe20c00
-efe20006
-efe40006
-207a0000
-1fe20400
-1fe27200
-2040712d
-184672f0
-20407100
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0090005
-c011001a
-2020037e
-6fe24ded
-203a0380
-20400336
-67ee4e0a
-2040000e
-6fe24ded
-1fe0ffff
-67e24ded
-20200382
-20400359
-243a0380
-1a420a00
-1a40a407
-1a420c00
-efee0006
-e7ee0005
-c2000010
-58000000
-18a08bf9
-e7ee0005
-20600000
-2040032d
-67e4495f
-2040032d
-67e44961
-20400493
-df200003
-20400386
-6fe20639
-e7e40005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c8806
-704c8714
-204003ea
-6fe24c89
-e7e20005
-6fe20046
-e7e40005
-6fe24c8a
-e7e20005
-203a000e
-6fe40032
-1fe37e00
-2020000f
-58000000
-e7e40005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c8804
-704c8705
-204003ea
-58000000
-e7e20005
-6fe24e18
-e7e40005
-6fe206a4
-e7e20005
-6fe2004c
-793ffe05
-67e2004c
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c8803
-704c871b
-204003ea
-6fe20046
-e7e40005
-6fe24170
-e7e20005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c8807
-704c8720
-204003ea
-6fec0040
-e7ec0005
-6fe24ca0
-e7e20005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-704c880b
-704c8703
-204003ea
-6fe24c8a
-e7e20005
-6fe20046
-e7e40005
-6fec0040
-e7ec0005
-18007e01
-e7e20005
-18007e00
-6842004c
-284ffe02
-7920fe00
-e7e20005
-6fe20046
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c1a
-c000800b
-c001000f
-c001800c
-c002000d
-c0028010
-c0030011
-c004000e
-c01f8012
-2020037e
-202007ee
-202007f0
-202007f2
-202007f4
-202007f6
-2020037e
-2020037e
-6fe24c18
-c0008019
-c00b801d
-c010001f
-c0518024
-c0300034
-2020037e
-20400333
-67ec4c8d
-20400351
-20200382
-704e193f
-20200382
-df200002
-2040038b
-58000000
-e7e40005
-202003f4
-2040032d
-68420046
-98467c00
-2022802b
-68420639
-98467c00
-24628000
-604242a8
-df200003
-2040038b
-6fe242a8
-e7e40005
-6fe20018
-20400200
-e7e20005
-202003f4
-df200002
-2040038b
-6fe44f35
-e7e40005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe64d2e
-245a000f
-58000000
-67e64d2e
-dfe04d34
-67e40f12
-20200008
-6a240f12
-204005c4
-207a0000
-6a240f12
-20403fa5
-204005f3
-20200008
-1fe22400
-202005f3
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24f34
-243a07ec
-704f3401
-20400023
-6f224cd2
-6a444dd3
-6fe44dd5
-67e40f12
-58004cca
-67e40f16
-2040001d
-6fe24cd2
-1feff203
-d8c04cd4
-d8a04d10
-2040712d
-6f224caa
-6a444dcf
-6fe44dd1
-67e40f12
-58004ca2
-67e40f16
-2040001d
-6fe24caa
-1feff203
-d8c04cac
-d8a04cf2
-2020712d
-6a240f16
-20403f94
-6fe40f12
-9a40a400
-c200001d
-20600000
-58004ca2
-2040002c
-58004cca
-2040002c
-58004d34
-2040002c
-58004d5c
-2040002c
-58004d84
-1fe20a00
-1fe0a208
-1fe0fe0a
-e7e40005
-e7e40005
-e7e40005
-e8420011
-184f8403
-9840fe00
-e7e40005
-18a08a01
-58000000
-e7e20005
-18427200
-20207100
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c005000f
-c0070012
-c0098358
-c00b0355
-c00b8358
-c00c0358
-c00c8358
-c00d0358
-c00d8358
-c0078015
-c008001a
-c008801e
-202007ea
-2040033c
-67e244de
-20200382
-7044d900
-704c8b00
-20200382
-df200002
-20400386
-58000004
-e7e20005
-202003f4
-704ded00
-704e0a00
-704dee00
-20200382
-68424ded
-18467c04
-20228380
-20400336
-67ee4e0a
-20400025
-20200382
-6fe24ded
-d8a04dee
-1feffe07
-98a08a00
-6fee4e0a
-e7ee0005
-6fe24ded
-1fe0fe01
-67e24ded
-20600000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0040008
-c004800d
-c0058012
-c0060025
-c0068029
-202007e8
-2040033c
-67e244df
-1fe27200
-2040032a
-20200382
-2040033c
-67e244ff
-1fe27200
-2040032a
-20200382
-6fe244d9
-243a0380
-2040033c
-67e24636
-2040032d
-67e444da
-2040032d
-67e444dc
-2040033c
-67e24637
-2040033c
-67e24e11
-6fe444da
-684444dc
-98467c00
-24228382
-1fe3fe00
-67e444da
-20200382
-2040033c
-67e244d9
-2040033c
-20200382
-2040032d
-67e444da
-2040032d
-67e444dc
-2040033c
-2040033c
-20400333
-67ec4627
-2040033c
-67e24626
-2040032d
-1febfe00
-67e444d7
-2040032d
-2040032d
-67e44632
-2040032d
-67e44634
-7044d901
-704c8b01
-20200392
-00000000
-00000000
-20200040
-6fe24c18
-c01b8009
-c0290012
-c02a8018
-c02b001d
-c0360021
-c0368026
-2020037e
-20400256
-2040032d
-67e40051
-df200003
-20400386
-6fe20046
-e7e40005
-7042a71d
-202003f4
-2040033c
-67e24c98
-df200064
-d8a00183
-2040032a
-20200382
-df200002
-20400386
-6fe24c97
-e7e20005
-202003f4
-2040033c
-67e24c97
-203a037c
-20200382
-df200003
-20400386
-6fe44de7
-e7e40005
-202003f4
-2040032d
-67e44de7
-20200382
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c00c8009
-c00e0013
-c00e801b
-c0158690
-c01606a0
-c00d8026
-2020037e
-20400333
-67ec42a9
-2040032d
-67e200b6
-2040032d
-9c40fe00
-1fe17ffc
-67e800b7
-7042a703
-20200392
-6fe24c9b
-c0810396
-2040032d
-203a0396
-2040033c
-67e206a7
-7042a715
-20200392
-2040032d
-67e242a8
-20402284
-24228396
-1a208c01
-efe20006
-c2800024
-20400392
-20203420
-20400392
-202048f0
-6fe24c9b
-c0810396
-2040032d
-67e242a8
-203a0396
-20400392
-6ff04e1a
-243a0030
-7042a704
-20600000
-704c880b
-704c870b
-204003ea
-58000000
-e7e20005
-6fe20046
-e7e40005
-6ff04e1a
-e7f00005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0058009
-c0060011
-c0068017
-c0070020
-c0088028
-c009802c
-202007e6
-20400333
-67ec42a9
-d8a04297
-18007210
-2040032a
-70429301
-7042a70b
-20200023
-20400333
-67ec42a9
-7042a70c
-20400023
-204006a8
-24208303
-20400333
-67ec42a9
-2040033c
-67e247f1
-98007200
-d8a047f2
-2040032a
-7042a709
-20200023
-20400333
-67ec42a9
-7042a70a
-df200007
-20400386
-6fec0040
-e7ec0005
-202003f4
-2040032d
-67e242a8
-7042a70d
-20200392
-2040032d
-67e242a8
-2040033c
-1fe0fe0e
-67e242a7
-20200392
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0030006
-c0040018
-c005002b
-202007e4
-2040032d
-67e242a8
-2040033c
-67e206a4
-20402284
-24228396
-1a208c01
-efe20006
-c2800344
-7042a706
-6fe242a8
-6842439b
-98467c00
-24228392
-7042a711
-6fe2439a
-67e242a8
-20200392
-20400333
-67ec42a9
-7042a71a
-6fe24c9b
-c0008021
-c001001f
-20200025
-704c960b
-20200026
-704c9600
-20400026
-704c8a02
-202001f7
-704c9602
-df200007
-20400387
-6fec42a9
-e7ec0005
-202003f4
-6fe24ca1
-c0000396
-c0010394
-6fe24c9b
-c0010394
-704ca102
-20400333
-67ec42a9
-2040033c
-67e24c8a
-7042a708
-20400392
-202001f7
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c00e000f
-c00e8014
-c00f001b
-c0118020
-c0120025
-c0210028
-c0218029
-c022002b
-c0228030
-c0230033
-c0238034
-c0288036
-202007e2
-2040032d
-67e44153
-2040032d
-67e44151
-20200382
-df200005
-20400386
-6fe4414f
-e7e40005
-6fe4414d
-e7e40005
-202003f4
-2040032d
-67e4414f
-2040032d
-67e4414d
-20200382
-df200004
-20400386
-6fe6414a
-e7e60005
-202003f4
-20400330
-67e6414a
-20200382
-2020037e
-2040033c
-2020037e
-df200002
-20400386
-6fe24c9c
-e7e20005
-202003f4
-2040033c
-67e24c9c
-20200382
-2020037e
-2040033c
-2020037e
-df2000f2
-20400386
-6fe24c98
-e7e20005
-d8c00183
-df200064
-2040713a
-202003f4
-00000000
-00000000
-20200040
-6fe24c18
-c0070005
-c007800a
-2020037e
-df200003
-20400386
-6fe44de9
-e7e40005
-202003f4
-2040032d
-67e44de9
-20200382
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0018008
-c002001c
-c0058022
-c006002d
-c0068035
-202007e0
-6fe44deb
-c3010394
-6fe44de9
-c3010394
-6fe24c9b
-c0810396
-2040032d
-67e40253
-2040032d
-67e40255
-2040032d
-67e40257
-58000040
-67e4430b
-2040032d
-67e4430d
-2040032d
-67e4430f
-7042a712
-20200392
-2040032d
-67e40253
-6fe20031
-c3030394
-7042a713
-20200392
-6fe24c9b
-c0810396
-6fe44deb
-c3000394
-6fe44de9
-c3000394
-20400333
-67ec42a9
-2040033c
-7042a718
-20200392
-20400256
-df200005
-20400386
-6fe20046
-e7e40005
-6fe44deb
-e7e40005
-202003f4
-20400256
-2040032d
-67e44deb
-df200003
-20400386
-6fe20046
-e7e40005
-202003f4
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0008008
-c001000b
-c0018010
-c0028015
-c003001a
-202007de
-20400339
-67f04c6c
-20200382
-df200004
-20400386
-580400fb
-e7e60005
-202003f4
-df200009
-20400386
-6ff04ddf
-e7f00005
-202003f4
-6fe244de
-243a0380
-20400333
-67ec4c7a
-20200382
-6fe244de
-243a0380
-2040032d
-67e44617
-2040032d
-67e44619
-2040033c
-2040002d
-6042461b
-2040033c
-205a0035
-245a0039
-2040033c
-20400333
-2040033c
-67e24624
-2040033c
-67e24e11
-20200382
-d8400000
-c1000000
-d8400002
-c1018000
-d8400006
-c1010000
-d8400001
-20600000
-684c4c8d
-604c4639
-70461c00
-20600000
-70461c01
-20600000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0008009
-c001000e
-c0018014
-c002001e
-c002801e
-c0048019
-2020037e
-df200009
-20400386
-6ff04c24
-e7f00005
-202003f4
-df200041
-20400386
-d8c04c2c
-df200040
-2040713a
-202003f4
-df200009
-20400386
-6ff04138
-e7f00005
-202003f4
-df200007
-20400386
-6fec4140
-e7ec0005
-202003f4
-df200008
-20400386
-580002a8
-e7e40005
-5800003c
-e7e20005
-58000008
-e7e40005
-e7e40005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c000800c
-c001800f
-c0098011
-c00a001b
-c00b8023
-c00c0028
-c00c802b
-c00d0030
-c00d8033
-202007dc
-20400339
-67f04c1c
-20200382
-20400382
-20200348
-20400341
-d8a0468a
-df200042
-2040713a
-df200042
-d8c0468a
-d8400000
-204001ba
-60424689
-20200382
-df2000f9
-20400386
-d8c0468a
-df200040
-2040713c
-df200017
-204070e4
-202003f4
-df200003
-20400386
-6fe44159
-e7e40005
-202003f4
-2040032d
-67e44159
-20200382
-df200002
-20400386
-6fe24133
-e7e20005
-202003f4
-2040033c
-67e24133
-20200382
-df200005
-20400386
-6fe44153
-e7e40005
-6fe44151
-e7e40005
-202003f4
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-20200040
-6fe24c18
-c0008007
-c0010017
-c0028019
-c0048025
-202007da
-7920001c
-20400330
-67e64147
-2040033c
-d8400800
-984ffe00
-d840ffff
-98467c00
-24210011
-18427e00
-18000e02
-20407141
-2040033c
-67e24c99
-67e24c9a
-20200392
-7042a702
-20200382
-20400333
-67ec42a9
-2040032d
-67e40251
-2040032d
-67e200b6
-2040032d
-2040033c
-67e24ad0
-704c9b01
-7042a705
-20200392
-6fe24ca1
-c0000396
-c0010394
-6fe24c9b
-c0010394
-20400333
-67ec42a9
-7042a707
-2040033c
-c0008392
-7042a719
-20400392
-20204d51
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
 00000000
 00000000
 00000000
