Index: Librarier/bt_rom/format/headset.format
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/Librarier/bt_rom/format/headset.format	(revision 5413)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/Librarier/bt_rom/format/headset.format	(working copy)
@@ -313,7 +313,7 @@
 	5 mem_mesh_classic_version
 
 	//le encryption
-	16	mem_le_plaintext_data
+	16	mem_le_encrypted_data
 //	8 mem_le_random_number
 //	2 mem_le_encrypted_diversifier
 0 mem_headset_end
Index: Librarier/device/yc11xx.h
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/Librarier/device/yc11xx.h	(revision 5410)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/Librarier/device/yc11xx.h	(working copy)
@@ -494,6 +494,7 @@
 	GPIO_29,
 	GPIO_30,
 	GPIO_31,
+	GPIO_32,
 	GPIO_MAX_NUM,
 	GPIO_ACTIVE_BIT=0x80,
 }GPIO_NUM;
@@ -587,6 +588,7 @@
 // To avoid cm0 write xram error, need read a invalid addr. and write twice.
 #define HREADDEF(reg)  (*(volatile byte*)(reg_map(reg)))
 
+#define HREAD(reg)			((HREADDEF(0x4fff) & 0x00) |(HREADDEF(reg) & 0x00) | (HREADDEF(reg)))
 
 #define HREAD_INLINE(reg)			((HREADDEF(0x4fff) & 0x00) |(HREADDEF(reg) & 0x00) | (HREADDEF(reg)))
 #define HREADW_INLINE(reg)			((int)HREAD_INLINE(reg) | HREAD_INLINE(reg + 1) << 8)
@@ -610,6 +612,7 @@
 #define HREADL(reg)		(int)(HREAD(reg)) | (HREAD(reg + 1) << 8)| (HREAD(reg + 2) << 16)| (HREAD(reg + 3) << 24)
 #define HWRITEL(reg, val)	do { HWRITE(reg, (int)(val));HWRITE(reg + 1, (int)(val) >> 8);HWRITE(reg + 2, (int)(val) >> 16);HWRITE(reg + 3, (int)(val) >> 24); }while(0)
 
+#define HWRITE(reg, val)	do {(HREADDEF(reg) = (byte)(val));(HREADDEF(reg) = (byte)(val));}while(0)
 
 #define HWRITE2(reg,val) 	do {HREAD2(reg)=(byte)(val); volatile int n = 1; while(n--);}while(0)
 #define HWRITE3(reg,val) 	do {HREAD3(reg)=(byte)(val); volatile int n = 1; while(n--);}while(0)
Index: ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog	(revision 5413)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/BT/patch/z.prog	(working copy)
@@ -1064,10 +1064,6 @@
 	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,z_hci_parse_packet_cmd_ogf_le_controller_read_remote_features
-	beq HCI_LE_ENCRYPT,z_hci_parse_packet_cmd_ogf_le_controller_encrypt
-	beq HCI_LE_RAND,z_hci_parse_packet_cmd_ogf_le_controller_rand
-	beq HCI_LE_LONG_TERM_KEY_REQUEST_REPLY,z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_reply
-	beq HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY,z_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
@@ -1091,13 +1087,6 @@
 	istore 8,contw
 	rtn
 
-		
-z_hci_parse_packet_cmd_ogf_le_controller_encrypt:
-z_hci_parse_packet_cmd_ogf_le_controller_rand:
-z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_reply:
-z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_negative_reply:
-	branch p_hci_send_event_command_complete_error_command_nuknown
-
 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
@@ -1471,12 +1460,20 @@
 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
-	beq HCI_LE_ENCRYPT,z_hci_parse_packet_cmd_ogf_le_controller_encryption
-//	beq HCI_LE_START_ENCRYPTION,z_hci_parse_packet_cmd_ogf_le_controller_start_encryption	//0x19
-	branch p_hci_send_event_command_complete_error_command_nuknown
+ 	beq HCI_LE_RAND,z_hci_parse_packet_cmd_ogf_le_controller_rand	//18
+ 	beq HCI_LE_REMOVE_DEVICE_FROM_WHITE_LIST,z_hci_parse_packet_cmd_ogf_le_controller_remove_device_from_white_list	//12
+	beq HCI_LE_LONG_TERM_KEY_REQUEST_REPLY,z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_reply	//1a
+	beq HCI_LE_SET_DATA_LENGTH,z_hci_parse_packet_cmd_ogf_le_controller_set_data_length	//22
 
+	branch z_hci_parse_packet_cmd_ogf_le_controller4
+	
+z_hci_parse_packet_cmd_ogf_le_controller_rand:
+	arg 9,loopcnt
+	call p_hci_prepare_send_event_command_complete_with_status_success
+	force 8,loopcnt
+	call generate_random_another
+	branch ipc_hci_tx_start
+	
 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
@@ -1503,7 +1500,20 @@
 	istore 7,contw
 	rtn
 	
-
+z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_reply:
+	call p_ipc_rx_hci_data_two_byte
+	store 1,mem_hci_conn_handle      //connect handle
+	arg mem_le_ltk,contw
+	force 16,loopcnt
+	call p_ipc_rx_hci_data_n_byte
+	arg 3,loopcnt
+	call p_hci_prepare_send_event_command_complete_with_status_success
+	fetch 1,mem_le_conn_handle
+	istore 2,contw
+	call ipc_hci_tx_start
+	jam 1,mem_ltk_exists
+	branch le_parse_enc_req_after_auth
+	
 z_hci_parse_packet_cmd_ogf_le_controller_set_data_length:
 	//length
 	call p_ipc_rx_hci_data_two_byte
@@ -1534,27 +1544,87 @@
 	istore 8,contw
 	rtn
 
+org z
+z_hci_parse_packet_cmd_ogf_le_controller4:
+ 	fetch 1,mem_mesh_hci_opcode_ocf
+	beq HCI_LE_ENCRYPT,z_hci_parse_packet_cmd_ogf_le_controller_encryption		//17
+	beq HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY,z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_negative_reply	 //1b
+	
+	branch z_hci_parse_packet_cmd_ogf_le_controller5
+
 z_hci_parse_packet_cmd_ogf_le_controller_encryption:
-	arg mem_le_my_ltk,contw	//key
 	force 16,loopcnt
+	arg mem_le_my_ltk,contw
 	call p_ipc_rx_hci_data_n_byte
-	arg mem_le_plaintext_data,contw		//plaintext_data
 	force 16,loopcnt
+	arg mem_le_mrand,contw
 	call p_ipc_rx_hci_data_n_byte
+z_function_s1:
+	force regidx_data,regext_index
+	arg 4,loopcnt
+	arg mem_le_mrand,contr
+	call z_function_s1_loop
+	arg 4,loopcnt
+	arg mem_le_my_ltk,contr
+	call z_function_s1_loop
+	call do_aes_ecb_be
+	arg mem_le_encrypted_data,contw
+	call store_aes_result
+	arg 17,loopcnt
+	call p_hci_prepare_send_event_command_complete_with_status_success
+	arg 16,loopcnt
+	arg mem_le_encrypted_data,contr	
+	call memcpy_fast
+	branch ipc_hci_tx_start
+	
+z_function_s1_loop:
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	loop z_function_s1_loop
 	rtn
-//z_hci_parse_packet_cmd_ogf_le_controller_start_encryption:
-//	call p_ipc_rx_hci_data_two_byte		//handle
-//	store 1,mem_le_conn_handle
-//	store 1,mem_hci_conn_handle
-//	call p_ipc_rx_hci_data_eight_byte
-//	store 8,mem_le_random_number
-//	call p_ipc_rx_hci_data_two_byte
-//	store 2,mem_le_encrypted_diversifier
-//	arg mem_le_my_ltk,contw	//long_term_key
-//	force 16,loopcnt
-//	call p_ipc_rx_hci_data_n_byte
+	
+
+z_hci_parse_packet_cmd_ogf_le_controller_ltk_request_negative_reply:
+	call p_ipc_rx_hci_data_two_byte
+	store 1,mem_hci_conn_handle      //connect handle
+	arg 3,loopcnt
+	call p_hci_prepare_send_event_command_complete_with_status_success
+	fetch 1,mem_le_conn_handle
+	istore 2,contw
+	call ipc_hci_tx_start
+	jam 0,mem_ltk_exists
+	call le_send_enc_rsp	
+	branch le_ltk_lost
 
 org z
+z_hci_parse_packet_cmd_ogf_le_controller5:
+ 	fetch 1,mem_mesh_hci_opcode_ocf
+	beq HCI_LE_START_ENCRYPTION,z_hci_parse_packet_cmd_ogf_le_controller_start_encryption	//0x19
+	
+	branch p_hci_send_event_command_complete_error_command_nuknown
+	
+	
+z_hci_parse_packet_cmd_ogf_le_controller_start_encryption:
+	call p_ipc_rx_hci_data_two_byte
+	store 1,mem_hci_conn_handle      //connect handle
+	call p_ipc_rx_hci_data_eight_byte
+	store 8,mem_le_rand
+	call p_ipc_rx_hci_data_two_byte
+	store 2,mem_le_ediv
+	arg mem_le_ltk,contw
+	force 16,loopcnt
+	call p_ipc_rx_hci_data_n_byte
+	arg mem_le_skdm,contw
+	force 8, loopcnt
+	call generate_random_another
+	arg mem_le_ivm,contw
+	force 4, loopcnt
+	call generate_random_another
+	jam FLAG_LE_RCV_ENC_START,mem_le_enc_state
+	branch p_hci_send_event_command_status
+	
+org z
 z_hci_inquiry_reply_check_eir:
 	fetch 1,mem_inquiry_mode
 	bne 2,z_hci_inquiry_reply
@@ -3024,15 +3094,11 @@
 
 org z
 z_le_parse_ll_sub:
-//	fetch 2,mem_le_payload_ptr
-//	copy pdata,contr
-//	ifetch 1,contr
 	fetch 1,mem_le_rxbuf+2
 	beq LL_LENGTH_REQ,z_le_parse_length_request
 	beq LL_LENGTH_RSP,z_le_parse_length_rsp
 	beq LL_TERMINATE_IND,z_le_parse_terminate_ind
-	branch le_parse_ll+2
-
+	branch z_le_parse_ll_sub1
 
 z_le_parse_terminate_ind:
 	ifetch 1,contr
@@ -3095,6 +3161,78 @@
 	branch z_le_send_data_length
 
 org z
+z_le_parse_ll_sub1:
+	fetch 1,mem_le_rxbuf+2
+	beq LL_ENC_REQ,z_le_parse_enc_req
+	beq LL_START_ENC_RSP,z_le_parse_start_enc_rsp
+	
+	branch le_parse_ll+2
+
+// just do request,waiting for host ack or nak.
+z_le_parse_enc_req:
+	fetch 8,mem_le_features
+	rtnbit0 0		//if le encryption feature do not set 1,rtn
+	ifetch 8,contr
+	store 8,mem_le_rand
+	ifetch 2,contr
+	store 2,mem_le_ediv
+	ifetch 8,contr
+	store 8,mem_le_skdm
+	ifetch 4,contr
+	store 4,mem_le_ivm
+	branch z_le_parse_enc_req_send_le_ltk_request_event
+//	fetch 1,mem_le_pairing_state
+//	beq FLAG_LE_PAIRING_AFTER_AUTH,z_le_parse_enc_req_after_auth
+//	fetch 1,mem_ltk_exists
+//	beq 0,z_le_parse_enc_req_send_le_ltk_request_event	
+//le_parse_enc_req_ltk_exist:
+//z_le_parse_enc_req_after_auth:
+//	jam FLAG_LE_RCV_ENC_START,mem_le_enc_state
+//	call le_send_enc_rsp
+//	call  le_send_start_enc_req
+//	branch generate_sk
+
+z_le_parse_enc_req_send_le_ltk_request_event:
+	jam 13,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_LTK_REQUEST
+	istore 1,contw		//subevent code
+	fetch 1,mem_le_conn_handle
+	istore 2,contw
+	fetch 8,mem_le_rand
+	istore 8,contw
+	fetch 2,mem_le_ediv
+	istore 2,contw
+	branch ipc_hci_tx_start
+
+z_le_parse_start_enc_rsp:
+	branch z_hci_le_send_encryption_change_complete_event,master
+	jam BT_EVT_LE_START_ENC,mem_fifo_temp
+	call ui_ipc_send_event	
+	jam FLAG_LE_SEND_START_ENC_RSP,mem_le_enc_state
+	call le_send_start_enc_rsp
+	branch z_hci_le_send_encryption_change_complete_event
+
+// as the same as z_hci_send_encryption_change_complete_event
+z_hci_le_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
+	
+org z
 z_send_lmp_accepted:
 	force 2,pdata
 	call msg_send_lmp
@@ -3160,4 +3298,56 @@
 
 	loop z_charge_reset_bias
 	rtn	
+ifdef AES_S1_TEST
+org z
+z_sim_s1:
+	setarg 0x1123
+	store 4,mem_le_tk
+	setarg 0x667788
+	store 3,mem_le_srand
+	setarg 0x334455
+	istore 3,contw
+	setarg 0x1122
+	istore 2,contw
+	setarg 0xeeff00
+	store 3,mem_le_mrand
+	setarg 0xbbccdd
+	istore 3,contw
+	setarg 0x99aa
+	istore 2,contw
+	call function_s1
+	arg mem_le_ltk,contw
+	call store_aes_result
+	branch assert
 
+org z
+z_sim_s1_test:
+	call ice_break
+	force regidx_data,regext_index
+	call aes_clear
+	increase -4,regext_index
+	fetch 4,mem_le_srand
+	iforce regext
+	increase 4,regext_index
+	call aes_clear
+	increase -4,regext_index
+	arg mem_le_my_ltk,contr
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	call do_aes_ecb_be
+	
+	arg mem_le_my_ltk,contw
+	call store_aes_result
+	branch assert
+endif
+	
\ No newline at end of file
Index: ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvoptx
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvoptx	(revision 5410)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/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/ModuleDemo/25_OTA/bt_demo/CM0/Prj/MDK/yc11xx.uvprojx	(revision 5410)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/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/ModuleDemo/25_OTA/bt_demo/CM0/User/btreg.h	(revision 5413)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/User/btreg.h	(working copy)
@@ -1708,7 +1708,7 @@
 #define	mem_hci_packet_type                     	0x4ef4
 #define	mem_hci_read_remote_version_information_flag	0x4ef6
 #define	mem_mesh_classic_version                	0x4ef7
-#define	mem_le_plaintext_data                   	0x4efc
+#define	mem_le_encrypted_data                   	0x4efc
 #define	mem_headset_end                         	0x4f0c
 #define	mem_usb_mouse_data                      	0x4ace
 #define	mem_usb_kb_data                         	0x4ade
Index: ModuleDemo/25_OTA/bt_demo/CM0/User/main.c
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/User/main.c	(revision 5410)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/User/main.c	(working copy)
@@ -63,9 +63,9 @@
 #endif
 	h4_init();
 
-	sleep_500ms;
-	LPM_ENABLE;
-	POWER_OFF;
+//	sleep_500ms;
+//	LPM_ENABLE;
+//	POWER_OFF;
 	while (1)
 	{
 #ifdef FUNCTION_WATCH_DOG
@@ -86,7 +86,7 @@
 					DEBUG_POLLING_PRINT();
 					SYS_timerPolling();
 					
-					Bat_StateSwitchPooling();
+			//		Bat_StateSwitchPooling();
 
 					h4_polling_rx();
 				}
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/memmap.format
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/memmap.format	(revision 5413)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/memmap.format	(working copy)
@@ -1706,7 +1706,7 @@
 0x4ef4 mem_hci_packet_type
 0x4ef6 mem_hci_read_remote_version_information_flag
 0x4ef7 mem_mesh_classic_version
-0x4efc mem_le_plaintext_data
+0x4efc mem_le_encrypted_data
 0x4f0c mem_headset_end
 0x4ace mem_usb_mouse_data
 0x4ade mem_usb_kb_data
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/ramcode.rom
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/ramcode.rom	(revision 5413)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/ramcode.rom	(working copy)
@@ -1922,67 +1922,67 @@
 6fe24ca1
 c1808000
 202007c0
-58000330
-202006d8
-580002f0
+58000350
 202006d8
-58000300
+58000310
 202006d8
-58000280
+58000320
 202006d8
 580002a0
 202006d8
+580002c0
+202006d8
 58000110
 202006d8
-58000380
+580003a0
 202006d8
-58000340
+58000360
 202006d8
-58000220
+58000240
 202006d8
-580001e0
+58000200
 202006d8
-580003a0
+580003d0
 202006d8
-58000270
+58000290
 202006d8
-58000350
+58000370
 202006d8
-580001b0
+580001d0
 202006d8
-580002e0
+58000300
 202006d8
-580001c0
+580001e0
 202006d8
 58000140
 202006d8
-58000190
+580001b0
 202006d8
-58000310
+58000330
 202006d8
-58000320
+58000340
 202006d8
-58000200
+58000220
 202006d8
 58000160
 202006d8
-580001d0
+580001f0
 202006d8
-58000370
+58000390
 202006d8
-58000210
+58000230
 202006d8
-580002b0
+580002d0
 202006d8
-580002c0
+580002e0
 202006d8
-580002d0
+580002f0
 202006d8
-580003c0
+580003f0
 202006d8
-58000260
+58000280
 202006d8
-580003b0
+580003e0
 202006d8
 58000080
 202006d8
@@ -2020,21 +2020,27 @@
 202006d8
 58000050
 202006d8
-58000130
+58000190
 202006d8
-58000230
+580001a0
+202006d8
+58000130
 202006d8
 58000250
 202006d8
-58000240
+58000270
 202006d8
-58000290
+58000260
+202006d8
+580002b0
 202006d8
 58000170
 202006d8
-580001a0
+580001c0
 202006d8
-58000360
+58000380
 202006d8
-58000390
+580003b0
+202006d8
+580003c0
 202006d8
Index: ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom
===================================================================
--- /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom	(revision 5413)
+++ /YC1121E/SoftCode/1121EB/branch/HciDongle/ModuleDemo/25_OTA/bt_demo/CM0/respin/zcode.rom	(working copy)
@@ -192,10 +192,74 @@
 00000000
 20200040
 6fe204dd
+c0018005
+c003001c
+20204868
+6ff04ddf
+c4000000
+eff00006
+67f045bd
+efe40006
+67e445bb
+eff00006
+67f005e3
+efe80006
+67e8456b
+20200010
+704c880d
+704c873e
+20400347
+58000005
+e7e20005
+6fe20639
+e7e40005
+6ff045bd
+e7f00005
+6fe445bb
+e7e40005
+20200351
+20348022
+700f0d32
+20406b2e
+7045b504
+204048ca
+20200022
+704c8804
+704c8708
+20400347
+58000000
+e7e20005
+68420046
+e0440005
+58000001
+e7e20005
+20200351
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+20200040
+6fe204dd
 c00a0021
 c00a800d
 c0010006
-20204868
+202007fc
 efe20006
 67e206a4
 20204890
@@ -261,7 +325,7 @@
 c006002b
 c0008008
 c0004880
-202007f6
+202007fa
 efea0006
 67ea4528
 efe40006
@@ -451,9 +515,9 @@
 68420048
 20407a08
 6fe20048
-c28387f2
+c28387f6
 c0188021
-c00607f4
+c00607f8
 c0038030
 c005800b
 20204f6c
@@ -775,7 +839,7 @@
 67e4003e
 7855fc00
 704c8a00
-202007f0
+202007f4
 00000000
 00000000
 00000000
@@ -866,7 +930,7 @@
 24348023
 18808fff
 704c8a02
-202007f0
+202007f4
 00000000
 00000000
 00000000
@@ -1320,7 +1384,7 @@
 204057bf
 6fe24bce
 c301002c
-c28287ee
+c28287f2
 2040073a
 2040073a
 700f0d9f
@@ -1603,11 +1667,11 @@
 c006000a
 c00b8011
 c0058014
-c01987ea
+c01987ee
 c017001e
 c0208026
 c0098034
-202007ec
+202007f0
 da200040
 2040604d
 6fe80739
@@ -1674,7 +1738,7 @@
 c0040662
 c00101e4
 c013002a
-202007e8
+202007ec
 6fe20739
 67e206a3
 c0058011
@@ -1807,7 +1871,7 @@
 67e24c1a
 20400297
 67e24c1b
-202007e6
+202007ea
 20400288
 67e242a8
 20400034
@@ -2304,15 +2368,149 @@
 00000000
 20200040
 6fe24c18
-c0090006
-c011001b
-c00b802e
+c00c8004
 202002d5
+20400288
+67e242a8
+20400294
+67f045bd
+20400288
+67e445bb
+d8a04573
+18007210
+20400285
+d8a005e3
+18007208
+204052f8
+d8a0456b
+18007204
+204052f8
+7045b501
+202002e9
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+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
+c00b8005
+c00d8020
+202007e8
+18007210
+d8a00603
+20400285
+18007210
+d8a00613
+20400285
+18007000
+df200004
+d8c00613
+2040001b
+df200004
+d8c00603
+2040001b
+204061e6
+d8a04efc
+20406250
+df200011
+204002dd
+df200010
+d8c04efc
+2040712d
+20200351
+efe80006
+98005e00
+1f00f001
+c200001b
+20600000
+20400288
+67e242a8
+df200003
+204002dd
+6fe20639
+e7e40005
+20400351
+70458300
+204048b8
+202048ae
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+20200040
+6fe24c18
+c00c0007
+c009000c
+c00d0021
+c011002d
+202007e6
+df200009
+204002dd
+18007208
+204052f8
+20200351
 6fe24ded
 203a02d7
 20400291
 67ee4e0a
-2040000f
+20400015
 6fe24ded
 1fe0ffff
 67e24ded
@@ -2324,16 +2522,28 @@
 1a420c00
 efee0006
 e7ee0005
-c2000011
+c2000017
 58000000
 18a08bf9
 e7ee0005
 20600000
 20400288
+67e242a8
+d8a04573
+18007210
+20400285
+df200003
+204002dd
+6fe20639
+e7e40005
+20400351
+70458301
+202048aa
+20400288
 67e4495f
 20400288
 67e44961
-20400025
+20400037
 df200003
 204002dd
 6fe20639
@@ -2348,24 +2558,6 @@
 6ff0495b
 e7f00005
 20600000
-d8a00603
-18007210
-20400285
-d8a04efc
-18007210
-20400285
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
-00000000
 20200040
 704c8806
 704c8714
@@ -2816,17 +3008,13 @@
 00000000
 20200040
 6fe24c18
-c0050019
-c007001c
+c0050014
+c0070017
 c0098417
-c00b000e
-c00b8018
-c00c0018
-c00d0018
-c00d8018
-c0078021
-c0080026
-c008802a
+c00b000a
+c007801c
+c0080021
+c0088025
 202007d8
 20400288
 204002e9
@@ -2838,7 +3026,6 @@
 6ff04ddf
 e7f00005
 20600000
-202002d5
 20400297
 67e244de
 202002d9
@@ -2861,7 +3048,7 @@
 202282d7
 20400291
 67ee4e0a
-20400031
+2040002c
 202002d9
 6fe24ded
 d8a04dee
@@ -2878,6 +3065,11 @@
 00000000
 00000000
 00000000
+00000000
+00000000
+00000000
+00000000
+00000000
 20200040
 6fe24c18
 c0040008
@@ -3779,7 +3971,7 @@
 c0008007
 c0010017
 c0028019
-c0048025
+c004802a
 202007c2
 7920001c
 2040028b
@@ -3808,9 +4000,14 @@
 20400288
 20400297
 67e24ad0
+245a0026
 704c9b01
 7042a705
 202002e9
+6fe44deb
+79207e00
+67e44deb
+20600000
 6fe24ca1
 c00002ed
 c00102eb
@@ -3833,8 +4030,3 @@
 00000000
 00000000
 00000000
-00000000
-00000000
-00000000
-00000000
-00000000
