Index: output/eeprom.dat
===================================================================
--- /branch/usb/usb_public/output/eeprom.dat	(revision 274)
+++ /branch/usb/usb_public/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-62
+86
 03
 c2
 84
@@ -15,19 +15,19 @@
 c0
 0a
 80
-36
+3f
 c0
 1b
 00
-1c
+25
 c0
 5c
 80
-20
+29
 c0
 6a
 80
-31
+3a
 20
 20
 3a
@@ -39,31 +39,31 @@
 c0
 14
 00
-3c
+45
 c0
 1d
 00
-5f
+68
 c0
 1d
 80
-73
+7c
 c0
 1e
 80
-c0
+c9
 c0
 20
 80
-45
+4e
 c0
 22
 00
-b5
+be
 c0
 40
 00
-15
+1d
 20
 20
 3a
@@ -85,15 +85,51 @@
 3c
 49
 20
+40
+4d
+a6
+20
+40
+3a
+0e
+20
+40
+6a
+00
+20
+40
+00
+19
+20
 20
 38
-03
+07
+58
+00
+00
+00
+67
+e4
+00
+00
+e7
+e3
+00
+05
+20
+20
+3a
+c5
 20
 40
 52
 55
 70
 45
+16
+94
+70
+45
 10
 00
 20
@@ -119,7 +155,7 @@
 20
 40
 00
-1e
+27
 20
 20
 52
@@ -207,7 +243,7 @@
 c2
 80
 80
-34
+3d
 20
 20
 3d
@@ -403,7 +439,7 @@
 20
 40
 00
-6b
+74
 20
 40
 4a
@@ -471,19 +507,19 @@
 c0
 55
 00
-79
+82
 c0
 2a
 80
-83
+8c
 c0
 11
 00
-93
+9c
 c0
 7f
 80
-ab
+b4
 20
 60
 00
@@ -495,11 +531,11 @@
 c0
 00
 80
-7d
+86
 c0
 01
 00
-80
+89
 20
 60
 00
@@ -535,7 +571,7 @@
 20
 3a
 00
-89
+92
 6f
 e2
 45
@@ -559,11 +595,11 @@
 c0
 00
 80
-8d
+96
 c0
 01
 00
-90
+99
 20
 60
 00
@@ -599,7 +635,7 @@
 20
 3a
 00
-99
+a2
 6f
 e2
 45
@@ -623,11 +659,11 @@
 c0
 00
 80
-9d
+a6
 c0
 01
 00
-a4
+ad
 20
 60
 00
@@ -647,7 +683,7 @@
 c0
 01
 00
-a2
+ab
 20
 60
 00
@@ -675,7 +711,7 @@
 c0
 80
 00
-a9
+b2
 20
 60
 00
@@ -695,11 +731,11 @@
 c0
 00
 80
-af
+b8
 c0
 01
 00
-b2
+bb
 20
 60
 00
@@ -739,7 +775,7 @@
 20
 40
 00
-b9
+c2
 20
 20
 4b
@@ -779,7 +815,7 @@
 c0
 00
 80
-c5
+ce
 c0
 01
 4a
@@ -787,7 +823,7 @@
 c0
 7f
 80
-d6
+df
 20
 20
 4a
@@ -823,7 +859,7 @@
 c0
 00
 80
-ce
+d7
 20
 20
 4a
@@ -867,9 +903,9 @@
 20
 20
 00
-ab
-62
-00
+b4
+a3
+1d
 aa
 55
 40
@@ -981,7 +1017,7 @@
 00
 d6
 45
-0a
+06
 aa
 55
 06
@@ -1128,7 +1164,7 @@
 aa
 aa
 55
-83
+7f
 37
-78
-2c
+df
+21
Index: output/program.lis
===================================================================
--- /branch/usb/usb_public/output/program.lis	(revision 274)
+++ /branch/usb/usb_public/output/program.lis	(working copy)
@@ -2,21 +2,21 @@
               org 0x0000
 0000 c2840007 bbit1 8 ,pf_patch_ext 
 0001 c0000010 beq patch00_0 ,p_soft_reset 
-0002 c00a8036 beq patch02_5 ,p_set_freq_tx 
-0003 c01b001c beq patch06_6 ,p_dongle_usb_dispatch 
-0004 c05c8020 beq patch17_1 ,p_usb_init 
-0005 c06a8031 beq patch1a_5 ,p_le_enable_phy_by_pdata 
+0002 c00a803f beq patch02_5 ,p_set_freq_tx 
+0003 c01b0025 beq patch06_6 ,p_dongle_usb_dispatch 
+0004 c05c8029 beq patch17_1 ,p_usb_init 
+0005 c06a803a beq patch1a_5 ,p_le_enable_phy_by_pdata 
 0006 20203aba branch assert 
 
 pf_patch_ext:
 0007 c17f8000 rtneq patch3f_7 
-0008 c014003c beq patch25_0 ,p_g24_receive_skip_end 
-0009 c01d005f beq patch27_2 ,p_g24_bind_data_process 
-000a c01d8073 beq patch27_3 ,p_g24_bind_data_parse_next 
-000b c01e80c0 beq patch27_5 ,p_g24_receive_packet_start_next 
-000c c0208045 beq patch28_1 ,p_g24_mode_switch_bind_search 
-000d c02200b5 beq patch28_4 ,p_g24_search_mode_auto 
-000e c0400015 beq patch30_0 ,p_dongle_default_init 
+0008 c0140045 beq patch25_0 ,p_g24_receive_skip_end 
+0009 c01d0068 beq patch27_2 ,p_g24_bind_data_process 
+000a c01d807c beq patch27_3 ,p_g24_bind_data_parse_next 
+000b c01e80c9 beq patch27_5 ,p_g24_receive_packet_start_next 
+000c c020804e beq patch28_1 ,p_g24_mode_switch_bind_search 
+000d c02200be beq patch28_4 ,p_g24_search_mode_auto 
+000e c040001d beq patch30_0 ,p_dongle_default_init 
 000f 20203aba branch assert 
 
 p_soft_reset:
@@ -24,270 +24,281 @@
 0011 6fe240cc fetch 4 ,mem_lpm_ctrl3 
 0012 67f2004c store 4 ,core_lpm_reg 
 0013 20403c49 call lpm_write_ctrl3 
-0014 20203803 branch soft_reset + 2 
+0014 20404da6 call app_param_init 
+0015 20403a0e call initialize_radio 
+0016 20406a00 call iic_init_360khz 
+0017 20400019 call p_init_param 
+0018 20203807 branch soft_reset + 6 
+
+p_init_param:
+0019 58000000 setarg 0 
+001a 67e40000 store 8 ,mem_le_adv_transmit 
+001b e7e30005 istore 6 ,contw 
+001c 20203ac5 branch init_param + 2 
 
 p_dongle_default_init:
-0015 20405255 call dongle_default_init + 1 
-0016 70451000 jam off ,mem_24g_disable_fec1 
-0017 2040492b call g24_enable_1m 
-0018 6fe0c5ab fetch 1 ,mem_dg_sys_config 
-0019 c4000000 rtnbit0 dg_enable_new_revision 
-001a 70451001 jam on ,mem_24g_disable_fec1 
-001b 2020492e branch g24_enable_2m 
+001d 20405255 call dongle_default_init + 1 
+001e 70451694 jam tx_power_f20db ,mem_24g_pair_tx_power 
+001f 70451000 jam off ,mem_24g_disable_fec1 
+0020 2040492b call g24_enable_1m 
+0021 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+0022 c4000000 rtnbit0 dg_enable_new_revision 
+0023 70451001 jam on ,mem_24g_disable_fec1 
+0024 2020492e branch g24_enable_2m 
 
 p_dongle_usb_dispatch:
-001c 2040001e call p_wdt_kick 
-001d 202052ee branch dongle_usb_dispatch + 1 
+0025 20400027 call p_wdt_kick 
+0026 202052ee branch dongle_usb_dispatch + 1 
 
 p_wdt_kick:
-001e 58000010 setarg 16 
-001f 20206de1 branch wdt_init_config 
+0027 58000010 setarg 16 
+0028 20206de1 branch wdt_init_config 
 
 p_usb_init:
-0020 20406fd3 call enable_authrom 
-0021 204071a1 call usb_init_param 
-0022 70061003 jam 0x03 ,mem_devicedesc + 17 
-0023 708c0000 jam 0x00 ,core_usb_config 
-0024 20002710 nop 10000 
-0025 708c1800 jam 0x00 ,core_usb_trig 
-0026 6ff10050 fetch 2 ,core_clkoff 
-0027 793ffe0a set0 clock_off_usb ,pdata 
-0028 67f10050 store 2 ,core_clkoff 
-0029 708c1100 jam 0x0 ,core_usb_hmode 
-002a 708c003c jam 0x3c ,core_usb_config 
-002b 58000bb3 setarg mem_usb_rxbuf_new 
-002c 67f10c03 store 2 ,core_usb_rx_saddr 
-002d 67f10c07 store 2 ,core_usb_rxptr 
-002e 58000bf7 setarg mem_usb_rxbuf_new_end 
-002f 67f10c05 store 2 ,core_usb_rx_eaddr 
-0030 20207192 branch usb_init + 16 
+0029 20406fd3 call enable_authrom 
+002a 204071a1 call usb_init_param 
+002b 70061003 jam 0x03 ,mem_devicedesc + 17 
+002c 708c0000 jam 0x00 ,core_usb_config 
+002d 20002710 nop 10000 
+002e 708c1800 jam 0x00 ,core_usb_trig 
+002f 6ff10050 fetch 2 ,core_clkoff 
+0030 793ffe0a set0 clock_off_usb ,pdata 
+0031 67f10050 store 2 ,core_clkoff 
+0032 708c1100 jam 0x0 ,core_usb_hmode 
+0033 708c003c jam 0x3c ,core_usb_config 
+0034 58000bb3 setarg mem_usb_rxbuf_new 
+0035 67f10c03 store 2 ,core_usb_rx_saddr 
+0036 67f10c07 store 2 ,core_usb_rxptr 
+0037 58000bf7 setarg mem_usb_rxbuf_new_end 
+0038 67f10c05 store 2 ,core_usb_rx_eaddr 
+0039 20207192 branch usb_init + 16 
 
 p_le_enable_phy_by_pdata:
-0031 18427e00 copy temp ,pdata 
-0032 c2808034 bbit1 bit_le_2m_phy ,p_le_enable_2m 
-0033 20203d19 branch le_enable_phy_by_pdata + 3 
+003a 18427e00 copy temp ,pdata 
+003b c280803d bbit1 bit_le_2m_phy ,p_le_enable_2m 
+003c 20203d19 branch le_enable_phy_by_pdata + 3 
 
 p_le_enable_2m:
-0034 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
-0035 20203d1f branch le_enable_2m 
+003d 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+003e 20203d1f branch le_enable_2m 
 
 p_set_freq_tx:
-0036 708a3d12 jam 0x12 ,core_syn_top_ctrl 
-0037 60488008 storet 1 ,mem_last_freq 
-0038 1840a202 add temp ,2 ,rega 
-0039 2040398e call rf_tx_write_freq 
-003a 200003c0 nop 0x3c0 
-003b 202039cf branch txon 
+003f 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+0040 60488008 storet 1 ,mem_last_freq 
+0041 1840a202 add temp ,2 ,rega 
+0042 2040398e call rf_tx_write_freq 
+0043 200003c0 nop 0x3c0 
+0044 202039cf branch txon 
 
 p_g24_receive_skip_end:
-003c 6fe0c5ab fetch 1 ,mem_dg_sys_config 
-003d c300481c bbit0 dg_enable_new_revision ,g24_receive_skip_end 
-003e 2000012c nop 300 
-003f 6fe0c43e fetch 1 ,mem_24g_rxbuf + 1 
-0040 79207e00 set1 bit_ack_24g ,pdata 
-0041 67e0c43e store 1 ,mem_24g_rxbuf + 1 
-0042 20404a3b call g24_ackpayload_prep 
-0043 2040488f call g24_transmit_prep 
-0044 2020483f branch g24_transmit 
+0045 6fe0c5ab fetch 1 ,mem_dg_sys_config 
+0046 c300481c bbit0 dg_enable_new_revision ,g24_receive_skip_end 
+0047 2000012c nop 300 
+0048 6fe0c43e fetch 1 ,mem_24g_rxbuf + 1 
+0049 79207e00 set1 bit_ack_24g ,pdata 
+004a 67e0c43e store 1 ,mem_24g_rxbuf + 1 
+004b 20404a3b call g24_ackpayload_prep 
+004c 2040488f call g24_transmit_prep 
+004d 2020483f branch g24_transmit 
 
 p_g24_mode_switch_bind_search:
-0045 6fe0c559 fetch 1 ,mem_24g_work_mode 
-0046 c1000000 rtneq dongle_work 
-0047 6fe0c56d fetch 1 ,mem_24g_b_s_mode_switch_disable 
-0048 247a0000 nrtn blank 
-0049 6fe0c56b fetch 1 ,mem_24g_mode_b_s_switch_exit 
-004a 247a0000 nrtn blank 
-004b 6fe0c567 fetch 1 ,mem_24g_mode_b_s_switch 
-004c 207a0000 rtn blank 
-004d 6fe0c56e fetch 1 ,mem_24g_bind_device_living 
-004e 2fe00603 compare 3 ,pdata ,3 
-004f 2020cadc branch g24_mode_b_s_switch_exit ,true 
-0050 204048ef call g24_timer_check 
-0051 24740000 nrtn user 
-0052 6fe14569 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
-0053 1fe0fe01 increase 1 ,pdata 
-0054 67e14569 store 2 ,mem_24g_mode_b_s_switch_cnt 
-0055 d84007d0 arg 0x7d0 ,temp 
-0056 98467c00 isub temp ,null 
-0057 20214adc branch g24_mode_b_s_switch_exit ,positive 
-0058 6fe0c56c fetch 1 ,mem_24g_b_s_time_slice 
-0059 1fe0fe01 increase 1 ,pdata 
-005a 1fe17e01 and_into 1 ,pdata 
-005b 67e0c56c store 1 ,mem_24g_b_s_time_slice 
-005c c0004ba3 beq 0 ,g24_search_mode_enable 
-005d c000c99f beq 1 ,g24_bind_mode_enable 
-005e 20600000 rtn 
+004e 6fe0c559 fetch 1 ,mem_24g_work_mode 
+004f c1000000 rtneq dongle_work 
+0050 6fe0c56d fetch 1 ,mem_24g_b_s_mode_switch_disable 
+0051 247a0000 nrtn blank 
+0052 6fe0c56b fetch 1 ,mem_24g_mode_b_s_switch_exit 
+0053 247a0000 nrtn blank 
+0054 6fe0c567 fetch 1 ,mem_24g_mode_b_s_switch 
+0055 207a0000 rtn blank 
+0056 6fe0c56e fetch 1 ,mem_24g_bind_device_living 
+0057 2fe00603 compare 3 ,pdata ,3 
+0058 2020cadc branch g24_mode_b_s_switch_exit ,true 
+0059 204048ef call g24_timer_check 
+005a 24740000 nrtn user 
+005b 6fe14569 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+005c 1fe0fe01 increase 1 ,pdata 
+005d 67e14569 store 2 ,mem_24g_mode_b_s_switch_cnt 
+005e d84007d0 arg 0x7d0 ,temp 
+005f 98467c00 isub temp ,null 
+0060 20214adc branch g24_mode_b_s_switch_exit ,positive 
+0061 6fe0c56c fetch 1 ,mem_24g_b_s_time_slice 
+0062 1fe0fe01 increase 1 ,pdata 
+0063 1fe17e01 and_into 1 ,pdata 
+0064 67e0c56c store 1 ,mem_24g_b_s_time_slice 
+0065 c0004ba3 beq 0 ,g24_search_mode_enable 
+0066 c000c99f beq 1 ,g24_bind_mode_enable 
+0067 20600000 rtn 
 
 p_g24_bind_data_process:
-005f 20404a54 call g24_rx_interrupt_clear 
-0060 204047ce call g24_receive_packet 
-0061 2437ca54 nbranch g24_rx_interrupt_clear ,user3 
-0062 204049bf call g24_bind_data_parse 
-0063 2040006b call p_g24_bind_transmit_ack 
-0064 20404a2e call g24_bind_device_status_check 
-0065 204053c3 call dongle_kb_bind_soft_reset 
-0066 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
-0067 207a0000 rtn blank 
-0068 6fe2456f fetch 4 ,mem_24g_transmitter_addr 
-0069 207a0000 rtn blank 
-006a 202048e0 branch g24_update_addr_and_synccrc8 
+0068 20404a54 call g24_rx_interrupt_clear 
+0069 204047ce call g24_receive_packet 
+006a 2437ca54 nbranch g24_rx_interrupt_clear ,user3 
+006b 204049bf call g24_bind_data_parse 
+006c 20400074 call p_g24_bind_transmit_ack 
+006d 20404a2e call g24_bind_device_status_check 
+006e 204053c3 call dongle_kb_bind_soft_reset 
+006f 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+0070 207a0000 rtn blank 
+0071 6fe2456f fetch 4 ,mem_24g_transmitter_addr 
+0072 207a0000 rtn blank 
+0073 202048e0 branch g24_update_addr_and_synccrc8 
 
 p_g24_bind_transmit_ack:
-006b 6fe0c43d fetch 1 ,mem_24g_rxbuf 
-006c 67e0c4cf store 1 ,mem_24g_data_type 
-006d 204048be call g24_read_len_pid_crc 
-006e 20404a3b call g24_ackpayload_prep 
-006f 2437c837 nbranch g24_end_of_packet ,user3 
-0070 2040488f call g24_transmit_prep 
-0071 2040483f call g24_transmit 
-0072 20204837 branch g24_end_of_packet 
+0074 6fe0c43d fetch 1 ,mem_24g_rxbuf 
+0075 67e0c4cf store 1 ,mem_24g_data_type 
+0076 204048be call g24_read_len_pid_crc 
+0077 20404a3b call g24_ackpayload_prep 
+0078 2437c837 nbranch g24_end_of_packet ,user3 
+0079 2040488f call g24_transmit_prep 
+007a 2040483f call g24_transmit 
+007b 20204837 branch g24_end_of_packet 
 
 p_g24_bind_data_parse_next:
-0073 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
-0074 c0550079 beq datatype_bind ,p_g24_bind_first_step 
-0075 c02a8083 beq datatype_config ,p_g24_bind_second_step 
-0076 c0110093 beq datatype_ok ,p_g24_bind_third_step 
-0077 c07f80ab beq datatype_attemp ,p_g24_data_attemp 
-0078 20600000 rtn 
+007c 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
+007d c0550082 beq datatype_bind ,p_g24_bind_first_step 
+007e c02a808c beq datatype_config ,p_g24_bind_second_step 
+007f c011009c beq datatype_ok ,p_g24_bind_third_step 
+0080 c07f80b4 beq datatype_attemp ,p_g24_data_attemp 
+0081 20600000 rtn 
 
 p_g24_bind_first_step:
-0079 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
-007a c000807d beq datatype_device1 ,p_g24_bind_first_step_device1 
-007b c0010080 beq datatype_device2 ,p_g24_bind_first_step_device2 
-007c 20600000 rtn 
+0082 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+0083 c0008086 beq datatype_device1 ,p_g24_bind_first_step_device1 
+0084 c0010089 beq datatype_device2 ,p_g24_bind_first_step_device2 
+0085 20600000 rtn 
 
 p_g24_bind_first_step_device1:
-007d 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
-007e 247a0000 nrtn blank 
-007f 202049ce branch g24_bind_first_step_device1 
+0086 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+0087 247a0000 nrtn blank 
+0088 202049ce branch g24_bind_first_step_device1 
 
 p_g24_bind_first_step_device2:
-0080 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
-0081 247a0000 nrtn blank 
-0082 202049d4 branch g24_bind_first_step_device2 
+0089 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+008a 247a0000 nrtn blank 
+008b 202049d4 branch g24_bind_first_step_device2 
 
 p_g24_bind_second_step:
-0083 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
-0084 203a0089 branch p_g24_bind_second_step_skip ,blank 
-0085 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
-0086 684a4437 fetcht 4 ,mem_24g_lap 
-0087 98467c00 isub temp ,null 
-0088 24628000 nrtn zero 
+008c 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+008d 203a0092 branch p_g24_bind_second_step_skip ,blank 
+008e 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+008f 684a4437 fetcht 4 ,mem_24g_lap 
+0090 98467c00 isub temp ,null 
+0091 24628000 nrtn zero 
 
 p_g24_bind_second_step_skip:
-0089 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
-008a c000808d beq datatype_device1 ,p_g24_bind_second_step_device1 
-008b c0010090 beq datatype_device2 ,p_g24_bind_second_step_device2 
-008c 20600000 rtn 
+0092 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+0093 c0008096 beq datatype_device1 ,p_g24_bind_second_step_device1 
+0094 c0010099 beq datatype_device2 ,p_g24_bind_second_step_device2 
+0095 20600000 rtn 
 
 p_g24_bind_second_step_device1:
-008d 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
-008e 247a0000 nrtn blank 
-008f 202049e1 branch g24_bind_second_step_device1 
+0096 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+0097 247a0000 nrtn blank 
+0098 202049e1 branch g24_bind_second_step_device1 
 
 p_g24_bind_second_step_device2:
-0090 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
-0091 247a0000 nrtn blank 
-0092 202049ec branch g24_bind_second_step_device2 
+0099 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+009a 247a0000 nrtn blank 
+009b 202049ec branch g24_bind_second_step_device2 
 
 p_g24_bind_third_step:
-0093 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
-0094 203a0099 branch p_g24_bind_third_step_skip ,blank 
-0095 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
-0096 684a456f fetcht 4 ,mem_24g_transmitter_addr 
-0097 98467c00 isub temp ,null 
-0098 24628000 nrtn zero 
+009c 6fe0c4f4 fetch 1 ,mem_24g_pair_switch 
+009d 203a00a2 branch p_g24_bind_third_step_skip ,blank 
+009e 6fe2452f fetch 4 ,mem_24g_rxdata_temp + 4 
+009f 684a456f fetcht 4 ,mem_24g_transmitter_addr 
+00a0 98467c00 isub temp ,null 
+00a1 24628000 nrtn zero 
 
 p_g24_bind_third_step_skip:
-0099 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
-009a c000809d beq datatype_device1 ,p_g24_bind_third_step_device1 
-009b c00100a4 beq datatype_device2 ,p_g24_bind_third_step_device2 
-009c 20600000 rtn 
+00a2 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+00a3 c00080a6 beq datatype_device1 ,p_g24_bind_third_step_device1 
+00a4 c00100ad beq datatype_device2 ,p_g24_bind_third_step_device2 
+00a5 20600000 rtn 
 
 p_g24_bind_third_step_device1:
-009d 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
-009e 247a0000 nrtn blank 
-009f 6fe0c518 fetch 1 ,mem_24g_device1_bind_step 
-00a0 c00100a2 beq 2 ,p_g24_bind_dvc1_step_success 
-00a1 20600000 rtn 
+00a6 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+00a7 247a0000 nrtn blank 
+00a8 6fe0c518 fetch 1 ,mem_24g_device1_bind_step 
+00a9 c00100ab beq 2 ,p_g24_bind_dvc1_step_success 
+00aa 20600000 rtn 
 
 p_g24_bind_dvc1_step_success:
-00a2 7045d701 jam 1 ,mem_24g_device1_bind_disable 
-00a3 20204a02 branch g24_bind_dvc1_step_success + 1 
+00ab 7045d701 jam 1 ,mem_24g_device1_bind_disable 
+00ac 20204a02 branch g24_bind_dvc1_step_success + 1 
 
 p_g24_bind_third_step_device2:
-00a4 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
-00a5 247a0000 nrtn blank 
-00a6 6fe0c519 fetch 1 ,mem_24g_device2_bind_step 
-00a7 c08000a9 bne 0 ,p_g24_bind_dvc2_step_success 
-00a8 20600000 rtn 
+00ad 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+00ae 247a0000 nrtn blank 
+00af 6fe0c519 fetch 1 ,mem_24g_device2_bind_step 
+00b0 c08000b2 bne 0 ,p_g24_bind_dvc2_step_success 
+00b1 20600000 rtn 
 
 p_g24_bind_dvc2_step_success:
-00a9 7045d801 jam 1 ,mem_24g_device2_bind_disable 
-00aa 20204a0d branch g24_bind_dvc2_step_success + 1 
+00b2 7045d801 jam 1 ,mem_24g_device2_bind_disable 
+00b3 20204a0d branch g24_bind_dvc2_step_success + 1 
 
 p_g24_data_attemp:
-00ab 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
-00ac c00080af beq datatype_device1 ,p_g24_data_attemp_device1 
-00ad c00100b2 beq datatype_device2 ,p_g24_data_attemp_device2 
-00ae 20600000 rtn 
+00b4 6fe0c52e fetch 1 ,mem_24g_rxdata_temp + 3 
+00b5 c00080b8 beq datatype_device1 ,p_g24_data_attemp_device1 
+00b6 c00100bb beq datatype_device2 ,p_g24_data_attemp_device2 
+00b7 20600000 rtn 
 
 p_g24_data_attemp_device1:
-00af 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
-00b0 247a0000 nrtn blank 
-00b1 20204c24 branch g24_data_attemp_device1 
+00b8 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+00b9 247a0000 nrtn blank 
+00ba 20204c24 branch g24_data_attemp_device1 
 
 p_g24_data_attemp_device2:
-00b2 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
-00b3 247a0000 nrtn blank 
-00b4 20204c28 branch g24_data_attemp_device2 
+00bb 6fe0c5d8 fetch 1 ,mem_24g_device2_bind_disable 
+00bc 247a0000 nrtn blank 
+00bd 20204c28 branch g24_data_attemp_device2 
 
 p_g24_search_mode_auto:
-00b5 6fe0c559 fetch 1 ,mem_24g_work_mode 
-00b6 c1838000 rtnne dongle_search 
-00b7 204000b9 call p_g24_search_mode_init 
-00b8 20204b1b branch g24_search_mode_auto + 4 
+00be 6fe0c559 fetch 1 ,mem_24g_work_mode 
+00bf c1838000 rtnne dongle_search 
+00c0 204000c2 call p_g24_search_mode_init 
+00c1 20204b1b branch g24_search_mode_auto + 4 
 
 p_g24_search_mode_init:
-00b9 6fe0c558 fetch 1 ,mem_24g_mode_init 
-00ba c3838000 rtnbit1 dongle_search 
-00bb 79207e07 set1 dongle_search ,pdata 
-00bc 67e0c558 store 1 ,mem_24g_mode_init 
-00bd 6fe0c566 fetch 1 ,mem_tx_power_temp 
-00be 67e0c116 store 1 ,mem_tx_power 
-00bf 20204b0b branch g24_search_mode_init + 4 
+00c2 6fe0c558 fetch 1 ,mem_24g_mode_init 
+00c3 c3838000 rtnbit1 dongle_search 
+00c4 79207e07 set1 dongle_search ,pdata 
+00c5 67e0c558 store 1 ,mem_24g_mode_init 
+00c6 6fe0c566 fetch 1 ,mem_tx_power_temp 
+00c7 67e0c116 store 1 ,mem_tx_power 
+00c8 20204b0b branch g24_search_mode_init + 4 
 
 p_g24_receive_packet_start_next:
-00c0 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
-00c1 c00080c5 beq datatype_device1 ,p_g24_data_device1 
-00c2 c0014a69 beq datatype_device2 ,g24_data_device2 
-00c3 c07f80d6 beq datatype_attemp ,p_g24_data_receive_attemp 
-00c4 20204a54 branch g24_rx_interrupt_clear 
+00c9 6fe0c52d fetch 1 ,mem_24g_rxdata_temp + 2 
+00ca c00080ce beq datatype_device1 ,p_g24_data_device1 
+00cb c0014a69 beq datatype_device2 ,g24_data_device2 
+00cc c07f80df beq datatype_attemp ,p_g24_data_receive_attemp 
+00cd 20204a54 branch g24_rx_interrupt_clear 
 
 p_g24_data_device1:
-00c5 20404a22 call g24_binding_dvc1_living 
-00c6 20404bbd call g24_ch_timer_reinit 
-00c7 6fe0c54d fetch 1 ,mem_24g_abort_packet 
-00c8 6848c52b fetcht 1 ,mem_24g_rxdata_temp 
-00c9 284ffe03 isolate1 bit_abort ,temp 
-00ca 7920fe00 setflag true ,0 ,pdata 
-00cb 67e0c54d store 1 ,mem_24g_abort_packet 
-00cc c00080ce beq 1 ,p_g24_data_attemp_device1_abort 
-00cd 20204a62 branch g24_data_device1 + 8 
+00ce 20404a22 call g24_binding_dvc1_living 
+00cf 20404bbd call g24_ch_timer_reinit 
+00d0 6fe0c54d fetch 1 ,mem_24g_abort_packet 
+00d1 6848c52b fetcht 1 ,mem_24g_rxdata_temp 
+00d2 284ffe03 isolate1 bit_abort ,temp 
+00d3 7920fe00 setflag true ,0 ,pdata 
+00d4 67e0c54d store 1 ,mem_24g_abort_packet 
+00d5 c00080d7 beq 1 ,p_g24_data_attemp_device1_abort 
+00d6 20204a62 branch g24_data_device1 + 8 
 
 p_g24_data_attemp_device1_abort:
-00ce 6fe0c095 fetch 1 ,mem_device_option 
-00cf 1fe67c0e sub pdata ,dvc_op_car ,null 
-00d0 2042cf01 call car_stop_blink ,zero 
-00d1 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
-00d2 247a0000 nrtn blank 
-00d3 7045d701 jam 1 ,mem_24g_device1_bind_disable 
-00d4 6fe24535 fetch 4 ,mem_24g_rxdata_temp + 10 
-00d5 20204c26 branch g24_store_device1_addr 
+00d7 6fe0c095 fetch 1 ,mem_device_option 
+00d8 1fe67c0e sub pdata ,dvc_op_car ,null 
+00d9 2042cf01 call car_stop_blink ,zero 
+00da 6fe0c5d7 fetch 1 ,mem_24g_device1_bind_disable 
+00db 247a0000 nrtn blank 
+00dc 7045d701 jam 1 ,mem_24g_device1_bind_disable 
+00dd 6fe24535 fetch 4 ,mem_24g_rxdata_temp + 10 
+00de 20204c26 branch g24_store_device1_addr 
 
 p_g24_data_receive_attemp:
-00d6 20404a30 call g24_bind_device_status 
-00d7 202000ab branch p_g24_data_attemp 
+00df 20404a30 call g24_bind_device_status 
+00e0 202000b4 branch p_g24_data_attemp 
               org 0x3800
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/usb/usb_public/program/patch.prog	(revision 274)
+++ /branch/usb/usb_public/program/patch.prog	(working copy)
@@ -26,14 +26,24 @@
 	fetch 4,mem_lpm_ctrl3
 	store 4,core_lpm_reg
 	call lpm_write_ctrl3
-	branch soft_reset+2
-
+	call app_param_init
+	call initialize_radio
+	call iic_init_360khz
+	call p_init_param
+	branch soft_reset+6
+
+p_init_param:
+	setarg 0 
+	store 8,mem_le_adv_transmit
+	istore 6,contw
+	branch init_param+2
 
 p_dongle_default_init:
 ifdef UART_LOG
 	call p_device_hardware_init
 endif
 	call dongle_default_init+1
+	jam TX_POWER_F20DB,mem_24g_pair_tx_power
 	jam OFF,mem_24g_disable_fec1
 	call g24_enable_1M
 	fetch 1,mem_dg_sys_config
Index: sched/dongle.dat
===================================================================
--- /branch/usb/usb_public/sched/dongle.dat	(revision 274)
+++ /branch/usb/usb_public/sched/dongle.dat	(working copy)
@@ -16,7 +16,7 @@
 mem_dg_sys_config:01  #24M
 
 #work mode rf tx power
-mem_dg_24g_tx_power_default:0a	#10dBm
+mem_dg_24g_tx_power_default:06	#10dBm
 
 #usb config
 #mem_dg_usb_vid_pid:
