Index: do.bat
===================================================================
--- /branch/mouse_project/1066/1066_OTP_FLASH/do.bat	(revision 2055)
+++ /branch/mouse_project/1066/1066_OTP_FLASH/do.bat	(working copy)
@@ -43,13 +43,17 @@
 
 geneep -n ramcode.rom sched.rom 0 %enckey% c
 
- rem geneep -n -k key.txt
-
 cd ..\output
+copy eeprom.dat ..\util\eeprom2.dat
+cd ..\util
+call skip_load_eeprom.bat 
+copy eeprom.dat ..\output\eeprom.dat
+del eeprom.dat
+del eeprom2.dat
 
+cd ..\output
 echo eeprom.dat Generated......
 
-
 echo **********define info*************
 cd ..\program
 perl ..\util\define_info.pl
@@ -60,6 +64,7 @@
 echo **********************************
 echo EEPROM Generated.
 echo The Device is %device_option%. 
+echo Enable otp_uflag_skip_eep
 echo **********************************
 goto end
 
Index: format/bt.format
===================================================================
--- /branch/mouse_project/1066/1066_OTP_FLASH/format/bt.format	(revision 2055)
+++ /branch/mouse_project/1066/1066_OTP_FLASH/format/bt.format	(working copy)
@@ -1025,4 +1025,8 @@
 7 UART_WAKEUP_RX
 )
 
+(
+0x000a06 param_le_version
+0x1d87 param_le_subversion
+)
 
Index: output/eeprom.dat
===================================================================
--- /branch/mouse_project/1066/1066_OTP_FLASH/output/eeprom.dat	(revision 2055)
+++ /branch/mouse_project/1066/1066_OTP_FLASH/output/eeprom.dat	(working copy)
@@ -1,9 +1,37 @@
-00
+40
 02
 aa
 55
-5e
+96
+00
+c2
+84
+00
+04
+c0
+00
 00
+05
+c0
+50
+80
+0b
+20
+20
+2a
+8e
+20
+20
+2a
+8e
+20
+80
+00
+00
+20
+40
+64
+0d
 68
 10
 81
@@ -12,6 +40,34 @@
 00
 c2
 41
+20
+40
+29
+6c
+20
+20
+20
+06
+58
+00
+0a
+06
+60
+01
+c5
+10
+58
+00
+1d
+87
+60
+01
+45
+13
+20
+40
+2a
+a2
 58
 00
 00
@@ -23,7 +79,7 @@
 20
 40
 00
-0d
+1b
 20
 00
 00
@@ -96,15 +152,22 @@
 60
 00
 00
-bf
-b9
+90
+4b
 aa
 55
 01
 00
-11
+00
 40
-04
+01
+aa
+55
+01
+00
+14
+40
+02
 aa
 55
 03
@@ -129,5 +192,5 @@
 40
 e1
 41
-49
-d2
+6e
+95
Index: output/program.lis
===================================================================
--- /branch/mouse_project/1066/1066_OTP_FLASH/output/program.lis	(revision 2055)
+++ /branch/mouse_project/1066/1066_OTP_FLASH/output/program.lis	(working copy)
@@ -1,30 +1,54 @@
 include "bt_format "
 org 0x0000
-0000 6810813b hfetch 1 ,0x813b 
-0001 6000c241 store 1 ,mem_power_on_flag 
-0002 58000000 setarg 0x0 
-0003 600181f6 store 3 ,mem_addr_hi 
-0004 2040000d call spid_b_init_flash 
-0005 20000064 nop 100 
-0006 2040650b call spid_unlock_flash 
-0007 d84000ab arg 0xab ,temp 
-0008 20406556 call spid_write_flash_common 
-0009 20000064 nop 100 
-000a da606578 arg spid_load_flash ,regc 
-000b 20406429 call read_first_block 
-000c 2020643c branch load_storage 
+
+p_patch_array:
+0000 c2840004 bbit1 8 ,pf_patch_ext 
+0001 c0000005 beq patch00_0 ,p_soft_reset 
+0002 c050800b beq patch14_1 ,p_init_param 
+0003 20202a8e branch loop 
+
+pf_patch_ext:
+0004 20202a8e branch loop 
+
+p_soft_reset:
+0005 20800000 clear_stack 
+0006 2040640d call spi_ncs_gpio_init 
+0007 6810813b hfetch 1 ,0x813b 
+0008 6000c241 store 1 ,mem_power_on_flag 
+0009 2040296c call initialize_radio 
+000a 20202006 branch soft_reset + 5 
+
+p_init_param:
+000b 58000a06 setarg param_le_version 
+000c 6001c510 store 3 ,mem_lmp_version 
+000d 58001d87 setarg param_le_subversion 
+000e 60014513 store 2 ,mem_lmp_version + 3 
+000f 20402aa2 call init_param + 12 
+
+p_flash_wakeup:
+0010 58000000 setarg 0x0 
+0011 600181f6 store 3 ,mem_addr_hi 
+0012 2040001b call spid_b_init_flash 
+0013 20000064 nop 100 
+0014 2040650b call spid_unlock_flash 
+0015 d84000ab arg 0xab ,temp 
+0016 20406556 call spid_write_flash_common 
+0017 20000064 nop 100 
+0018 da606578 arg spid_load_flash ,regc 
+0019 20406429 call read_first_block 
+001a 2020643c branch load_storage 
 
 spid_b_init_flash:
-000d 70808640 hjam 0x40 ,core_spid_ctrl 
-000e 70808700 hjam 0x0 ,core_spid_delay 
-000f 68108081 hfetch 1 ,core_gpio_sel1 
-0010 793ffe00 set0 0 ,pdata 
-0011 793ffe01 set0 1 ,pdata 
-0012 79207e03 set1 3 ,pdata 
-0013 60108081 hstore 1 ,core_gpio_sel1 
-0014 58000000 setarg 0 
-0015 600201f5 store 4 ,mem_spid_tbuf 
-0016 20600000 rtn 
+001b 70808640 hjam 0x40 ,core_spid_ctrl 
+001c 70808700 hjam 0x0 ,core_spid_delay 
+001d 68108081 hfetch 1 ,core_gpio_sel1 
+001e 793ffe00 set0 0 ,pdata 
+001f 793ffe01 set0 1 ,pdata 
+0020 79207e03 set1 3 ,pdata 
+0021 60108081 hstore 1 ,core_gpio_sel1 
+0022 58000000 setarg 0 
+0023 600201f5 store 4 ,mem_spid_tbuf 
+0024 20600000 rtn 
 org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/mouse_project/1066/1066_OTP_FLASH/program/patch.prog	(revision 2055)
+++ /branch/mouse_project/1066/1066_OTP_FLASH/program/patch.prog	(working copy)
@@ -1,11 +1,29 @@
 
 ifdef PATCH
-
+p_patch_array:
+	bbit1 8,pf_patch_ext
+	beq patch00_0,p_soft_reset
+	beq patch14_1,p_init_param
+	branch loop
+pf_patch_ext:
+	branch loop
+
+p_soft_reset:
+	clear_stack
+	call spi_ncs_gpio_init  // 0xff disable spi ncs gpio init
 	hfetch 1,0x813b
 	store 1,mem_power_on_flag
-
-//	call initialize_radio_cont+1
-
+	call initialize_radio
+//	call iicd_init_12m
+	branch soft_reset+5
+
+p_init_param:
+	setarg param_le_version
+	store 3,mem_lmp_version
+	setarg param_le_subversion
+	store 2,mem_lmp_version+3
+	call init_param+12
+p_flash_wakeup:
 	setarg 0x0
 	store 3,mem_addr_hi
 	call spid_b_init_flash
Index: sched/hci_boot.dat
===================================================================
--- /branch/mouse_project/1066/1066_OTP_FLASH/sched/hci_boot.dat	(revision 2055)
+++ /branch/mouse_project/1066/1066_OTP_FLASH/sched/hci_boot.dat	(working copy)
@@ -1,5 +1,5 @@
-
-mem_patch11:04
+mem_patch00:01
+mem_patch14:02
 mem_lpm_config:8f 10 ce
 mem_rf_init_data:
 ff
