Index: output/eeprom.dat
===================================================================
--- /1306ac/branch/dongle/usb_1M/output/eeprom.dat	(revision 500)
+++ /1306ac/branch/dongle/usb_1M/output/eeprom.dat	(working copy)
@@ -2,28 +2,32 @@
 02
 aa
 55
-a6
-02
+de
+03
 c2
 84
 00
-06
+07
 c0
 00
 00
-0e
+0f
 c0
 0b
 80
-22
+3e
+c0
+0c
+00
+23
 c0
 17
 80
-1e
+1f
 c0
 61
 80
-2c
+60
 20
 20
 3a
@@ -35,27 +39,27 @@
 c0
 23
 00
-60
+96
 c0
 23
 80
-6c
+a2
 c0
 24
 80
-8a
+c0
 c0
 26
 80
-47
+7d
 c0
 27
 80
-13
+14
 c0
 28
 00
-3c
+72
 20
 20
 3a
@@ -91,7 +95,7 @@
 20
 40
 00
-17
+18
 20
 20
 4a
@@ -140,46 +144,258 @@
 20
 48
 fa
+70
+8a
+75
+03
+70
+8a
+85
+00
+70
+89
+6f
+10
+6f
+e0
+c3
+ef
+20
+5a
+6d
+31
+70
+8a
+03
+05
+70
+8a
+7a
+94
+20
+40
+3a
+44
+20
+40
+3a
+3f
+20
+40
+3a
+3a
+70
+8a
+8b
+e6
+70
+8a
+83
+90
+70
+8a
+0e
+0b
+70
+8a
+0f
+05
+70
+89
+68
+76
+70
+89
+69
+76
+6f
+e0
+c0
+9a
+c0
+84
+00
+36
+70
+8a
+08
+34
+70
+8a
+01
+ff
+20
+00
+00
+64
+70
+8a
+02
+0e
+70
+8a
+00
+03
+20
+40
+00
+45
+70
+8a
+9a
+28
+70
+8a
+9b
+3f
+20
+20
+3a
+35
 6f
 e0
 c1
 16
 c0
-54
+01
 80
-26
+4a
 c0
-59
+03
 00
-29
+4c
+c0
+05
+3a
+00
+c0
+4a
+3a
+09
+c0
+4f
+3a
+0c
+c0
+55
+3a
+0f
+70
+8a
+3b
+2c
+70
+8a
+3c
+17
+70
+8a
+39
+8a
+70
+8a
+3a
+0f
 20
 20
 39
-e3
+f4
+70
+8a
+3b
+48
+20
+20
+00
+46
+70
+8a
+3b
+70
+70
+8a
+3c
+1f
 70
 8a
 39
-43
+c9
+20
+20
+00
+48
+70
+8a
+39
+85
 70
 8a
 3a
+04
+70
+8a
+14
+a3
+70
+8a
+15
+0a
+70
+8a
+3b
+18
+70
+8a
+3c
+0f
+20
+60
+00
 00
+70
+8a
+39
+83
+70
+8a
+3a
+02
 20
 20
-39
-ef
+00
+52
 70
 8a
 39
-42
+82
 70
 8a
 3a
-00
+01
 20
 20
+00
+52
+70
+8a
 39
-ef
+81
+70
+8a
+3a
+01
+20
+20
+00
+52
+58
+00
+00
+df
+67
+e1
+45
+2d
 20
 40
 6e
@@ -255,7 +471,7 @@
 20
 40
 00
-40
+76
 20
 20
 4b
@@ -407,7 +623,7 @@
 20
 40
 00
-66
+9c
 20
 20
 49
@@ -451,11 +667,11 @@
 c0
 11
 00
-72
+a8
 c0
 7f
 80
-9f
+d5
 20
 60
 00
@@ -467,7 +683,7 @@
 20
 3a
 00
-78
+ae
 6f
 e2
 45
@@ -491,11 +707,11 @@
 c0
 00
 80
-7c
+b2
 c0
 01
 00
-83
+b9
 20
 60
 00
@@ -515,7 +731,7 @@
 c0
 01
 00
-81
+b7
 20
 60
 00
@@ -543,7 +759,7 @@
 c0
 80
 00
-88
+be
 20
 60
 00
@@ -563,7 +779,7 @@
 c0
 00
 80
-8f
+c5
 c0
 01
 4a
@@ -571,7 +787,7 @@
 c0
 7f
 80
-9d
+d3
 20
 20
 4a
@@ -607,7 +823,7 @@
 c0
 00
 80
-98
+ce
 20
 20
 4a
@@ -639,7 +855,7 @@
 20
 20
 00
-9f
+d5
 6f
 e0
 c5
@@ -647,11 +863,11 @@
 c0
 00
 80
-a3
+d9
 c0
 01
 00
-a6
+dc
 20
 60
 00
@@ -680,8 +896,104 @@
 20
 4c
 16
-81
-ac
+6f
+e0
+c4
+d4
+c0
+00
+80
+e2
+c0
+01
+00
+e5
+6f
+e0
+c5
+dd
+c2
+80
+51
+9d
+20
+20
+00
+e7
+6f
+e0
+c5
+dd
+c2
+80
+d1
+a1
+6f
+e0
+c5
+5c
+c0
+00
+80
+eb
+c0
+01
+80
+f3
+20
+60
+00
+00
+70
+45
+5c
+01
+6f
+e0
+c5
+61
+c1
+80
+80
+00
+6f
+e0
+c5
+5b
+24
+7a
+00
+00
+20
+40
+49
+fd
+24
+77
+80
+00
+20
+20
+49
+83
+6f
+e0
+c4
+44
+c0
+00
+80
+eb
+c0
+7f
+80
+eb
+20
+20
+51
+af
+0b
+9b
 aa
 55
 40
@@ -691,7 +1003,7 @@
 01
 00
 80
-00
+01
 00
 80
 00
@@ -974,7 +1286,7 @@
 aa
 aa
 55
-a2
+a3
 42
-0f
-88
+12
+e3
Index: output/program.lis
===================================================================
--- /1306ac/branch/dongle/usb_1M/output/program.lis	(revision 500)
+++ /1306ac/branch/dongle/usb_1M/output/program.lis	(working copy)
@@ -1,230 +1,334 @@
               include "bt_format "
               org 0x0000
-0000 c2840006 bbit1 8 ,pf_patch_ext 
-0001 c000000e beq patch00_0 ,p_soft_reset 
-0002 c00b8022 beq patch02_7 ,p_txon_next 
-0003 c017801e beq patch05_7 ,p_dongle_default_init 
-0004 c061802c beq patch18_3 ,p_usb_init 
-0005 20203a8a branch assert 
+0000 c2840007 bbit1 8 ,pf_patch_ext 
+0001 c000000f beq patch00_0 ,p_soft_reset 
+0002 c00b803e beq patch02_7 ,p_txon_next 
+0003 c00c0023 beq patch03_0 ,p_initialize_radio_cont 
+0004 c017801f beq patch05_7 ,p_dongle_default_init 
+0005 c0618060 beq patch18_3 ,p_usb_init 
+0006 20203a8a branch assert 
 
 pf_patch_ext:
-0006 c17f8000 rtneq patch3f_7 
-0007 c0230060 beq patch28_6 ,p_g24_bind_data_process 
-0008 c023806c beq patch28_7 ,p_g24_bind_data_parse_next 
-0009 c024808a beq patch29_1 ,p_g24_receive_packet_start_next 
-000a c0268047 beq patch29_5 ,p_g24_mode_switch_bind_search 
-000b c0278013 beq patch29_7 ,p_g24_bind_mode_auto 
-000c c028003c beq patch2a_0 ,p_g24_search_mode_auto 
-000d 20203a8a branch assert 
+0007 c17f8000 rtneq patch3f_7 
+0008 c0230096 beq patch28_6 ,p_g24_bind_data_process 
+0009 c02380a2 beq patch28_7 ,p_g24_bind_data_parse_next 
+000a c02480c0 beq patch29_1 ,p_g24_receive_packet_start_next 
+000b c026807d beq patch29_5 ,p_g24_mode_switch_bind_search 
+000c c0278014 beq patch29_7 ,p_g24_bind_mode_auto 
+000d c0280072 beq patch2a_0 ,p_g24_search_mode_auto 
+000e 20203a8a branch assert 
 
 p_soft_reset:
-000e 20800000 clear_stack 
-000f 6fe240cc fetch 4 ,mem_lpm_ctrl3 
-0010 67f2004c store 4 ,core_lpm_reg 
-0011 20403c16 call lpm_write_ctrl3 
-0012 20203803 branch soft_reset + 2 
+000f 20800000 clear_stack 
+0010 6fe240cc fetch 4 ,mem_lpm_ctrl3 
+0011 67f2004c store 4 ,core_lpm_reg 
+0012 20403c16 call lpm_write_ctrl3 
+0013 20203803 branch soft_reset + 2 
 
 p_g24_bind_mode_auto:
-0013 6fe0c561 fetch 1 ,mem_24g_work_mode 
-0014 c1808000 rtnne dongle_bind 
-0015 20400017 call p_g24_bind_init 
-0016 20204ae3 branch g24_bind_mode_auto + 4 
+0014 6fe0c561 fetch 1 ,mem_24g_work_mode 
+0015 c1808000 rtnne dongle_bind 
+0016 20400018 call p_g24_bind_init 
+0017 20204ae3 branch g24_bind_mode_auto + 4 
 
 p_g24_bind_init:
-0017 6fe0c560 fetch 1 ,mem_24g_mode_init 
-0018 c3808000 rtnbit1 dongle_bind 
-0019 79207e01 set1 dongle_bind ,pdata 
-001a 67e0c560 store 1 ,mem_24g_mode_init 
-001b 58000000 setarg 0 
-001c 67e1c51e store 3 ,mem_24g_device1_bind_step 
-001d 20204980 branch g24_bind_init + 8 
+0018 6fe0c560 fetch 1 ,mem_24g_mode_init 
+0019 c3808000 rtnbit1 dongle_bind 
+001a 79207e01 set1 dongle_bind ,pdata 
+001b 67e0c560 store 1 ,mem_24g_mode_init 
+001c 58000000 setarg 0 
+001d 67e1c51e store 3 ,mem_24g_device1_bind_step 
+001e 20204980 branch g24_bind_init + 8 
 
 p_dongle_default_init:
-001e 204050c4 call dongle_default_init + 1 
-001f 70451ca9 jam tx_power_f47db ,mem_24g_pair_tx_power 
-0020 70451500 jam off ,mem_24g_disable_fec1 
-0021 202048fa branch g24_enable_1m 
+001f 204050c4 call dongle_default_init + 1 
+0020 70451ca9 jam tx_power_f47db ,mem_24g_pair_tx_power 
+0021 70451500 jam off ,mem_24g_disable_fec1 
+0022 202048fa branch g24_enable_1m 
+
+p_initialize_radio_cont:
+0023 708a7503 jam 0x03 ,core_rx_lna_cfg3 
+0024 708a8500 jam 0 ,core_syn_loopdiv_dsm_cfg 
+0025 70896f10 jam 0x10 ,0x896f 
+0026 6fe0c3ef fetch 1 ,mem_wdt_always_work 
+0027 205a6d31 call wdt_set_disable ,blank 
+0028 708a0305 jam 0x05 ,core_clkpll_cfg0 
+0029 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+002a 20403a44 call initialize_rc_cal 
+002b 20403a3f call initialize_rf_ldo_cfg1 
+002c 20403a3a call initialize_syn_afc_cfg1 
+002d 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+002e 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+002f 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+0030 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+0031 70896876 jam 0x76 ,core_agc_wb_sat_th 
+0032 70896976 jam 0x76 ,core_agc_nb_sat_th 
+0033 6fe0c09a fetch 1 ,mem_fcomp_div 
+0034 c0840036 bne xtal_16m ,p_initialize_radio_cont_next 
+0035 708a0834 jam 0x34 ,core_clkpll_cfg5 
+
+p_initialize_radio_cont_next:
+0036 708a01ff jam 0xff ,core_clkpll_ctrl1 
+0037 20000064 nop 100 
+0038 708a020e jam 0x0e ,core_clkpll_ctrl2 
+0039 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+003a 20400045 call p_set_tx_power_0db 
+003b 708a9a28 jam 0x28 ,core_tx_mixer_cfg1 
+003c 708a9b3f jam 0x3f ,core_tx_mixer_cfg2 
+003d 20203a35 branch initialize_radio_cont_next_2 
 
 p_txon_next:
-0022 6fe0c116 fetch 1 ,mem_tx_power 
-0023 c0548026 beq tx_power_f47db ,p_set_tx_power_f47db 
-0024 c0590029 beq tx_power_f50db ,p_set_tx_power_f50db 
-0025 202039e3 branch txon_next 
+003e 6fe0c116 fetch 1 ,mem_tx_power 
+003f c001804a beq tx_power_3db ,p_set_tx_power_3db 
+0040 c003004c beq tx_power_6db ,p_set_tx_power_6db 
+0041 c0053a00 beq tx_power_10db ,set_tx_power_10db 
+0042 c04a3a09 beq tx_power_f20db ,set_tx_power_f20db 
+0043 c04f3a0c beq tx_power_f30db ,set_tx_power_f30db 
+0044 c0553a0f beq tx_power_factory ,set_tx_power_factory 
+
+p_set_tx_power_0db:
+0045 708a3b2c jam 0x2c ,0x8a3b 
+0046 708a3c17 jam 0x17 ,0x8a3c 
+0047 708a398a jam 0x8a ,core_tx_pwr_ctrl0 
+0048 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+0049 202039f4 branch set_rf_ldo_cfg89_2 
+
+p_set_tx_power_3db:
+004a 708a3b48 jam 0x48 ,0x8a3b 
+004b 20200046 branch p_set_tx_power_0db + 1 
+
+p_set_tx_power_6db:
+004c 708a3b70 jam 0x70 ,0x8a3b 
+004d 708a3c1f jam 0x1f ,0x8a3c 
+004e 708a39c9 jam 0xc9 ,core_tx_pwr_ctrl0 
+004f 20200048 branch p_set_tx_power_0db + 3 
+
+p_set_tx_power_f20db:
+0050 708a3985 jam 0x85 ,core_tx_pwr_ctrl0 
+0051 708a3a04 jam 0x04 ,core_tx_pwr_ctrl1 
+0052 708a14a3 jam 0xa3 ,core_rf_ldo_cfg8 
+0053 708a150a jam 0x0a ,core_rf_ldo_cfg9 
+0054 708a3b18 jam 0x18 ,0x8a3b 
+0055 708a3c0f jam 0x0f ,0x8a3c 
+0056 20600000 rtn 
+
+p_set_tx_power_f30db:
+0057 708a3983 jam 0x83 ,core_tx_pwr_ctrl0 
+0058 708a3a02 jam 0x02 ,core_tx_pwr_ctrl1 
+0059 20200052 branch p_set_tx_power_f20db + 2 
 
 p_set_tx_power_f47db:
-0026 708a3943 jam 0x43 ,core_tx_pwr_ctrl0 
-0027 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
-0028 202039ef branch set_rf_ldo_cfg89 
+005a 708a3982 jam 0x82 ,core_tx_pwr_ctrl0 
+005b 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
+005c 20200052 branch p_set_tx_power_f20db + 2 
 
 p_set_tx_power_f50db:
-0029 708a3942 jam 0x42 ,core_tx_pwr_ctrl0 
-002a 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
-002b 202039ef branch set_rf_ldo_cfg89 
+005d 708a3981 jam 0x81 ,core_tx_pwr_ctrl0 
+005e 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
+005f 20200052 branch p_set_tx_power_f20db + 2 
 
 p_usb_init:
-002c 20406eb3 call enable_authrom 
-002d 20407056 call usb_init_param 
-002e 708c0000 jam 0x00 ,core_usb_config 
-002f 20002710 nop 10000 
-0030 708c1800 jam 0x00 ,core_usb_trig 
-0031 6ff10050 fetch 2 ,core_clkoff 
-0032 793ffe0a set0 clock_off_usb ,pdata 
-0033 67f10050 store 2 ,core_clkoff 
-0034 708c1100 jam 0x00 ,core_usb_hmode 
-0035 708c003c jam 0x3c ,core_usb_config 
-0036 58000d00 setarg mem_usb_rxbuf_new 
-0037 67f10c03 store 2 ,core_usb_rx_saddr 
-0038 67f10c07 store 2 ,core_usb_rxptr 
-0039 58000d44 setarg mem_usb_rxbuf_new_end 
-003a 67f10c05 store 2 ,core_usb_rx_eaddr 
-003b 2020704f branch usb_init + 16 
+0060 580000df setarg p_dongle_ackpayload_prep 
+0061 67e1452d store 2 ,mem_cb_24g_ackpayload 
+0062 20406eb3 call enable_authrom 
+0063 20407056 call usb_init_param 
+0064 708c0000 jam 0x00 ,core_usb_config 
+0065 20002710 nop 10000 
+0066 708c1800 jam 0x00 ,core_usb_trig 
+0067 6ff10050 fetch 2 ,core_clkoff 
+0068 793ffe0a set0 clock_off_usb ,pdata 
+0069 67f10050 store 2 ,core_clkoff 
+006a 708c1100 jam 0x00 ,core_usb_hmode 
+006b 708c003c jam 0x3c ,core_usb_config 
+006c 58000d00 setarg mem_usb_rxbuf_new 
+006d 67f10c03 store 2 ,core_usb_rx_saddr 
+006e 67f10c07 store 2 ,core_usb_rxptr 
+006f 58000d44 setarg mem_usb_rxbuf_new_end 
+0070 67f10c05 store 2 ,core_usb_rx_eaddr 
+0071 2020704f branch usb_init + 16 
 
 p_g24_search_mode_auto:
-003c 6fe0c561 fetch 1 ,mem_24g_work_mode 
-003d c1838000 rtnne dongle_search 
-003e 20400040 call p_g24_search_mode_init 
-003f 20204b00 branch g24_search_mode_auto + 4 
+0072 6fe0c561 fetch 1 ,mem_24g_work_mode 
+0073 c1838000 rtnne dongle_search 
+0074 20400076 call p_g24_search_mode_init 
+0075 20204b00 branch g24_search_mode_auto + 4 
 
 p_g24_search_mode_init:
-0040 6fe0c560 fetch 1 ,mem_24g_mode_init 
-0041 c3838000 rtnbit1 dongle_search 
-0042 79207e07 set1 dongle_search ,pdata 
-0043 67e0c560 store 1 ,mem_24g_mode_init 
-0044 6fe0c56e fetch 1 ,mem_tx_power_temp 
-0045 67e0c116 store 1 ,mem_tx_power 
-0046 20204af0 branch g24_search_mode_init + 4 
+0076 6fe0c560 fetch 1 ,mem_24g_mode_init 
+0077 c3838000 rtnbit1 dongle_search 
+0078 79207e07 set1 dongle_search ,pdata 
+0079 67e0c560 store 1 ,mem_24g_mode_init 
+007a 6fe0c56e fetch 1 ,mem_tx_power_temp 
+007b 67e0c116 store 1 ,mem_tx_power 
+007c 20204af0 branch g24_search_mode_init + 4 
 
 p_g24_mode_switch_bind_search:
-0047 6fe0c561 fetch 1 ,mem_24g_work_mode 
-0048 c1000000 rtneq dongle_work 
-0049 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
-004a 247a0000 nrtn blank 
-004b 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
-004c 247a0000 nrtn blank 
-004d 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
-004e 207a0000 rtn blank 
-004f 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
-0050 2fe00603 compare 3 ,pdata ,3 
-0051 2020cac1 branch g24_mode_b_s_switch_exit ,true 
-0052 204048be call g24_timer_check 
-0053 24740000 nrtn user 
-0054 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
-0055 1fe0fe01 increase 1 ,pdata 
-0056 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
-0057 d84007d0 arg 0x7d0 ,temp 
-0058 98467c00 isub temp ,null 
-0059 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
-005a 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
-005b 1fe0fe01 increase 1 ,pdata 
-005c 1fe17e01 and_into 1 ,pdata 
-005d 67e0c574 store 1 ,mem_24g_b_s_time_slice 
-005e c0004b88 beq 0 ,g24_search_mode_enable 
-005f 20204abc branch g24_mode_switch_bind_search_next + 1 
+007d 6fe0c561 fetch 1 ,mem_24g_work_mode 
+007e c1000000 rtneq dongle_work 
+007f 6fe0c575 fetch 1 ,mem_24g_b_s_mode_switch_disable 
+0080 247a0000 nrtn blank 
+0081 6fe0c573 fetch 1 ,mem_24g_mode_b_s_switch_exit 
+0082 247a0000 nrtn blank 
+0083 6fe0c56f fetch 1 ,mem_24g_mode_b_s_switch 
+0084 207a0000 rtn blank 
+0085 6fe0c576 fetch 1 ,mem_24g_bind_device_living 
+0086 2fe00603 compare 3 ,pdata ,3 
+0087 2020cac1 branch g24_mode_b_s_switch_exit ,true 
+0088 204048be call g24_timer_check 
+0089 24740000 nrtn user 
+008a 6fe14571 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+008b 1fe0fe01 increase 1 ,pdata 
+008c 67e14571 store 2 ,mem_24g_mode_b_s_switch_cnt 
+008d d84007d0 arg 0x7d0 ,temp 
+008e 98467c00 isub temp ,null 
+008f 20214ac1 branch g24_mode_b_s_switch_exit ,positive 
+0090 6fe0c574 fetch 1 ,mem_24g_b_s_time_slice 
+0091 1fe0fe01 increase 1 ,pdata 
+0092 1fe17e01 and_into 1 ,pdata 
+0093 67e0c574 store 1 ,mem_24g_b_s_time_slice 
+0094 c0004b88 beq 0 ,g24_search_mode_enable 
+0095 20204abc branch g24_mode_switch_bind_search_next + 1 
 
 p_g24_bind_data_process:
-0060 20404a39 call g24_rx_interrupt_clear 
-0061 20404792 call g24_receive_packet 
-0062 2437ca39 nbranch g24_rx_interrupt_clear ,user3 
-0063 20404997 call g24_bind_data_parse 
-0064 20400066 call p_g24_bind_transmit_ack 
-0065 2020498e branch g24_bind_data_process + 6 
+0096 20404a39 call g24_rx_interrupt_clear 
+0097 20404792 call g24_receive_packet 
+0098 2437ca39 nbranch g24_rx_interrupt_clear ,user3 
+0099 20404997 call g24_bind_data_parse 
+009a 2040009c call p_g24_bind_transmit_ack 
+009b 2020498e branch g24_bind_data_process + 6 
 
 p_g24_bind_transmit_ack:
-0066 6fe0c442 fetch 1 ,mem_24g_rxbuf 
-0067 67e0c4d4 store 1 ,mem_24g_data_type 
-0068 2040488d call g24_read_len_pid_crc 
-0069 20404a20 call g24_ackpayload_prep 
-006a 2437c7fc nbranch g24_end_of_packet ,user3 
-006b 20204a73 branch g24tx_with_ack + 1 
+009c 6fe0c442 fetch 1 ,mem_24g_rxbuf 
+009d 67e0c4d4 store 1 ,mem_24g_data_type 
+009e 2040488d call g24_read_len_pid_crc 
+009f 20404a20 call g24_ackpayload_prep 
+00a0 2437c7fc nbranch g24_end_of_packet ,user3 
+00a1 20204a73 branch g24tx_with_ack + 1 
 
 p_g24_bind_data_parse_next:
-006c 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-006d c05549a2 beq datatype_bind ,g24_bind_first_step 
-006e c02ac9b3 beq datatype_config ,g24_bind_second_step 
-006f c0110072 beq datatype_ok ,p_g24_bind_third_step 
-0070 c07f809f beq datatype_attemp ,p_g24_data_attemp 
-0071 20600000 rtn 
+00a2 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+00a3 c05549a2 beq datatype_bind ,g24_bind_first_step 
+00a4 c02ac9b3 beq datatype_config ,g24_bind_second_step 
+00a5 c01100a8 beq datatype_ok ,p_g24_bind_third_step 
+00a6 c07f80d5 beq datatype_attemp ,p_g24_data_attemp 
+00a7 20600000 rtn 
 
 p_g24_bind_third_step:
-0072 6fe0c4f9 fetch 1 ,mem_24g_pair_switch 
-0073 203a0078 branch p_g24_bind_third_step_skip ,blank 
-0074 6fe24537 fetch 4 ,mem_24g_rxdata_temp + 4 
-0075 684a4577 fetcht 4 ,mem_24g_transmitter_addr 
-0076 98467c00 isub temp ,null 
-0077 24628000 nrtn zero 
+00a8 6fe0c4f9 fetch 1 ,mem_24g_pair_switch 
+00a9 203a00ae branch p_g24_bind_third_step_skip ,blank 
+00aa 6fe24537 fetch 4 ,mem_24g_rxdata_temp + 4 
+00ab 684a4577 fetcht 4 ,mem_24g_transmitter_addr 
+00ac 98467c00 isub temp ,null 
+00ad 24628000 nrtn zero 
 
 p_g24_bind_third_step_skip:
-0078 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
-0079 c000807c beq datatype_device1 ,p_g24_bind_third_step_device1 
-007a c0010083 beq datatype_device2 ,p_g24_bind_third_step_device2 
-007b 20600000 rtn 
+00ae 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
+00af c00080b2 beq datatype_device1 ,p_g24_bind_third_step_device1 
+00b0 c00100b9 beq datatype_device2 ,p_g24_bind_third_step_device2 
+00b1 20600000 rtn 
 
 p_g24_bind_third_step_device1:
-007c 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-007d 247a0000 nrtn blank 
-007e 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
-007f c0010081 beq 2 ,p_g24_bind_dvc1_step_success 
-0080 20600000 rtn 
+00b2 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+00b3 247a0000 nrtn blank 
+00b4 6fe0c51e fetch 1 ,mem_24g_device1_bind_step 
+00b5 c00100b7 beq 2 ,p_g24_bind_dvc1_step_success 
+00b6 20600000 rtn 
 
 p_g24_bind_dvc1_step_success:
-0081 70452901 jam 1 ,mem_24g_device1_bind_disable 
-0082 202049e5 branch g24_bind_dvc1_step_success + 2 
+00b7 70452901 jam 1 ,mem_24g_device1_bind_disable 
+00b8 202049e5 branch g24_bind_dvc1_step_success + 2 
 
 p_g24_bind_third_step_device2:
-0083 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
-0084 247a0000 nrtn blank 
-0085 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
-0086 c0800088 bne 0 ,p_g24_bind_dvc2_step_success 
-0087 20600000 rtn 
+00b9 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
+00ba 247a0000 nrtn blank 
+00bb 6fe0c51f fetch 1 ,mem_24g_device2_bind_step 
+00bc c08000be bne 0 ,p_g24_bind_dvc2_step_success 
+00bd 20600000 rtn 
 
 p_g24_bind_dvc2_step_success:
-0088 70452a01 jam 1 ,mem_24g_device2_bind_disable 
-0089 202049f3 branch g24_bind_dvc2_step_success + 2 
+00be 70452a01 jam 1 ,mem_24g_device2_bind_disable 
+00bf 202049f3 branch g24_bind_dvc2_step_success + 2 
 
 p_g24_receive_packet_start_next:
-008a 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
-008b c000808f beq datatype_device1 ,p_g24_data_device1 
-008c c0014a4e beq datatype_device2 ,g24_data_device2 
-008d c07f809d beq datatype_attemp ,p_g24_data_receive_attemp 
-008e 20204a39 branch g24_rx_interrupt_clear 
+00c0 6fe0c535 fetch 1 ,mem_24g_rxdata_temp + 2 
+00c1 c00080c5 beq datatype_device1 ,p_g24_data_device1 
+00c2 c0014a4e beq datatype_device2 ,g24_data_device2 
+00c3 c07f80d3 beq datatype_attemp ,p_g24_data_receive_attemp 
+00c4 20204a39 branch g24_rx_interrupt_clear 
 
 p_g24_data_device1:
-008f 20404a08 call g24_binding_dvc1_living 
-0090 20404ba2 call g24_ch_timer_reinit 
-0091 6fe0c555 fetch 1 ,mem_24g_abort_packet 
-0092 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
-0093 284ffe03 isolate1 bit_abort ,temp 
-0094 7920fe00 setflag true ,0 ,pdata 
-0095 67e0c555 store 1 ,mem_24g_abort_packet 
-0096 c0008098 beq 1 ,p_g24_data_attemp_device1_abort 
-0097 20204a47 branch g24_data_device1 + 8 
+00c5 20404a08 call g24_binding_dvc1_living 
+00c6 20404ba2 call g24_ch_timer_reinit 
+00c7 6fe0c555 fetch 1 ,mem_24g_abort_packet 
+00c8 6848c533 fetcht 1 ,mem_24g_rxdata_temp 
+00c9 284ffe03 isolate1 bit_abort ,temp 
+00ca 7920fe00 setflag true ,0 ,pdata 
+00cb 67e0c555 store 1 ,mem_24g_abort_packet 
+00cc c00080ce beq 1 ,p_g24_data_attemp_device1_abort 
+00cd 20204a47 branch g24_data_device1 + 8 
 
 p_g24_data_attemp_device1_abort:
-0098 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-0099 247a0000 nrtn blank 
-009a 70452901 jam 1 ,mem_24g_device1_bind_disable 
-009b 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
-009c 20204c14 branch g24_store_device1_addr 
+00ce 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+00cf 247a0000 nrtn blank 
+00d0 70452901 jam 1 ,mem_24g_device1_bind_disable 
+00d1 6fe2453d fetch 4 ,mem_24g_rxdata_temp + 10 
+00d2 20204c14 branch g24_store_device1_addr 
 
 p_g24_data_receive_attemp:
-009d 20404a16 call g24_bind_device_status 
-009e 2020009f branch p_g24_data_attemp 
+00d3 20404a16 call g24_bind_device_status 
+00d4 202000d5 branch p_g24_data_attemp 
 
 p_g24_data_attemp:
-009f 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
-00a0 c00080a3 beq datatype_device1 ,p_g24_data_attemp_device1 
-00a1 c00100a6 beq datatype_device2 ,p_g24_data_attemp_device2 
-00a2 20600000 rtn 
+00d5 6fe0c536 fetch 1 ,mem_24g_rxdata_temp + 3 
+00d6 c00080d9 beq datatype_device1 ,p_g24_data_attemp_device1 
+00d7 c00100dc beq datatype_device2 ,p_g24_data_attemp_device2 
+00d8 20600000 rtn 
 
 p_g24_data_attemp_device1:
-00a3 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
-00a4 247a0000 nrtn blank 
-00a5 20204c12 branch g24_data_attemp_device1 
+00d9 6fe0c529 fetch 1 ,mem_24g_device1_bind_disable 
+00da 247a0000 nrtn blank 
+00db 20204c12 branch g24_data_attemp_device1 
 
 p_g24_data_attemp_device2:
-00a6 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
-00a7 247a0000 nrtn blank 
-00a8 20204c16 branch g24_data_attemp_device2 
+00dc 6fe0c52a fetch 1 ,mem_24g_device2_bind_disable 
+00dd 247a0000 nrtn blank 
+00de 20204c16 branch g24_data_attemp_device2 
+
+p_dongle_ackpayload_prep:
+00df 6fe0c4d4 fetch 1 ,mem_24g_data_type 
+00e0 c00080e2 beq datatype_device1 ,p_dongle_ackpayload_prep_mouse 
+00e1 c00100e5 beq datatype_device2 ,p_dongle_ackpayload_prep_keyboard 
+
+p_dongle_ackpayload_prep_mouse:
+00e2 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+00e3 c280519d bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
+00e4 202000e7 branch p_dongle_ackpayload_prep_end 
+
+p_dongle_ackpayload_prep_keyboard:
+00e5 6fe0c5dd fetch 1 ,mem_dg_pc_sleep_flag 
+00e6 c280d1a1 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
+
+p_dongle_ackpayload_prep_end:
+00e7 6fe0c55c fetch 1 ,mem_24g_ackpayload_enable 
+00e8 c00080eb beq bind_ackpayload ,p_dongle_g24_bind_ackpayload_prep 
+00e9 c00180f3 beq kb_led_ackpayload ,p_dongle_g24_kb_led_ackpayload_prep 
+00ea 20600000 rtn 
+
+p_dongle_g24_bind_ackpayload_prep:
+00eb 70455c01 jam 1 ,mem_24g_ackpayload_enable 
+00ec 6fe0c561 fetch 1 ,mem_24g_work_mode 
+00ed c1808000 rtnne dongle_bind 
+00ee 6fe0c55b fetch 1 ,mem_24g_pair_mode 
+00ef 247a0000 nrtn blank 
+00f0 204049fd call g24_binding_device_check + 4 
+00f1 24778000 nrtn user3 
+00f2 20204983 branch g24_bind_ackpayload_prep 
+
+p_dongle_g24_kb_led_ackpayload_prep:
+00f3 6fe0c444 fetch 1 ,mem_24g_rxbuf + 2 
+00f4 c00080eb beq datatype_device1 ,p_dongle_g24_bind_ackpayload_prep 
+00f5 c07f80eb beq datatype_attemp ,p_dongle_g24_bind_ackpayload_prep 
+00f6 202051af branch dongle_g24_kb_led_ackpayload_prep + 3 
               org 0x3800
 
 start:
@@ -977,6 +1081,8 @@
 3a32 204039ed call set_tx_power_0db 
 3a33 708a9a2b jam 0x2b ,core_tx_mixer_cfg1 
 3a34 708a9b13 jam 0x13 ,core_tx_mixer_cfg2 
+
+initialize_radio_cont_next_2:
 3a35 20403a71 call init_lpm_ctrl 
 3a36 20000064 nop 100 
 3a37 70804205 jam clksel_dpll ,core_clksel 
Index: program/bt.prog
===================================================================
--- /1306ac/branch/dongle/usb_1M/program/bt.prog	(revision 500)
+++ /1306ac/branch/dongle/usb_1M/program/bt.prog	(working copy)
@@ -827,7 +827,7 @@
 	
 	jam 0x2b,core_tx_mixer_cfg1
 	jam 0x13,core_tx_mixer_cfg2
-
+initialize_radio_cont_next_2:
 	call init_lpm_ctrl
 	nop 100
 	jam clksel_dpll,core_clksel
Index: program/patch.prog
===================================================================
--- /1306ac/branch/dongle/usb_1M/program/patch.prog	(revision 500)
+++ /1306ac/branch/dongle/usb_1M/program/patch.prog	(working copy)
@@ -4,6 +4,7 @@
 	beq patch00_0,p_soft_reset
 //	beq patch02_5,p_set_freq_tx
 	beq patch02_7,p_txon_next
+	beq patch03_0,p_initialize_radio_cont
 	beq patch05_7,p_dongle_default_init
 	beq patch18_3,p_usb_init
 //	beq patch1c_3,p_le_enable_phy_by_pdata
@@ -47,20 +48,93 @@
 	jam TX_POWER_F47DB,mem_24g_pair_tx_power
 	jam OFF,mem_24g_disable_fec1
 	branch g24_enable_1M
+p_initialize_radio_cont:
+	jam 0x03,core_rx_lna_cfg3
+	jam 0,core_syn_loopdiv_dsm_cfg
+	jam 0x10,0x896f
+
+	//branch initialize_radio_cont+1
+	fetch 1,mem_wdt_always_work
+	call wdt_set_disable,blank
+
+	jam 0x05,core_clkpll_cfg0
+	jam 0x94,core_rx_iqadc_cfg
+	call initialize_rc_cal
+	call initialize_rf_ldo_cfg1
+	call initialize_syn_afc_cfg1
+	jam 0xe6,core_syn_aac_cfg1
+
+	//optimize RX SX pn
+	jam 0x90,core_syn_pfd_lkd_cfg
+	jam 0x0b,core_rf_ldo_cfg2
+	jam 0x05,core_rf_ldo_cfg3
+
+	//Improve auto agc
+	jam 0x76,core_agc_wb_sat_th
+	jam 0x76,core_agc_nb_sat_th
+
+	fetch 1,mem_fcomp_div
+	bne XTAL_16M,p_initialize_radio_cont_next
+	jam 0x34,core_clkpll_cfg5		//16M XTAL
+p_initialize_radio_cont_next:
+	jam 0xff,core_clkpll_ctrl1
+	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
+	branch initialize_radio_cont_next_2
+
 
 p_txon_next:
 	fetch 1,mem_tx_power
-	beq TX_POWER_F47DB,p_set_tx_power_f47db
-	beq TX_POWER_F50DB,p_set_tx_power_f50db
-	branch txon_next
+	beq TX_POWER_3DB,p_set_tx_power_3db
+	beq TX_POWER_6DB,p_set_tx_power_6db
+	beq TX_POWER_10DB,set_tx_power_10db
+	beq TX_POWER_F20DB,set_tx_power_f20db
+	beq TX_POWER_F30DB,set_tx_power_f30db
+	beq TX_POWER_FACTORY,set_tx_power_factory
+p_set_tx_power_0db:
+	jam 0x2c,0x8a3b
+	jam 0x17,0x8a3c
+	jam 0x8a,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+p_set_tx_power_3db:
+	jam 0x48,0x8a3b
+	branch p_set_tx_power_0db+1
+
+p_set_tx_power_6db:
+	jam 0x70,0x8a3b
+	jam 0x1f,0x8a3c
+	jam 0xc9,core_tx_pwr_ctrl0
+	branch p_set_tx_power_0db+3
+
+p_set_tx_power_f20db:
+	jam 0x85,core_tx_pwr_ctrl0
+	jam 0x04,core_tx_pwr_ctrl1
+	jam 0xa3,core_rf_ldo_cfg8	
+	jam 0x0a,core_rf_ldo_cfg9
+	jam 0x18,0x8a3b
+	jam 0x0f,0x8a3c
+	rtn
+p_set_tx_power_f30db:
+	jam 0x83,core_tx_pwr_ctrl0
+	jam 0x02,core_tx_pwr_ctrl1
+	branch p_set_tx_power_f20db+2
+
+	
 p_set_tx_power_f47db:
-	jam 0x43,core_tx_pwr_ctrl0
-	jam 0x00,core_tx_pwr_ctrl1
-	branch set_rf_ldo_cfg89
+	jam 0x82,core_tx_pwr_ctrl0
+	jam 0x01,core_tx_pwr_ctrl1
+	branch p_set_tx_power_f20db+2
 p_set_tx_power_f50db:
-	jam 0x42,core_tx_pwr_ctrl0
-	jam 0x00,core_tx_pwr_ctrl1
-	branch set_rf_ldo_cfg89	
+	jam 0x81,core_tx_pwr_ctrl0
+	jam 0x01,core_tx_pwr_ctrl1
+	branch p_set_tx_power_f20db+2
 /*	
 	fetch 1,mem_dg_sys_config
 	rtnbit0 DG_ENABLE_NEW_REVISION
@@ -69,6 +143,8 @@
 */	
 
 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
@@ -279,3 +355,33 @@
 	fetch 1,mem_24g_device2_bind_disable
 	nrtn blank
 	branch g24_data_attemp_device2
+p_dongle_ackpayload_prep:
+	fetch 1,mem_24g_data_type
+	beq DATATYPE_DEVICE1,p_dongle_ackpayload_prep_mouse
+	beq DATATYPE_DEVICE2,p_dongle_ackpayload_prep_keyboard
+p_dongle_ackpayload_prep_mouse:
+	fetch 1,mem_dg_pc_sleep_flag
+	bbit1 0,dongle_pc_sleep_ackpayload_prep_mouse
+	branch p_dongle_ackpayload_prep_end
+p_dongle_ackpayload_prep_keyboard:
+	fetch 1,mem_dg_pc_sleep_flag
+	bbit1 1,dongle_pc_sleep_ackpayload_prep_keyboard
+p_dongle_ackpayload_prep_end:
+	fetch 1,mem_24g_ackpayload_enable
+	beq BIND_ACKPAYLOAD,p_dongle_g24_bind_ackpayload_prep
+	beq KB_LED_ACKPAYLOAD,p_dongle_g24_kb_led_ackpayload_prep
+	rtn
+p_dongle_g24_bind_ackpayload_prep:
+	jam 1,mem_24g_ackpayload_enable
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	fetch 1,mem_24g_pair_mode	
+	nrtn blank	
+	call g24_binding_device_check+4	//works on auto pair only
+	nrtn user3
+	branch g24_bind_ackpayload_prep
+p_dongle_g24_kb_led_ackpayload_prep:
+	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	
