Index: format/app_dongle.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/format/app_dongle.format	(revision 1063)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/format/app_dongle.format	(working copy)
@@ -33,6 +33,7 @@
 
 //patch
 1 mem_24g_pair_tx_power_init
+1 mem_dg_bind_disable
 )
 
 
Index: format/bt.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/format/bt.format	(revision 1063)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/format/bt.format	(working copy)
@@ -587,6 +587,7 @@
 
 1 USB_TIMER_NAK
 15 USB_TIMER_WAKEUP
+3 G24_MODE_BIND_ENALE_TIMER
 )
 
 (
Index: output/eeprom.dat
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/eeprom.dat	(revision 1063)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/eeprom.dat	(working copy)
@@ -2,48 +2,52 @@
 02
 aa
 55
-36
+a2
 04
 c2
 84
 00
-0b
+0c
 c0
 00
 00
-2d
+2e
 c0
 0b
 80
-4a
+4d
 c0
 0c
 00
-12
+13
 c0
 17
 80
-45
+48
 c0
 18
 00
-36
+37
 c0
 18
 80
-32
+33
+c0
+38
+00
+70
 c0
 61
 80
-6d
+88
 c0
 65
 80
-a0
+bb
 c0
 67
 80
-7f
+9a
 20
 20
 3a
@@ -55,23 +59,23 @@
 c0
 23
 80
-d4
+ef
 c0
 24
 80
-da
+f5
 c0
 26
 80
-b7
+d2
 c0
 27
 80
-3a
+3b
 c0
 28
 00
-ac
+c7
 20
 20
 3a
@@ -147,7 +151,7 @@
 c0
 84
 00
-25
+26
 70
 8a
 08
@@ -171,7 +175,7 @@
 20
 40
 00
-52
+55
 70
 8a
 9a
@@ -244,10 +248,18 @@
 80
 80
 00
+6f
+e0
+c5
+e1
+24
+3a
+4a
+e9
 20
 40
 00
-3e
+41
 20
 20
 4a
@@ -307,11 +319,11 @@
 c0
 01
 80
-57
+5a
 c0
 03
 00
-59
+5c
 c0
 05
 3a
@@ -327,7 +339,7 @@
 c0
 55
 80
-67
+6a
 c0
 55
 3a
@@ -359,7 +371,7 @@
 20
 20
 00
-53
+56
 70
 8a
 3b
@@ -375,7 +387,7 @@
 20
 20
 00
-55
+58
 70
 8a
 39
@@ -415,35 +427,131 @@
 20
 20
 00
-5f
+62
 70
 8a
 39
-82
+43
 70
 8a
 3a
-01
+00
 20
 20
-00
-5f
+39
+ef
 70
 8a
 39
-81
+42
 70
 8a
 3a
-01
+00
+20
+20
+39
+ef
+58
+00
+00
+73
+67
+e1
+45
+2b
+20
+20
+50
+ba
+6f
+e0
+c5
+5b
+c0
+00
+00
+76
+20
+20
+50
+cd
+20
+40
+00
+81
+d8
+e0
+00
+03
 20
+40
+74
+2e
 20
+5a
+00
+86
+20
+40
+4a
+7f
+20
+40
+4a
+a5
+20
+40
+51
+83
+20
+40
+4a
+df
+20
+40
+4a
+fc
+20
+40
+51
+3f
+20
+20
+00
+77
+70
+45
+e1
 00
-5f
 58
 00
+bb
+80
+d8
+e0
+00
+03
+20
+40
+74
+20
+20
+20
+4a
+7a
+70
+45
+e1
+01
+20
+60
+00
 00
-f9
+58
+00
+01
+14
 67
 e1
 45
@@ -567,7 +675,7 @@
 20
 40
 00
-8e
+a9
 20
 20
 73
@@ -611,7 +719,7 @@
 c0
 10
 00
-9b
+b6
 c0
 10
 f3
@@ -659,7 +767,7 @@
 c0
 11
 00
-a5
+c0
 20
 20
 71
@@ -671,7 +779,7 @@
 c0
 00
 00
-aa
+c5
 c0
 00
 f1
@@ -703,7 +811,7 @@
 20
 40
 00
-b0
+cb
 20
 20
 4b
@@ -870,8 +978,8 @@
 d4
 c0
 7f
-80
-ef
+81
+0a
 20
 60
 00
@@ -883,15 +991,15 @@
 c0
 00
 80
-df
+fa
 c0
 01
 4a
 4e
 c0
 7f
-80
-ed
+81
+08
 20
 20
 4a
@@ -926,8 +1034,8 @@
 55
 c0
 00
-80
-e8
+81
+03
 20
 20
 4a
@@ -958,20 +1066,20 @@
 16
 20
 20
-00
-ef
+01
+0a
 6f
 e0
 c5
 36
 c0
 00
-80
-f3
+81
+0e
 c0
 01
-00
-f6
+01
+11
 20
 60
 00
@@ -1006,12 +1114,12 @@
 d4
 c0
 00
-80
-fc
+81
+17
 c0
 01
-00
-ff
+01
+1a
 6f
 e0
 c5
@@ -1023,7 +1131,7 @@
 20
 20
 01
-01
+1c
 6f
 e0
 c5
@@ -1039,11 +1147,11 @@
 c0
 00
 81
-05
+20
 c0
 01
 81
-09
+24
 20
 60
 00
@@ -1071,17 +1179,17 @@
 c0
 00
 81
-05
+20
 c0
 7f
 81
-05
+20
 20
 20
 51
 af
-04
-00
+76
+83
 aa
 55
 40
@@ -1102,7 +1210,7 @@
 00
 00
 00
-00
+01
 00
 00
 00
@@ -1387,7 +1495,7 @@
 aa
 aa
 55
-42
+43
 48
-e4
-2d
+94
+66
Index: output/memmap.format
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/memmap.format	(revision 1063)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/memmap.format	(working copy)
@@ -1325,6 +1325,7 @@
 0x45de mem_dg_usb_device_iserial_number
 0x45df mem_dg_24g_tx_power_default
 0x45e0 mem_24g_pair_tx_power_init
+0x45e1 mem_dg_bind_disable
 0x451e mem_rssi_hex_received
 0x451f mem_24g_pair_sm
 0x4520 mem_24g_pair_no_ack
Index: output/program.lis
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/output/program.lis	(revision 1063)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/output/program.lis	(working copy)
@@ -1,356 +1,395 @@
               include "bt_format "
               org 0x0000
-0000 c284000b bbit1 8 ,pf_patch_ext 
-0001 c000002d beq patch00_0 ,p_soft_reset 
-0002 c00b804a beq patch02_7 ,p_txon_next 
-0003 c00c0012 beq patch03_0 ,p_initialize_radio_cont 
-0004 c0178045 beq patch05_7 ,p_dongle_default_init 
-0005 c0180036 beq patch06_0 ,p_dongle_read_kb_bind_status 
-0006 c0188032 beq patch06_1 ,p_dongle_write_kb_bind_status 
-0007 c061806d beq patch18_3 ,p_usb_init 
-0008 c06580a0 beq patch19_3 ,p_usb0_request_get_descriptor 
-0009 c067807f beq patch19_7 ,p_usb_tx 
-000a 20203a8a branch assert 
+0000 c284000c bbit1 8 ,pf_patch_ext 
+0001 c000002e beq patch00_0 ,p_soft_reset 
+0002 c00b804d beq patch02_7 ,p_txon_next 
+0003 c00c0013 beq patch03_0 ,p_initialize_radio_cont 
+0004 c0178048 beq patch05_7 ,p_dongle_default_init 
+0005 c0180037 beq patch06_0 ,p_dongle_read_kb_bind_status 
+0006 c0188033 beq patch06_1 ,p_dongle_write_kb_bind_status 
+0007 c0380070 beq patch0e_0 ,p_dongle_init 
+0008 c0618088 beq patch18_3 ,p_usb_init 
+0009 c06580bb beq patch19_3 ,p_usb0_request_get_descriptor 
+000a c067809a beq patch19_7 ,p_usb_tx 
+000b 20203a8a branch assert 
 
 pf_patch_ext:
-000b c17f8000 rtneq patch3f_7 
-000c c02380d4 beq patch28_7 ,p_g24_bind_data_parse_next 
-000d c02480da beq patch29_1 ,p_g24_receive_packet_start_next 
-000e c02680b7 beq patch29_5 ,p_g24_mode_switch_bind_search 
-000f c027803a beq patch29_7 ,p_g24_bind_mode_auto 
-0010 c02800ac beq patch2a_0 ,p_g24_search_mode_auto 
-0011 20203a8a branch assert 
+000c c17f8000 rtneq patch3f_7 
+000d c02380ef beq patch28_7 ,p_g24_bind_data_parse_next 
+000e c02480f5 beq patch29_1 ,p_g24_receive_packet_start_next 
+000f c02680d2 beq patch29_5 ,p_g24_mode_switch_bind_search 
+0010 c027803b beq patch29_7 ,p_g24_bind_mode_auto 
+0011 c02800c7 beq patch2a_0 ,p_g24_search_mode_auto 
+0012 20203a8a branch assert 
 
 p_initialize_radio_cont:
-0012 708a7503 jam 0x03 ,core_rx_lna_cfg3 
-0013 708a8500 jam 0 ,core_syn_loopdiv_dsm_cfg 
-0014 70896f10 jam 0x10 ,0x896f 
-0015 6fe0c3ef fetch 1 ,mem_wdt_always_work 
-0016 205a6d31 call wdt_set_disable ,blank 
-0017 708a0305 jam 0x05 ,core_clkpll_cfg0 
-0018 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
-0019 20403a44 call initialize_rc_cal 
-001a 20403a3f call initialize_rf_ldo_cfg1 
-001b 20403a3a call initialize_syn_afc_cfg1 
-001c 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
-001d 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
-001e 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
-001f 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
-0020 70896876 jam 0x76 ,core_agc_wb_sat_th 
-0021 70896976 jam 0x76 ,core_agc_nb_sat_th 
-0022 6fe0c09a fetch 1 ,mem_fcomp_div 
-0023 c0840025 bne xtal_16m ,p_initialize_radio_cont_next 
-0024 708a0834 jam 0x34 ,core_clkpll_cfg5 
+0013 708a7503 jam 0x03 ,core_rx_lna_cfg3 
+0014 708a8500 jam 0 ,core_syn_loopdiv_dsm_cfg 
+0015 70896f10 jam 0x10 ,0x896f 
+0016 6fe0c3ef fetch 1 ,mem_wdt_always_work 
+0017 205a6d31 call wdt_set_disable ,blank 
+0018 708a0305 jam 0x05 ,core_clkpll_cfg0 
+0019 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+001a 20403a44 call initialize_rc_cal 
+001b 20403a3f call initialize_rf_ldo_cfg1 
+001c 20403a3a call initialize_syn_afc_cfg1 
+001d 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+001e 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+001f 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+0020 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+0021 70896876 jam 0x76 ,core_agc_wb_sat_th 
+0022 70896976 jam 0x76 ,core_agc_nb_sat_th 
+0023 6fe0c09a fetch 1 ,mem_fcomp_div 
+0024 c0840026 bne xtal_16m ,p_initialize_radio_cont_next 
+0025 708a0834 jam 0x34 ,core_clkpll_cfg5 
 
 p_initialize_radio_cont_next:
-0025 708a01ff jam 0xff ,core_clkpll_ctrl1 
-0026 20000064 nop 100 
-0027 708a020e jam 0x0e ,core_clkpll_ctrl2 
-0028 708a0003 jam 0x03 ,core_clkpll_ctrl0 
-0029 20400052 call p_set_tx_power_0db 
-002a 708a9a28 jam 0x28 ,core_tx_mixer_cfg1 
-002b 708a9b3f jam 0x3f ,core_tx_mixer_cfg2 
-002c 20203a35 branch initialize_radio_cont_next_2 
+0026 708a01ff jam 0xff ,core_clkpll_ctrl1 
+0027 20000064 nop 100 
+0028 708a020e jam 0x0e ,core_clkpll_ctrl2 
+0029 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+002a 20400055 call p_set_tx_power_0db 
+002b 708a9a28 jam 0x28 ,core_tx_mixer_cfg1 
+002c 708a9b3f jam 0x3f ,core_tx_mixer_cfg2 
+002d 20203a35 branch initialize_radio_cont_next_2 
 
 p_soft_reset:
-002d 20800000 clear_stack 
-002e 6fe240cc fetch 4 ,mem_lpm_ctrl3 
-002f 67f2004c store 4 ,core_lpm_reg 
-0030 20403c16 call lpm_write_ctrl3 
-0031 20203803 branch soft_reset + 2 
+002e 20800000 clear_stack 
+002f 6fe240cc fetch 4 ,mem_lpm_ctrl3 
+0030 67f2004c store 4 ,core_lpm_reg 
+0031 20403c16 call lpm_write_ctrl3 
+0032 20203803 branch soft_reset + 2 
 
 p_dongle_write_kb_bind_status:
-0032 df200001 arg 1 ,loopcnt 
-0033 da204593 arg mem_dg_kb_bind_flag ,rega 
-0034 dfe00fcd arg dongle_kb_bind_otp_offect ,pdata 
-0035 20206883 branch otp_write 
+0033 df200001 arg 1 ,loopcnt 
+0034 da204593 arg mem_dg_kb_bind_flag ,rega 
+0035 dfe00fcd arg dongle_kb_bind_otp_offect ,pdata 
+0036 20206883 branch otp_write 
 
 p_dongle_read_kb_bind_status:
-0036 58000fcd setarg dongle_kb_bind_otp_offect 
-0037 da204593 arg mem_dg_kb_bind_flag ,rega 
-0038 d8400001 arg 1 ,temp 
-0039 202068c5 branch otpd_read_data_with_pwr_operation 
+0037 58000fcd setarg dongle_kb_bind_otp_offect 
+0038 da204593 arg mem_dg_kb_bind_flag ,rega 
+0039 d8400001 arg 1 ,temp 
+003a 202068c5 branch otpd_read_data_with_pwr_operation 
 
 p_g24_bind_mode_auto:
-003a 6fe0c561 fetch 1 ,mem_24g_work_mode 
-003b c1808000 rtnne dongle_bind 
-003c 2040003e call p_g24_bind_init 
-003d 20204ae3 branch g24_bind_mode_auto + 4 
+003b 6fe0c561 fetch 1 ,mem_24g_work_mode 
+003c c1808000 rtnne dongle_bind 
+003d 6fe0c5e1 fetch 1 ,mem_dg_bind_disable 
+003e 243a4ae9 nbranch g24_bind_mode_auto + 10 ,blank 
+003f 20400041 call p_g24_bind_init 
+0040 20204ae3 branch g24_bind_mode_auto + 4 
 
 p_g24_bind_init:
-003e 6fe0c560 fetch 1 ,mem_24g_mode_init 
-003f c3808000 rtnbit1 dongle_bind 
-0040 79207e01 set1 dongle_bind ,pdata 
-0041 67e0c560 store 1 ,mem_24g_mode_init 
-0042 58000000 setarg 0 
-0043 67e1c51e store 3 ,mem_24g_device1_bind_step 
-0044 20204980 branch g24_bind_init + 8 
+0041 6fe0c560 fetch 1 ,mem_24g_mode_init 
+0042 c3808000 rtnbit1 dongle_bind 
+0043 79207e01 set1 dongle_bind ,pdata 
+0044 67e0c560 store 1 ,mem_24g_mode_init 
+0045 58000000 setarg 0 
+0046 67e1c51e store 3 ,mem_24g_device1_bind_step 
+0047 20204980 branch g24_bind_init + 8 
 
 p_dongle_default_init:
-0045 204050c4 call dongle_default_init + 1 
-0046 6fe0c5e0 fetch 1 ,mem_24g_pair_tx_power_init 
-0047 67e0c51c store 1 ,mem_24g_pair_tx_power 
-0048 70451500 jam off ,mem_24g_disable_fec1 
-0049 202048fa branch g24_enable_1m 
+0048 204050c4 call dongle_default_init + 1 
+0049 6fe0c5e0 fetch 1 ,mem_24g_pair_tx_power_init 
+004a 67e0c51c store 1 ,mem_24g_pair_tx_power 
+004b 70451500 jam off ,mem_24g_disable_fec1 
+004c 202048fa branch g24_enable_1m 
 
 p_txon_next:
-004a 6fe0c116 fetch 1 ,mem_tx_power 
-004b c0018057 beq tx_power_3db ,p_set_tx_power_3db 
-004c c0030059 beq tx_power_6db ,p_set_tx_power_6db 
-004d c0053a00 beq tx_power_10db ,set_tx_power_10db 
-004e c04a3a09 beq tx_power_f20db ,set_tx_power_f20db 
-004f c04f3a0c beq tx_power_f30db ,set_tx_power_f30db 
-0050 c0558067 beq tx_power_f47db ,p_set_tx_power_f47db 
-0051 c0553a0f beq tx_power_factory ,set_tx_power_factory 
+004d 6fe0c116 fetch 1 ,mem_tx_power 
+004e c001805a beq tx_power_3db ,p_set_tx_power_3db 
+004f c003005c beq tx_power_6db ,p_set_tx_power_6db 
+0050 c0053a00 beq tx_power_10db ,set_tx_power_10db 
+0051 c04a3a09 beq tx_power_f20db ,set_tx_power_f20db 
+0052 c04f3a0c beq tx_power_f30db ,set_tx_power_f30db 
+0053 c055806a beq tx_power_f47db ,p_set_tx_power_f47db 
+0054 c0553a0f beq tx_power_factory ,set_tx_power_factory 
 
 p_set_tx_power_0db:
-0052 708a3b2c jam 0x2c ,0x8a3b 
-0053 708a3c17 jam 0x17 ,0x8a3c 
-0054 708a398a jam 0x8a ,core_tx_pwr_ctrl0 
-0055 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
-0056 202039f4 branch set_rf_ldo_cfg89_2 
+0055 708a3b2c jam 0x2c ,0x8a3b 
+0056 708a3c17 jam 0x17 ,0x8a3c 
+0057 708a398a jam 0x8a ,core_tx_pwr_ctrl0 
+0058 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+0059 202039f4 branch set_rf_ldo_cfg89_2 
 
 p_set_tx_power_3db:
-0057 708a3b48 jam 0x48 ,0x8a3b 
-0058 20200053 branch p_set_tx_power_0db + 1 
+005a 708a3b48 jam 0x48 ,0x8a3b 
+005b 20200056 branch p_set_tx_power_0db + 1 
 
 p_set_tx_power_6db:
-0059 708a3b70 jam 0x70 ,0x8a3b 
-005a 708a3c1f jam 0x1f ,0x8a3c 
-005b 708a39c9 jam 0xc9 ,core_tx_pwr_ctrl0 
-005c 20200055 branch p_set_tx_power_0db + 3 
+005c 708a3b70 jam 0x70 ,0x8a3b 
+005d 708a3c1f jam 0x1f ,0x8a3c 
+005e 708a39c9 jam 0xc9 ,core_tx_pwr_ctrl0 
+005f 20200058 branch p_set_tx_power_0db + 3 
 
 p_set_tx_power_f20db:
-005d 708a3985 jam 0x85 ,core_tx_pwr_ctrl0 
-005e 708a3a04 jam 0x04 ,core_tx_pwr_ctrl1 
-005f 708a14a3 jam 0xa3 ,core_rf_ldo_cfg8 
-0060 708a150a jam 0x0a ,core_rf_ldo_cfg9 
-0061 708a3b18 jam 0x18 ,0x8a3b 
-0062 708a3c0f jam 0x0f ,0x8a3c 
-0063 20600000 rtn 
+0060 708a3985 jam 0x85 ,core_tx_pwr_ctrl0 
+0061 708a3a04 jam 0x04 ,core_tx_pwr_ctrl1 
+0062 708a14a3 jam 0xa3 ,core_rf_ldo_cfg8 
+0063 708a150a jam 0x0a ,core_rf_ldo_cfg9 
+0064 708a3b18 jam 0x18 ,0x8a3b 
+0065 708a3c0f jam 0x0f ,0x8a3c 
+0066 20600000 rtn 
 
 p_set_tx_power_f30db:
-0064 708a3983 jam 0x83 ,core_tx_pwr_ctrl0 
-0065 708a3a02 jam 0x02 ,core_tx_pwr_ctrl1 
-0066 2020005f branch p_set_tx_power_f20db + 2 
+0067 708a3983 jam 0x83 ,core_tx_pwr_ctrl0 
+0068 708a3a02 jam 0x02 ,core_tx_pwr_ctrl1 
+0069 20200062 branch p_set_tx_power_f20db + 2 
 
 p_set_tx_power_f47db:
-0067 708a3982 jam 0x82 ,core_tx_pwr_ctrl0 
-0068 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
-0069 2020005f branch p_set_tx_power_f20db + 2 
+006a 708a3943 jam 0x43 ,core_tx_pwr_ctrl0 
+006b 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+006c 202039ef branch set_rf_ldo_cfg89 
 
 p_set_tx_power_f50db:
-006a 708a3981 jam 0x81 ,core_tx_pwr_ctrl0 
-006b 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
-006c 2020005f branch p_set_tx_power_f20db + 2 
+006d 708a3942 jam 0x42 ,core_tx_pwr_ctrl0 
+006e 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+006f 202039ef branch set_rf_ldo_cfg89 
+
+p_dongle_init:
+0070 58000073 setarg p_dongle_dispatch 
+0071 67e1452b store 2 ,mem_cb_24g_receive_process 
+0072 202050ba branch dongle_init + 2 
+
+p_dongle_dispatch:
+0073 6fe0c55b fetch 1 ,mem_24g_pair_mode 
+0074 c0000076 beq 0x00 ,p_dongle_auto_bind 
+0075 202050cd branch dongle_dispatch + 1 
+
+p_dongle_auto_bind:
+0076 20400081 call p_g24_mode_switch_init 
+
+p_dongle_auto_bind_loop:
+0077 d8e00003 arg g24_mode_bind_enale_timer ,queue 
+0078 2040742e call timer_check 
+0079 205a0086 call p_g24_mode_switch_exit ,blank 
+007a 20404a7f call g24_mode_switch_bind_work 
+007b 20404aa5 call g24_mode_switch_bind_search 
+007c 20405183 call dongle_work_mode_auto 
+007d 20404adf call g24_bind_mode_auto 
+007e 20404afc call g24_search_mode_auto 
+007f 2040513f call dongle_usb_dispatch 
+0080 20200077 branch p_dongle_auto_bind_loop 
+
+p_g24_mode_switch_init:
+0081 7045e100 jam 0 ,mem_dg_bind_disable 
+0082 5800bb80 setarg 48000 
+0083 d8e00003 arg g24_mode_bind_enale_timer ,queue 
+0084 20407420 call timer_init 
+0085 20204a7a branch g24_mode_switch_init 
+
+p_g24_mode_switch_exit:
+0086 7045e101 jam 1 ,mem_dg_bind_disable 
+0087 20600000 rtn 
 
 p_usb_init:
-006d 580000f9 setarg p_dongle_ackpayload_prep 
-006e 67e1452d store 2 ,mem_cb_24g_ackpayload 
-006f 20406eb3 call enable_authrom 
-0070 20407056 call usb_init_param 
-0071 708c0000 jam 0x00 ,core_usb_config 
-0072 20002710 nop 10000 
-0073 708c1800 jam 0x00 ,core_usb_trig 
-0074 6ff10050 fetch 2 ,core_clkoff 
-0075 793ffe0a set0 clock_off_usb ,pdata 
-0076 67f10050 store 2 ,core_clkoff 
-0077 708c1100 jam 0x00 ,core_usb_hmode 
-0078 708c003c jam 0x3c ,core_usb_config 
-0079 58000d00 setarg mem_usb_rxbuf_new 
-007a 67f10c03 store 2 ,core_usb_rx_saddr 
-007b 67f10c07 store 2 ,core_usb_rxptr 
-007c 58000d44 setarg mem_usb_rxbuf_new_end 
-007d 67f10c05 store 2 ,core_usb_rx_eaddr 
-007e 2020704f branch usb_init + 16 
+0088 58000114 setarg p_dongle_ackpayload_prep 
+0089 67e1452d store 2 ,mem_cb_24g_ackpayload 
+008a 20406eb3 call enable_authrom 
+008b 20407056 call usb_init_param 
+008c 708c0000 jam 0x00 ,core_usb_config 
+008d 20002710 nop 10000 
+008e 708c1800 jam 0x00 ,core_usb_trig 
+008f 6ff10050 fetch 2 ,core_clkoff 
+0090 793ffe0a set0 clock_off_usb ,pdata 
+0091 67f10050 store 2 ,core_clkoff 
+0092 708c1100 jam 0x00 ,core_usb_hmode 
+0093 708c003c jam 0x3c ,core_usb_config 
+0094 58000d00 setarg mem_usb_rxbuf_new 
+0095 67f10c03 store 2 ,core_usb_rx_saddr 
+0096 67f10c07 store 2 ,core_usb_rxptr 
+0097 58000d44 setarg mem_usb_rxbuf_new_end 
+0098 67f10c05 store 2 ,core_usb_rx_eaddr 
+0099 2020704f branch usb_init + 16 
 
 p_usb_tx:
-007f 6fe087ab fetch 1 ,mem_usb_tx_enable 
-0080 207a0000 rtn blank 
-0081 6ff08c24 fetch 1 ,core_usb_txbusy 
-0082 1fe17e0f and_into 0x0f ,pdata 
-0083 243a7383 nbranch usb_inwake_state_tx_dispose ,blank 
-0084 6fe087ac fetch 1 ,mem_usb_device_enumeration_endflag 
-0085 203a7356 branch usb_tx_fifo_release ,blank 
-0086 6fe0879e fetch 1 ,mem_usb_state 
-0087 c001f393 beq usb_sleep ,usb_windows_wakeup 
-0088 c0817356 bne usb_connected ,usb_tx_fifo_release 
-0089 6fe087a0 fetch 1 ,mem_usb_clear_remote_wakeup 
-008a 243a7356 nbranch usb_tx_fifo_release ,blank 
-008b 2040732a call usb_tx_data_ep1 
-008c 2040008e call p_usb_tx_data_ep2 
-008d 20207342 branch usb_tx_data_ep3 
+009a 6fe087ab fetch 1 ,mem_usb_tx_enable 
+009b 207a0000 rtn blank 
+009c 6ff08c24 fetch 1 ,core_usb_txbusy 
+009d 1fe17e0f and_into 0x0f ,pdata 
+009e 243a7383 nbranch usb_inwake_state_tx_dispose ,blank 
+009f 6fe087ac fetch 1 ,mem_usb_device_enumeration_endflag 
+00a0 203a7356 branch usb_tx_fifo_release ,blank 
+00a1 6fe0879e fetch 1 ,mem_usb_state 
+00a2 c001f393 beq usb_sleep ,usb_windows_wakeup 
+00a3 c0817356 bne usb_connected ,usb_tx_fifo_release 
+00a4 6fe087a0 fetch 1 ,mem_usb_clear_remote_wakeup 
+00a5 243a7356 nbranch usb_tx_fifo_release ,blank 
+00a6 2040732a call usb_tx_data_ep1 
+00a7 204000a9 call p_usb_tx_data_ep2 
+00a8 20207342 branch usb_tx_data_ep3 
 
 p_usb_tx_data_ep2:
-008e 6ff08c24 fetch 1 ,core_usb_txbusy 
-008f c3810000 rtnbit1 2 
-0090 6fe087ab fetch 1 ,mem_usb_tx_enable 
-0091 c4010000 rtnbit0 2 
-0092 6fe087ab fetch 1 ,mem_usb_tx_enable 
-0093 793ffe02 set0 2 ,pdata 
-0094 67e087ab store 1 ,mem_usb_tx_enable 
-0095 6fe087aa fetch 1 ,mem_usb_ep2_data 
-0096 207a0000 rtn blank 
-0097 c010009b beq usb_ep2_ms ,p_usb_tx_ms_data 
-0098 c010f377 beq usb_ep2_multikey ,usb_tx_kb_multikey_data 
-0099 c011737f beq usb_ep2_systemkey ,usb_tx_kb_systemkey_data 
-009a 20203a8a branch assert 
+00a9 6ff08c24 fetch 1 ,core_usb_txbusy 
+00aa c3810000 rtnbit1 2 
+00ab 6fe087ab fetch 1 ,mem_usb_tx_enable 
+00ac c4010000 rtnbit0 2 
+00ad 6fe087ab fetch 1 ,mem_usb_tx_enable 
+00ae 793ffe02 set0 2 ,pdata 
+00af 67e087ab store 1 ,mem_usb_tx_enable 
+00b0 6fe087aa fetch 1 ,mem_usb_ep2_data 
+00b1 207a0000 rtn blank 
+00b2 c01000b6 beq usb_ep2_ms ,p_usb_tx_ms_data 
+00b3 c010f377 beq usb_ep2_multikey ,usb_tx_kb_multikey_data 
+00b4 c011737f beq usb_ep2_systemkey ,usb_tx_kb_systemkey_data 
+00b5 20203a8a branch assert 
 
 p_usb_tx_ms_data:
-009b 6fe0879b fetch 1 ,mem_usb_get_protocol_flag 
-009c 203a7373 branch usb_tx_ms_data_normal_mode ,blank 
-009d 6fe0879c fetch 1 ,mem_usb_set_protocol_status 
-009e 203a7364 branch usb_tx_ms_data_mac_boot_mode ,blank 
-009f 20207373 branch usb_tx_ms_data_normal_mode 
+00b6 6fe0879b fetch 1 ,mem_usb_get_protocol_flag 
+00b7 203a7373 branch usb_tx_ms_data_normal_mode ,blank 
+00b8 6fe0879c fetch 1 ,mem_usb_set_protocol_status 
+00b9 203a7364 branch usb_tx_ms_data_mac_boot_mode ,blank 
+00ba 20207373 branch usb_tx_ms_data_normal_mode 
 
 p_usb0_request_get_descriptor:
-00a0 6fe0870e fetch 1 ,mem_usb_setup_bvalueh 
-00a1 c000f145 beq dsc_device ,dsc_device_info 
-00a2 c010f137 beq dsc_hid ,dsc_hid_info + 1 
-00a3 c01100a5 beq dsc_hid_report ,p_dsc_hid_report_info 
-00a4 20207130 branch usb0_request_get_descriptor + 2 
+00bb 6fe0870e fetch 1 ,mem_usb_setup_bvalueh 
+00bc c000f145 beq dsc_device ,dsc_device_info 
+00bd c010f137 beq dsc_hid ,dsc_hid_info + 1 
+00be c01100c0 beq dsc_hid_report ,p_dsc_hid_report_info 
+00bf 20207130 branch usb0_request_get_descriptor + 2 
 
 p_dsc_hid_report_info:
-00a5 6fe1070f fetch 2 ,mem_usb_setup_windex 
-00a6 c00000aa beq 0 ,p_dsc_hid_report_info0 
-00a7 c000f176 beq 1 ,dsc_hid_report_info1 
-00a8 c001717a beq 2 ,dsc_hid_report_info2 
-00a9 20207111 branch usb0_force_stall 
+00c0 6fe1070f fetch 2 ,mem_usb_setup_windex 
+00c1 c00000c5 beq 0 ,p_dsc_hid_report_info0 
+00c2 c000f176 beq 1 ,dsc_hid_report_info1 
+00c3 c001717a beq 2 ,dsc_hid_report_info2 
+00c4 20207111 branch usb0_force_stall 
 
 p_dsc_hid_report_info0:
-00aa 6a2105fd fetchr rega ,2 ,mem_hidreportdesc_m 
-00ab 202072c6 branch usb0_respond_length 
+00c5 6a2105fd fetchr rega ,2 ,mem_hidreportdesc_m 
+00c6 202072c6 branch usb0_respond_length 
 
 p_g24_search_mode_auto:
-00ac 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00ad c1838000 rtnne dongle_search 
-00ae 204000b0 call p_g24_search_mode_init 
-00af 20204b00 branch g24_search_mode_auto + 4 
+00c7 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00c8 c1838000 rtnne dongle_search 
+00c9 204000cb call p_g24_search_mode_init 
+00ca 20204b00 branch g24_search_mode_auto + 4 
 
 p_g24_search_mode_init:
-00b0 6fe0c560 fetch 1 ,mem_24g_mode_init 
-00b1 c3838000 rtnbit1 dongle_search 
-00b2 79207e07 set1 dongle_search ,pdata 
-00b3 67e0c560 store 1 ,mem_24g_mode_init 
-00b4 6fe0c56e fetch 1 ,mem_tx_power_temp 
-00b5 67e0c116 store 1 ,mem_tx_power 
-00b6 20204af0 branch g24_search_mode_init + 4 
+00cb 6fe0c560 fetch 1 ,mem_24g_mode_init 
+00cc c3838000 rtnbit1 dongle_search 
+00cd 79207e07 set1 dongle_search ,pdata 
+00ce 67e0c560 store 1 ,mem_24g_mode_init 
+00cf 6fe0c56e fetch 1 ,mem_tx_power_temp 
+00d0 67e0c116 store 1 ,mem_tx_power 
+00d1 20204af0 branch g24_search_mode_init + 4 
 
 p_g24_mode_switch_bind_search:
-00b7 6fe0c561 fetch 1 ,mem_24g_work_mode 
-00b8 c1000000 rtneq dongle_work 
-00b9 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
-00ba 247a0000 nrtn blank 
-00bb 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
-00bc 247a0000 nrtn blank 
-00bd 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
-00be 207a0000 rtn blank 
-00bf 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
-00c0 c1800000 rtnne 0 
-00c1 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
-00c2 c1800000 rtnne 0 
-00c3 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
-00c4 2fe00603 compare 3 ,pdata ,3 
-00c5 2020cac1 branch g24_mode_b_s_switch_exit ,true 
-00c6 204048be call g24_timer_check 
-00c7 24740000 nrtn user 
-00c8 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
-00c9 1fe0fe01 increase 1 ,pdata 
-00ca 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
-00cb d84007d0 arg 0x7d0 ,temp 
-00cc 98467c00 isub temp ,null 
-00cd 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
-00ce 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
-00cf 1fe0fe01 increase 1 ,pdata 
-00d0 1fe17e01 and_into 1 ,pdata 
-00d1 67e0c574 store 1 ,mem_24g_b_s_time_slice 
-00d2 c0004b88 beq 0 ,g24_search_mode_enable 
-00d3 20204abc branch g24_mode_switch_bind_search_next + 1 
+00d2 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00d3 c1000000 rtneq dongle_work 
+00d4 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
+00d5 247a0000 nrtn blank 
+00d6 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
+00d7 247a0000 nrtn blank 
+00d8 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
+00d9 207a0000 rtn blank 
+00da 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
+00db c1800000 rtnne 0 
+00dc 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
+00dd c1800000 rtnne 0 
+00de 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
+00df 2fe00603 compare 3 ,pdata ,3 
+00e0 2020cac1 branch g24_mode_b_s_switch_exit ,true 
+00e1 204048be call g24_timer_check 
+00e2 24740000 nrtn user 
+00e3 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+00e4 1fe0fe01 increase 1 ,pdata 
+00e5 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
+00e6 d84007d0 arg 0x7d0 ,temp 
+00e7 98467c00 isub temp ,null 
+00e8 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
+00e9 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
+00ea 1fe0fe01 increase 1 ,pdata 
+00eb 1fe17e01 and_into 1 ,pdata 
+00ec 67e0c574 store 1 ,mem_24g_b_s_time_slice 
+00ed c0004b88 beq 0 ,g24_search_mode_enable 
+00ee 20204abc branch g24_mode_switch_bind_search_next + 1 
 
 p_g24_bind_data_parse_next:
-00d4 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-00d5 c05549a2 beq datatype_bind ,g24_bind_first_step 
-00d6 c02ac9b3 beq datatype_config ,g24_bind_second_step 
-00d7 c01149d4 beq datatype_ok ,g24_bind_third_step 
-00d8 c07f80ef beq datatype_attemp ,p_g24_data_attemp 
-00d9 20600000 rtn 
+00ef 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+00f0 c05549a2 beq datatype_bind ,g24_bind_first_step 
+00f1 c02ac9b3 beq datatype_config ,g24_bind_second_step 
+00f2 c01149d4 beq datatype_ok ,g24_bind_third_step 
+00f3 c07f810a beq datatype_attemp ,p_g24_data_attemp 
+00f4 20600000 rtn 
 
 p_g24_receive_packet_start_next:
-00da 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-00db c00080df beq datatype_device1 ,p_g24_data_device1 
-00dc c0014a4e beq datatype_device2 ,g24_data_device2 
-00dd c07f80ed beq datatype_attemp ,p_g24_data_receive_attemp 
-00de 20204a39 branch g24_rx_interrupt_clear 
+00f5 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+00f6 c00080fa beq datatype_device1 ,p_g24_data_device1 
+00f7 c0014a4e beq datatype_device2 ,g24_data_device2 
+00f8 c07f8108 beq datatype_attemp ,p_g24_data_receive_attemp 
+00f9 20204a39 branch g24_rx_interrupt_clear 
 
 p_g24_data_device1:
-00df 20404a08 call g24_binding_dvc1_living 
-00e0 20404ba2 call g24_ch_timer_reinit 
-00e1 6fe0c555 fetch 1 ,mem_24g_abort_packet 
-00e2 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
-00e3 284ffe03 isolate1 bit_abort ,temp 
-00e4 7920fe00 setflag true ,0 ,pdata 
-00e5 67e0c555 store 1 ,mem_24g_abort_packet 
-00e6 c00080e8 beq 1 ,p_g24_data_attemp_device1_abort 
-00e7 20204a47 branch g24_data_device1 + 8 
+00fa 20404a08 call g24_binding_dvc1_living 
+00fb 20404ba2 call g24_ch_timer_reinit 
+00fc 6fe0c555 fetch 1 ,mem_24g_abort_packet 
+00fd 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
+00fe 284ffe03 isolate1 bit_abort ,temp 
+00ff 7920fe00 setflag true ,0 ,pdata 
+0100 67e0c555 store 1 ,mem_24g_abort_packet 
+0101 c0008103 beq 1 ,p_g24_data_attemp_device1_abort 
+0102 20204a47 branch g24_data_device1 + 8 
 
 p_g24_data_attemp_device1_abort:
-00e8 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-00e9 247a0000 nrtn blank 
-00ea 70452901 jam 1 ,mem_24g_device1_bind_disable 
-00eb 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
-00ec 20204c14 branch g24_store_device1_addr 
+0103 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+0104 247a0000 nrtn blank 
+0105 70452901 jam 1 ,mem_24g_device1_bind_disable 
+0106 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
+0107 20204c14 branch g24_store_device1_addr 
 
 p_g24_data_receive_attemp:
-00ed 20404a16 call g24_bind_device_status 
-00ee 202000ef branch p_g24_data_attemp 
+0108 20404a16 call g24_bind_device_status 
+0109 2020010a branch p_g24_data_attemp 
 
 p_g24_data_attemp:
-00ef 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
-00f0 c00080f3 beq datatype_device1 ,p_g24_data_attemp_device1 
-00f1 c00100f6 beq datatype_device2 ,p_g24_data_attemp_device2 
-00f2 20600000 rtn 
+010a 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
+010b c000810e beq datatype_device1 ,p_g24_data_attemp_device1 
+010c c0010111 beq datatype_device2 ,p_g24_data_attemp_device2 
+010d 20600000 rtn 
 
 p_g24_data_attemp_device1:
-00f3 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-00f4 247a0000 nrtn blank 
-00f5 20204c12 branch g24_data_attemp_device1 
+010e 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+010f 247a0000 nrtn blank 
+0110 20204c12 branch g24_data_attemp_device1 
 
 p_g24_data_attemp_device2:
-00f6 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
-00f7 247a0000 nrtn blank 
-00f8 20204c16 branch g24_data_attemp_device2 
+0111 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
+0112 247a0000 nrtn blank 
+0113 20204c16 branch g24_data_attemp_device2 
 
 p_dongle_ackpayload_prep:
-00f9 6fe0c4d4 fetch 1 ,mem_24g_data_type 
-00fa c00080fc beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
-00fb c00100ff beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
+0114 6fe0c4d4 fetch 1 ,mem_24g_data_type 
+0115 c0008117 beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
+0116 c001011a beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
 
 p_dongle_ackpayload_prep_mouse:
-00fc 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
-00fd c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
-00fe 20200101 branch p_dongle_ackpayload_prep_end 
+0117 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+0118 c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
+0119 2020011c branch p_dongle_ackpayload_prep_end 
 
 p_dongle_ackpayload_prep_keyboard:
-00ff 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
-0100 c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
+011a 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+011b c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
 
 p_dongle_ackpayload_prep_end:
-0101 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
-0102 c0008105 beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
-0103 c0018109 beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
-0104 20600000 rtn 
+011c 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
+011d c0008120 beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
+011e c0018124 beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
+011f 20600000 rtn 
 
 p_dongle_g24_bind_ackpayload_prep:
-0105 70455c01 jam 1 ,mem_24g_ackpayload_enable 
-0106 6fe0c561 fetch 1 ,mem_24g_work_mode 
-0107 c1000000 rtneq dongle_work 
-0108 202051a8 branch dongle_g24_bind_ackpayload_prep 
+0120 70455c01 jam 1 ,mem_24g_ackpayload_enable 
+0121 6fe0c561 fetch 1 ,mem_24g_work_mode 
+0122 c1000000 rtneq dongle_work 
+0123 202051a8 branch dongle_g24_bind_ackpayload_prep 
 
 p_dongle_g24_kb_led_ackpayload_prep:
-0109 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
-010a c0008105 beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
-010b c07f8105 beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
-010c 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
+0124 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
+0125 c0008120 beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
+0126 c07f8120 beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
+0127 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
               org 0x3800
 
 start:
Index: program/patch.prog
===================================================================
--- /1306ac/branch/dongle/usb_ats/usb_1M/program/patch.prog	(revision 1063)
+++ /1306ac/branch/dongle/usb_ats/usb_1M/program/patch.prog	(working copy)
@@ -8,12 +8,13 @@
 	beq patch05_7,p_dongle_default_init
 	beq patch06_0,p_dongle_read_kb_bind_status
 	beq patch06_1,p_dongle_write_kb_bind_status
+	beq patch0e_0,p_dongle_init	
 	beq patch18_3,p_usb_init
 	beq patch19_3,p_usb0_request_get_descriptor
 	beq patch19_7,p_usb_tx
 //	beq patch1c_3,p_le_enable_phy_by_pdata
 	branch assert
-
+	
 pf_patch_ext:
 	rtneq patch3f_7
 	//beq patch26_4,p_g24_receive_skip_end
@@ -22,7 +23,7 @@
 	beq patch29_1,p_g24_receive_packet_start_next
 	beq patch29_5,p_g24_mode_switch_bind_search
 	beq patch29_7,p_g24_bind_mode_auto
-	beq patch2a_0,p_g24_search_mode_auto
+	beq patch2a_0,p_g24_search_mode_auto	
 	branch assert
 
 p_initialize_radio_cont:
@@ -58,7 +59,7 @@
 	nop 100
 	jam 0x0e,core_clkpll_ctrl2
 	jam 0x03,core_clkpll_ctrl0
-
+	
 	call p_set_tx_power_0db
 	jam 0x28,core_tx_mixer_cfg1
 	jam 0x3f,core_tx_mixer_cfg2
@@ -85,6 +86,8 @@
 p_g24_bind_mode_auto:
 	fetch 1,mem_24g_work_mode
 	rtnne DONGLE_BIND
+	fetch 1,mem_dg_bind_disable
+	nbranch g24_bind_mode_auto+10,blank	
 	call p_g24_bind_init
 	branch g24_bind_mode_auto+4
 p_g24_bind_init:
@@ -95,7 +98,7 @@
 	setarg 0
 	store 3,mem_24g_device1_bind_step
 	branch g24_bind_init+8
-
+	
 p_dongle_default_init:
 	call dongle_default_init+1
 	fetch 1,mem_24g_pair_tx_power_init
@@ -134,7 +137,7 @@
 p_set_tx_power_f20db:
 	jam 0x85,core_tx_pwr_ctrl0
 	jam 0x04,core_tx_pwr_ctrl1
-	jam 0xa3,core_rf_ldo_cfg8
+	jam 0xa3,core_rf_ldo_cfg8	
 	jam 0x0a,core_rf_ldo_cfg9
 	jam 0x18,0x8a3b
 	jam 0x0f,0x8a3c
@@ -144,28 +147,62 @@
 	jam 0x02,core_tx_pwr_ctrl1
 	branch p_set_tx_power_f20db+2
 
-
+	
 p_set_tx_power_f47db:
-	jam 0x82,core_tx_pwr_ctrl0
-	jam 0x01,core_tx_pwr_ctrl1
-	branch p_set_tx_power_f20db+2
+	jam 0x43,core_tx_pwr_ctrl0
+	jam 0x00,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
 p_set_tx_power_f50db:
-	jam 0x81,core_tx_pwr_ctrl0
-	jam 0x01,core_tx_pwr_ctrl1
-	branch p_set_tx_power_f20db+2
-/*
+	jam 0x42,core_tx_pwr_ctrl0
+	jam 0x00,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+/*	
 	fetch 1,mem_dg_sys_config
 	rtnbit0 DG_ENABLE_NEW_REVISION
 	jam ON,mem_24g_disable_fec1
 	branch g24_enable_2M
-*/
+*/	
+p_dongle_init:
+	setarg p_dongle_dispatch
+	store 2,mem_cb_24g_receive_process
+	branch dongle_init+2
+
+p_dongle_dispatch:
+	fetch 1,mem_24g_pair_mode
+	beq 0x00,p_dongle_auto_bind
+	branch dongle_dispatch+1
+
+p_dongle_auto_bind:
+	call p_g24_mode_switch_init
+p_dongle_auto_bind_loop:
+	arg G24_MODE_BIND_ENALE_TIMER,queue
+	call timer_check
+	call p_g24_mode_switch_exit,blank
+	call g24_mode_switch_bind_work
+	call g24_mode_switch_bind_search
+	call dongle_work_mode_auto
+	call g24_bind_mode_auto
+	call g24_search_mode_auto
+	call dongle_usb_dispatch
+	branch p_dongle_auto_bind_loop
+
+p_g24_mode_switch_init:
+	jam 0,mem_dg_bind_disable
+	setarg 48000		// 30s
+	arg G24_MODE_BIND_ENALE_TIMER,queue
+	call timer_init
+	branch g24_mode_switch_init
+
+p_g24_mode_switch_exit:
+	jam 1,mem_dg_bind_disable
+	rtn
 
 p_usb_init:
 	setarg p_dongle_ackpayload_prep
 	store 2,mem_cb_24g_ackpayload
 	call enable_authrom
 	call usb_init_param
-
 	jam 0x00,core_usb_config
 	nop 10000
 	jam 0x00,core_usb_trig
@@ -386,7 +423,7 @@
 	beq DATATYPE_DEVICE2,g24_data_device2	//keyboard
 	beq DATATYPE_ATTEMP,p_g24_data_receive_attemp	//reconn packet
 	branch g24_rx_interrupt_clear
-
+	
 p_g24_data_device1:
 	call g24_binding_dvc1_living	//works on auto pair only
 	call g24_ch_timer_reinit
@@ -448,4 +485,4 @@
 	fetch 1,mem_24g_rxbuf+2
 	beq DATATYPE_DEVICE1,p_dongle_g24_bind_ackpayload_prep
 	beq DATATYPE_ATTEMP,p_dongle_g24_bind_ackpayload_prep
-	branch dongle_g24_kb_led_ackpayload_prep+3
+	branch dongle_g24_kb_led_ackpayload_prep+3	
