Index: output/eeprom.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/eeprom.dat	(revision 1947)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-0e
+16
 0b
 c2
 84
@@ -103,7 +103,7 @@
 c0
 37
 02
-78
+7a
 c0
 37
 81
@@ -111,19 +111,19 @@
 c0
 39
 02
-b8
+ba
 c0
 39
 82
-a1
+a5
 c0
 3a
 82
-84
+89
 c0
 40
 82
-67
+69
 c0
 41
 01
@@ -131,7 +131,7 @@
 c0
 42
 82
-91
+95
 c0
 44
 01
@@ -143,11 +143,11 @@
 c0
 45
 82
-94
+98
 c0
 4d
 82
-9a
+9e
 c1
 7f
 80
@@ -2067,7 +2067,7 @@
 6f
 e0
 c6
-98
+97
 79
 20
 7e
@@ -2075,7 +2075,7 @@
 67
 e0
 c6
-98
+97
 20
 40
 33
@@ -2440,18 +2440,26 @@
 e0
 c6
 97
+1f
+e9
+7e
+00
 67
 e0
 c5
 89
+67
+e0
+c6
+97
 20
 40
-32
-14
+02
+89
 6f
 e0
 c6
-98
+97
 2f
 ef
 fe
@@ -2479,7 +2487,7 @@
 20
 40
 02
-73
+75
 20
 40
 02
@@ -2532,22 +2540,6 @@
 20
 33
 22
-78
-58
-fc
-00
-28
-0f
-fe
-2f
-20
-40
-b1
-6f
-20
-38
-b1
-8a
 20
 40
 31
@@ -2558,12 +2550,16 @@
 97
 c5
 13
-b1
-48
+82
+82
 6f
 e0
 c6
 97
+1f
+e9
+7e
+00
 68
 48
 c5
@@ -2577,17 +2573,37 @@
 b1
 8c
 20
+40
+31
+7d
+e7
+e0
+80
+05
+1f
+e6
+7c
+44
+24
+21
+31
+8e
+1f
+e2
+72
+00
+20
+22
+b1
+54
+20
 20
 31
-48
+51
 6f
 e0
 c6
 98
-1f
-e9
-7e
-00
 67
 e0
 c5
@@ -2615,7 +2631,7 @@
 6f
 e0
 c6
-98
+97
 1f
 e3
 7e
@@ -2639,7 +2655,7 @@
 df
 20
 00
-42
+46
 20
 20
 7c
@@ -2699,14 +2715,6 @@
 6f
 e0
 c5
-b8
-c2
-81
-32
-06
-6f
-e0
-c5
 88
 1f
 e0
@@ -2728,14 +2736,6 @@
 e0
 c5
 89
-e7
-e0
-80
-05
-6f
-e0
-c5
-88
 1f
 e9
 fe
@@ -2772,6 +2772,14 @@
 e0
 c5
 88
+e7
+e0
+80
+05
+6f
+e0
+c5
+88
 98
 00
 72
@@ -2791,7 +2799,7 @@
 c5
 17
 82
-bd
+bf
 6f
 e0
 c5
@@ -2799,7 +2807,7 @@
 24
 3a
 02
-bd
+bf
 78
 4e
 fc
@@ -2832,8 +2840,8 @@
 20
 31
 b3
-91
-09
+3f
+b3
 aa
 55
 40
@@ -2931,7 +2939,7 @@
 00
 69
 46
-00
+01
 aa
 55
 01
@@ -3196,18 +3204,10 @@
 aa
 aa
 55
-08
+09
 4d
-e6
-7d
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+63
+3e
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-c5
-53
+f0
+17
Index: output/flash.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/flash.dat	(revision 1947)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/flash.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-0e
+16
 0b
 c2
 84
@@ -103,7 +103,7 @@
 c0
 37
 02
-78
+7a
 c0
 37
 81
@@ -111,19 +111,19 @@
 c0
 39
 02
-b8
+ba
 c0
 39
 82
-a1
+a5
 c0
 3a
 82
-84
+89
 c0
 40
 82
-67
+69
 c0
 41
 01
@@ -131,7 +131,7 @@
 c0
 42
 82
-91
+95
 c0
 44
 01
@@ -143,11 +143,11 @@
 c0
 45
 82
-94
+98
 c0
 4d
 82
-9a
+9e
 c1
 7f
 80
@@ -2067,7 +2067,7 @@
 6f
 e0
 c6
-98
+97
 79
 20
 7e
@@ -2075,7 +2075,7 @@
 67
 e0
 c6
-98
+97
 20
 40
 33
@@ -2440,18 +2440,26 @@
 e0
 c6
 97
+1f
+e9
+7e
+00
 67
 e0
 c5
 89
+67
+e0
+c6
+97
 20
 40
-32
-14
+02
+89
 6f
 e0
 c6
-98
+97
 2f
 ef
 fe
@@ -2479,7 +2487,7 @@
 20
 40
 02
-73
+75
 20
 40
 02
@@ -2532,22 +2540,6 @@
 20
 33
 22
-78
-58
-fc
-00
-28
-0f
-fe
-2f
-20
-40
-b1
-6f
-20
-38
-b1
-8a
 20
 40
 31
@@ -2558,12 +2550,16 @@
 97
 c5
 13
-b1
-48
+82
+82
 6f
 e0
 c6
 97
+1f
+e9
+7e
+00
 68
 48
 c5
@@ -2577,17 +2573,37 @@
 b1
 8c
 20
+40
+31
+7d
+e7
+e0
+80
+05
+1f
+e6
+7c
+44
+24
+21
+31
+8e
+1f
+e2
+72
+00
+20
+22
+b1
+54
+20
 20
 31
-48
+51
 6f
 e0
 c6
 98
-1f
-e9
-7e
-00
 67
 e0
 c5
@@ -2615,7 +2631,7 @@
 6f
 e0
 c6
-98
+97
 1f
 e3
 7e
@@ -2639,7 +2655,7 @@
 df
 20
 00
-42
+46
 20
 20
 7c
@@ -2699,14 +2715,6 @@
 6f
 e0
 c5
-b8
-c2
-81
-32
-06
-6f
-e0
-c5
 88
 1f
 e0
@@ -2728,14 +2736,6 @@
 e0
 c5
 89
-e7
-e0
-80
-05
-6f
-e0
-c5
-88
 1f
 e9
 fe
@@ -2772,6 +2772,14 @@
 e0
 c5
 88
+e7
+e0
+80
+05
+6f
+e0
+c5
+88
 98
 00
 72
@@ -2791,7 +2799,7 @@
 c5
 17
 82
-bd
+bf
 6f
 e0
 c5
@@ -2799,7 +2807,7 @@
 24
 3a
 02
-bd
+bf
 78
 4e
 fc
@@ -2832,8 +2840,8 @@
 20
 31
 b3
-91
-09
+3f
+b3
 aa
 55
 40
@@ -2931,7 +2939,7 @@
 00
 69
 46
-00
+01
 aa
 55
 01
@@ -3196,18 +3204,10 @@
 aa
 aa
 55
-08
+09
 4d
-e6
-7d
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+63
+3e
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-c5
-53
+f0
+17
Index: output/otp.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/otp.dat	(revision 1947)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/otp.dat	(working copy)
@@ -11,7 +11,7 @@
 00
 aa
 55
-0e
+16
 0b
 c2
 84
@@ -112,7 +112,7 @@
 c0
 37
 02
-78
+7a
 c0
 37
 81
@@ -120,19 +120,19 @@
 c0
 39
 02
-b8
+ba
 c0
 39
 82
-a1
+a5
 c0
 3a
 82
-84
+89
 c0
 40
 82
-67
+69
 c0
 41
 01
@@ -140,7 +140,7 @@
 c0
 42
 82
-91
+95
 c0
 44
 01
@@ -152,11 +152,11 @@
 c0
 45
 82
-94
+98
 c0
 4d
 82
-9a
+9e
 c1
 7f
 80
@@ -2076,7 +2076,7 @@
 6f
 e0
 c6
-98
+97
 79
 20
 7e
@@ -2084,7 +2084,7 @@
 67
 e0
 c6
-98
+97
 20
 40
 33
@@ -2449,18 +2449,26 @@
 e0
 c6
 97
+1f
+e9
+7e
+00
 67
 e0
 c5
 89
+67
+e0
+c6
+97
 20
 40
-32
-14
+02
+89
 6f
 e0
 c6
-98
+97
 2f
 ef
 fe
@@ -2488,7 +2496,7 @@
 20
 40
 02
-73
+75
 20
 40
 02
@@ -2541,22 +2549,6 @@
 20
 33
 22
-78
-58
-fc
-00
-28
-0f
-fe
-2f
-20
-40
-b1
-6f
-20
-38
-b1
-8a
 20
 40
 31
@@ -2567,12 +2559,16 @@
 97
 c5
 13
-b1
-48
+82
+82
 6f
 e0
 c6
 97
+1f
+e9
+7e
+00
 68
 48
 c5
@@ -2586,17 +2582,37 @@
 b1
 8c
 20
+40
+31
+7d
+e7
+e0
+80
+05
+1f
+e6
+7c
+44
+24
+21
+31
+8e
+1f
+e2
+72
+00
+20
+22
+b1
+54
+20
 20
 31
-48
+51
 6f
 e0
 c6
 98
-1f
-e9
-7e
-00
 67
 e0
 c5
@@ -2624,7 +2640,7 @@
 6f
 e0
 c6
-98
+97
 1f
 e3
 7e
@@ -2648,7 +2664,7 @@
 df
 20
 00
-42
+46
 20
 20
 7c
@@ -2708,14 +2724,6 @@
 6f
 e0
 c5
-b8
-c2
-81
-32
-06
-6f
-e0
-c5
 88
 1f
 e0
@@ -2737,14 +2745,6 @@
 e0
 c5
 89
-e7
-e0
-80
-05
-6f
-e0
-c5
-88
 1f
 e9
 fe
@@ -2781,6 +2781,14 @@
 e0
 c5
 88
+e7
+e0
+80
+05
+6f
+e0
+c5
+88
 98
 00
 72
@@ -2800,7 +2808,7 @@
 c5
 17
 82
-bd
+bf
 6f
 e0
 c5
@@ -2808,7 +2816,7 @@
 24
 3a
 02
-bd
+bf
 78
 4e
 fc
@@ -2841,8 +2849,8 @@
 20
 31
 b3
-91
-09
+3f
+b3
 aa
 55
 40
@@ -2940,7 +2948,7 @@
 00
 69
 46
-00
+01
 aa
 55
 01
@@ -3205,8 +3213,8 @@
 aa
 aa
 55
-08
+09
 4d
-e6
-7d
-f0
+63
+3e
+20
Index: output/program.lis
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/program.lis	(revision 1947)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/output/program.lis	(working copy)
@@ -26,18 +26,18 @@
 0015 c0030125 beq patch20_6 ,p_usb_tx 
 0016 c01c81b4 beq patch27_1 ,p_le_parse 
 0017 c02681b8 beq patch29_5 ,p_le_init_adv 
-0018 c0370278 beq patch2d_6 ,p_g24_receive_update_rxbuff 
+0018 c037027a beq patch2d_6 ,p_g24_receive_update_rxbuff 
 0019 c03781ff beq patch2d_7 ,p_g24_receive_skip_end 
-001a c03902b8 beq patch2e_2 ,p_g24_transmit_packet 
-001b c03982a1 beq patch2e_3 ,p_g24_transmit_prep 
-001c c03a8284 beq patch2e_5 ,p_g24_read_len_pid_crc 
-001d c0408267 beq patch30_1 ,p_g24_bind_data_process 
+001a c03902ba beq patch2e_2 ,p_g24_transmit_packet 
+001b c03982a5 beq patch2e_3 ,p_g24_transmit_prep 
+001c c03a8289 beq patch2e_5 ,p_g24_read_len_pid_crc 
+001d c0408269 beq patch30_1 ,p_g24_bind_data_process 
 001e c04101ba beq patch30_2 ,p_g24_bind_data_parse_next 
-001f c0428291 beq patch30_5 ,p_g24_rx_interrupt_clear 
+001f c0428295 beq patch30_5 ,p_g24_rx_interrupt_clear 
 0020 c04401da beq patch31_0 ,p_g24_mode_switch_bind_search 
 0021 c04501e7 beq patch31_2 ,p_g24_bind_mode_auto 
-0022 c0458294 beq patch31_3 ,p_g24_search_mode_auto 
-0023 c04d829a beq patch33_3 ,p_g24_ackpayload_parse 
+0022 c0458298 beq patch31_3 ,p_g24_search_mode_auto 
+0023 c04d829e beq patch33_3 ,p_g24_ackpayload_parse 
 0024 c17f8000 rtneq patch3f_7 
 0025 2020235a branch assert 
 
@@ -647,9 +647,9 @@
 0200 c3003165 bbit0 dg_enable_new_revision ,g24_receive_skip_end + 1 
 0201 7837fc00 enable user3 
 0202 20000018 nop 24 
-0203 6fe0c698 fetch 1 ,mem_24g_rxbuf_new + 1 
+0203 6fe0c697 fetch 1 ,mem_24g_rxbuf_new 
 0204 79207e00 set1 bit_ack_24g ,pdata 
-0205 67e0c698 store 1 ,mem_24g_rxbuf_new + 1 
+0205 67e0c697 store 1 ,mem_24g_rxbuf_new 
 0206 204033a5 call g24_ackpayload_prep 
 0207 204031e5 call g24_transmit_prep 
 0208 20203195 branch g24_transmit 
@@ -777,98 +777,98 @@
 
 p_g24_transmit_ack:
 0260 6fe0c697 fetch 1 ,mem_24g_rxbuf_new 
-0261 67e0c589 store 1 ,mem_24g_data_type 
-0262 20403214 call g24_read_len_pid_crc 
-0263 6fe0c698 fetch 1 ,mem_24g_rxbuf_new + 1 
-0264 2feffe00 isolate1 bit_ack_24g ,pdata 
-0265 2020b3fd branch g24tx_no_ack ,true 
-0266 202033fa branch g24tx_with_ack 
+0261 1fe97e00 rshift3 pdata ,pdata 
+0262 67e0c589 store 1 ,mem_24g_data_type 
+0263 67e0c697 store 1 ,mem_24g_rxbuf_new 
+0264 20400289 call p_g24_read_len_pid_crc 
+0265 6fe0c697 fetch 1 ,mem_24g_rxbuf_new 
+0266 2feffe00 isolate1 bit_ack_24g ,pdata 
+0267 2020b3fd branch g24tx_no_ack ,true 
+0268 202033fa branch g24tx_with_ack 
 
 p_g24_bind_data_process:
-0267 204033be call g24_rx_interrupt_clear 
-0268 20403119 call g24_receive_packet 
-0269 2437b3be nbranch g24_rx_interrupt_clear ,user3 
-026a 20400273 call p_g24_bind_data_parse 
-026b 20400260 call p_g24_transmit_ack 
-026c 20403399 call g24_bind_device_status_check 
-026d 2040493d call dongle_kb_bind_soft_reset 
-026e 6fe0c5ae fetch 1 ,mem_24g_pair_switch 
-026f 207a0000 rtn blank 
-0270 6fe2462c fetch 4 ,mem_24g_transmitter_addr 
+0269 204033be call g24_rx_interrupt_clear 
+026a 20403119 call g24_receive_packet 
+026b 2437b3be nbranch g24_rx_interrupt_clear ,user3 
+026c 20400275 call p_g24_bind_data_parse 
+026d 20400260 call p_g24_transmit_ack 
+026e 20403399 call g24_bind_device_status_check 
+026f 2040493d call dongle_kb_bind_soft_reset 
+0270 6fe0c5ae fetch 1 ,mem_24g_pair_switch 
 0271 207a0000 rtn blank 
-0272 20203236 branch g24_update_addr_and_synccrc8 
+0272 6fe2462c fetch 4 ,mem_24g_transmitter_addr 
+0273 207a0000 rtn blank 
+0274 20203236 branch g24_update_addr_and_synccrc8 
 
 p_g24_bind_data_parse:
-0273 70462205 jam bind_mode_continue ,mem_24g_bind_mode_continue 
-0274 d8c04697 arg mem_24g_rxbuf_new ,contr 
-0275 d8a045e8 arg mem_24g_rxdata_temp ,contw 
-0276 20407c89 call memcpy8 
-0277 20203322 branch g24_bind_data_parse_next 
+0275 70462205 jam bind_mode_continue ,mem_24g_bind_mode_continue 
+0276 d8c04697 arg mem_24g_rxbuf_new ,contr 
+0277 d8a045e8 arg mem_24g_rxdata_temp ,contw 
+0278 20407c89 call memcpy8 
+0279 20203322 branch g24_bind_data_parse_next 
 
 p_g24_receive_update_rxbuff:
-0278 7858fc00 disable user7 
-0279 280ffe2f isolate1 mark_ble_lr ,mark 
-027a 2040b16f call g24_lr_receive_pdu_len ,true 
-027b 2038b18a branch g24_lr_len_error ,user7 
-027c 2040317d call g24_receive_byte 
-027d 67e0c697 store 1 ,mem_24g_rxbuf_new 
-027e c513b148 bmark1 mark_24g_rxmode ,g24_receive_skip 
-027f 6fe0c697 fetch 1 ,mem_24g_rxbuf_new 
-0280 6848c589 fetcht 1 ,mem_24g_data_type 
-0281 a8400e00 icompare bits_data ,temp 
-0282 2420b18c nbranch g24_type_error ,true 
-0283 20203148 branch g24_receive_skip 
+027a 2040317d call g24_receive_byte 
+027b 67e0c697 store 1 ,mem_24g_rxbuf_new 
+027c c5138282 bmark1 mark_24g_rxmode ,p_g24_receive_skip 
+027d 6fe0c697 fetch 1 ,mem_24g_rxbuf_new 
+027e 1fe97e00 rshift3 pdata ,pdata 
+027f 6848c589 fetcht 1 ,mem_24g_data_type 
+0280 a8400e00 icompare bits_data ,temp 
+0281 2420b18c nbranch g24_type_error ,true 
+
+p_g24_receive_skip:
+0282 2040317d call g24_receive_byte 
+0283 e7e08005 istore 1 ,contw 
+0284 1fe67c44 sub pdata ,68 ,null 
+0285 2421318e nbranch g24_len_over_error ,positive 
+0286 1fe27200 copy pdata ,loopcnt 
+0287 2022b154 branch g24rx_nopayload ,zero 
+0288 20203151 branch g24rx_loop 
 
 p_g24_read_len_pid_crc:
-0284 6fe0c698 fetch 1 ,mem_24g_rxbuf_new + 1 
-0285 1fe97e00 rshift3 pdata ,pdata 
-0286 67e0c57d store 1 ,mem_24g_rxdata_length 
-0287 1fe0fe01 increase 1 ,pdata 
-0288 d8c04698 arg mem_24g_rxbuf_new + 1 ,contr 
-0289 98c08c00 iadd contr ,contr 
-028a efe18006 ifetch 3 ,contr 
-028b 67e1c580 store 3 ,mem_24g_sta_crc 
-028c 6fe0c698 fetch 1 ,mem_24g_rxbuf_new + 1 
-028d 1fe37e00 rshift pdata ,pdata 
-028e 1fe17e03 and pdata ,0x03 ,pdata 
-028f 67e0c586 store 1 ,mem_24g_sta_pid 
-0290 20600000 rtn 
+0289 6fe0c698 fetch 1 ,mem_24g_rxbuf_new + 1 
+028a 67e0c57d store 1 ,mem_24g_rxdata_length 
+028b 1fe0fe01 increase 1 ,pdata 
+028c d8c04698 arg mem_24g_rxbuf_new + 1 ,contr 
+028d 98c08c00 iadd contr ,contr 
+028e efe18006 ifetch 3 ,contr 
+028f 67e1c580 store 3 ,mem_24g_sta_crc 
+0290 6fe0c697 fetch 1 ,mem_24g_rxbuf_new 
+0291 1fe37e00 rshift pdata ,pdata 
+0292 1fe17e03 and pdata ,0x03 ,pdata 
+0293 67e0c586 store 1 ,mem_24g_sta_pid 
+0294 20600000 rtn 
 
 p_g24_rx_interrupt_clear:
-0291 d8a04697 arg mem_24g_rxbuf_new ,contw 
-0292 df200042 arg 66 ,loopcnt 
-0293 20207ca1 branch clear_mem 
+0295 d8a04697 arg mem_24g_rxbuf_new ,contw 
+0296 df200046 arg 70 ,loopcnt 
+0297 20207ca1 branch clear_mem 
 
 p_g24_search_mode_auto:
-0294 6fe0c616 fetch 1 ,mem_24g_work_mode 
-0295 c1838000 rtnne dongle_search 
-0296 20403476 call g24_search_mode_init 
-0297 204034ae call g24_auto_addr_ch_search 
-0298 2040025d call p_g24_receive_transmit_ack 
-0299 2020348e branch g24_search_mode_auto + 6 
+0298 6fe0c616 fetch 1 ,mem_24g_work_mode 
+0299 c1838000 rtnne dongle_search 
+029a 20403476 call g24_search_mode_init 
+029b 204034ae call g24_auto_addr_ch_search 
+029c 2040025d call p_g24_receive_transmit_ack 
+029d 2020348e branch g24_search_mode_auto + 6 
 
 p_g24_ackpayload_parse:
-029a 20403214 call g24_read_len_pid_crc 
-029b 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
-029c 207a0000 rtn blank 
-029d 98007200 iforce loopcnt 
-029e d8c04699 arg mem_24g_rxbuf_new + 2 ,contr 
-029f d8a04769 arg mem_24g_rxpayload_new ,contw 
-02a0 20207cda branch memcpy 
+029e 20403214 call g24_read_len_pid_crc 
+029f 6fe0c57d fetch 1 ,mem_24g_rxdata_length 
+02a0 207a0000 rtn blank 
+02a1 98007200 iforce loopcnt 
+02a2 d8c04699 arg mem_24g_rxbuf_new + 2 ,contr 
+02a3 d8a04769 arg mem_24g_rxpayload_new ,contw 
+02a4 20207cda branch memcpy 
 
 p_g24_transmit_prep:
-02a1 6fe0c5b8 fetch 1 ,mem_24g_tx_phy 
-02a2 c2813206 bbit1 bit_le_coded_phy ,g24_lr_transmit_prep 
-02a3 6fe0c588 fetch 1 ,mem_24g_datalen 
-02a4 1fe0fe03 increase 3 ,pdata 
-02a5 67e0c58a store 1 ,mem_24g_txlen 
-02a6 6fe0c5ac fetch 1 ,mem_24g_syncword_crc8 
-02a7 67e0c723 store 1 ,mem_24g_txpayload_new 
-02a8 6fe0c589 fetch 1 ,mem_24g_data_type 
-02a9 e7e08005 istore 1 ,contw 
-02aa 6fe0c588 fetch 1 ,mem_24g_datalen 
-
-p_g24_transmit_prep_pdu:
+02a5 6fe0c588 fetch 1 ,mem_24g_datalen 
+02a6 1fe0fe03 increase 3 ,pdata 
+02a7 67e0c58a store 1 ,mem_24g_txlen 
+02a8 6fe0c5ac fetch 1 ,mem_24g_syncword_crc8 
+02a9 67e0c723 store 1 ,mem_24g_txpayload_new 
+02aa 6fe0c589 fetch 1 ,mem_24g_data_type 
 02ab 1fe9fe00 lshift3 pdata ,pdata 
 02ac 6848c57e fetcht 1 ,mem_24g_pid 
 02ad 18410403 and temp ,0x03 ,temp 
@@ -878,25 +878,27 @@
 02b1 9840fe00 iadd temp ,pdata 
 02b2 e7e08005 istore 1 ,contw 
 02b3 6fe0c588 fetch 1 ,mem_24g_datalen 
-02b4 98007200 iforce loopcnt 
-02b5 d8c046dd arg mem_24g_txbuf_new ,contr 
-02b6 20407cda call memcpy 
-02b7 202031fc branch g24_transmit_prep_pdu_end 
+02b4 e7e08005 istore 1 ,contw 
+02b5 6fe0c588 fetch 1 ,mem_24g_datalen 
+02b6 98007200 iforce loopcnt 
+02b7 d8c046dd arg mem_24g_txbuf_new ,contr 
+02b8 20407cda call memcpy 
+02b9 202031fc branch g24_transmit_prep_pdu_end 
 
 p_g24_transmit_packet:
-02b8 c51782bd bmark1 mark_ble_lr ,p_g24_transmit_nolr 
-02b9 6fe0c5ca fetch 1 ,mem_24g_disable_fec1 
-02ba 243a02bd nbranch p_g24_transmit_nolr ,blank 
-02bb 784efc00 disable encode_fec0 
-02bc 782dfc00 enable encode_fec1 
+02ba c51782bf bmark1 mark_ble_lr ,p_g24_transmit_nolr 
+02bb 6fe0c5ca fetch 1 ,mem_24g_disable_fec1 
+02bc 243a02bf nbranch p_g24_transmit_nolr ,blank 
+02bd 784efc00 disable encode_fec0 
+02be 782dfc00 enable encode_fec1 
 
 p_g24_transmit_nolr:
-02bd 7823fc00 enable enable_white 
-02be 7824fc00 enable enable_crc 
-02bf 6fe0c58a fetch 1 ,mem_24g_txlen 
-02c0 98007200 iforce loopcnt 
-02c1 d8c04723 arg mem_24g_txpayload_new ,contr 
-02c2 202031b3 branch g24tr_loop 
+02bf 7823fc00 enable enable_white 
+02c0 7824fc00 enable enable_crc 
+02c1 6fe0c58a fetch 1 ,mem_24g_txlen 
+02c2 98007200 iforce loopcnt 
+02c3 d8c04723 arg mem_24g_txpayload_new ,contr 
+02c4 202031b3 branch g24tr_loop 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/program/patch.prog	(revision 1947)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/program/patch.prog	(working copy)
@@ -666,9 +666,9 @@
 	bbit0 DG_ENABLE_NEW_REVISION,g24_receive_skip_end+1
 	enable user3
 	nop 24
-	fetch 1,mem_24g_rxbuf_new+1
+	fetch 1,mem_24g_rxbuf_new
 	set1 bit_ack_24g,pdata
-	store 1,mem_24g_rxbuf_new+1	//sending ack once	
+	store 1,mem_24g_rxbuf_new	//sending ack once	
 	call g24_ackpayload_prep
 	call g24_transmit_prep
 	branch g24_transmit
@@ -793,11 +793,13 @@
 p_g24_transmit_ack:
 //data type
 	fetch 1,mem_24g_rxbuf_new
+	rshift3 pdata,pdata
 	store 1,mem_24g_data_type
+	store 1,mem_24g_rxbuf_new	//fixed rx_temp+2 need rshift3
 //read len pid crc
-	call g24_read_len_pid_crc
+	call p_g24_read_len_pid_crc
 //read ack
-	fetch 1,mem_24g_rxbuf_new+1
+	fetch 1,mem_24g_rxbuf_new
 	isolate1 bit_ack_24g,pdata
 	branch g24tx_no_ack,true
 	branch g24tx_with_ack
@@ -829,23 +831,26 @@
 	branch g24_bind_data_parse_next
 
 p_g24_receive_update_rxbuff:
-	disable user7
-	isolate1 mark_ble_lr,mark
-	call g24_lr_receive_pdu_len,true
-	branch g24_lr_len_error,user7
 	call g24_receive_byte
-	store 1,mem_24g_rxbuf_new	//device id
-	bmark1 mark_24g_rxmode,g24_receive_skip
+	store 1,mem_24g_rxbuf_new
+	bmark1 mark_24g_rxmode,p_g24_receive_skip
 	fetch 1,mem_24g_rxbuf_new
+	rshift3 pdata,pdata				//device id
 	fetcht 1,mem_24g_data_type
 	icompare bits_data,temp
 	nbranch g24_type_error,true
-	branch g24_receive_skip
+p_g24_receive_skip:
+	call g24_receive_byte
+	istore 1,contw
+	sub pdata,68,null
+	nbranch g24_len_over_error,positive	//max payload: 68bytes
+	copy pdata,loopcnt
+	branch g24rx_nopayload,zero
+	branch g24rx_loop
 
 p_g24_read_len_pid_crc:
 //read control
 	fetch 1,mem_24g_rxbuf_new+1
-	rshift3 pdata,pdata
 	store 1,mem_24g_rxdata_length
 //get crc
 	increase 1,pdata
@@ -854,7 +859,7 @@
 	ifetch 3,contr
 	store 3,mem_24g_sta_crc
 //read pid
-	fetch 1,mem_24g_rxbuf_new+1
+	fetch 1,mem_24g_rxbuf_new
 	rshift pdata,pdata
 	and pdata,0x03,pdata
 	store 1,mem_24g_sta_pid
@@ -862,7 +867,7 @@
 
 p_g24_rx_interrupt_clear:
 	arg mem_24g_rxbuf_new,contw
-	arg 66,loopcnt
+	arg 70,loopcnt
 	branch clear_mem
 
 
@@ -884,21 +889,15 @@
 	branch memcpy
 
 p_g24_transmit_prep:
-	fetch 1,mem_24g_tx_phy
-	bbit1 BIT_LE_CODED_PHY,g24_lr_transmit_prep
 // total length
 	fetch 1,mem_24g_datalen
-	increase 3,pdata	//hec/type/control
+	increase 3,pdata	//hec/data_type/data_len
 	store 1,mem_24g_txlen
 //hec
 	fetch 1,mem_24g_syncword_crc8
 	store 1,mem_24g_txpayload_new
-// data type
+// prepare 5bit data type, 2bit PID, 1bit NO_ACK
 	fetch 1,mem_24g_data_type
-	istore 1,contw
-//prepare 5bit payload length, 2bit PID, 1bit NO_ACK
-	fetch 1,mem_24g_datalen
-p_g24_transmit_prep_pdu:
 	lshift3 pdata,pdata
 	fetcht 1,mem_24g_pid
 	and temp,0x03,temp
@@ -907,6 +906,8 @@
 	fetcht 1,mem_24g_no_ack
 	iadd temp,pdata
 	istore 1,contw
+	fetch 1,mem_24g_datalen
+	istore 1,contw
 //prepare payload data
 	fetch 1,mem_24g_datalen
 	iforce loopcnt
@@ -1073,4 +1074,4 @@
 	istore 1,contwu
 	branch uarta_send
 
-endif	
\ No newline at end of file
+endif	
Index: sched/dongle.dat
===================================================================
--- /branch/keyboard/customer_FW/RY_project/RY_Dongle/sched/dongle.dat	(revision 1947)
+++ /branch/keyboard/customer_FW/RY_project/RY_Dongle/sched/dongle.dat	(working copy)
@@ -11,7 +11,7 @@
 #bit4:enable kb icon
 #bit3:enable 24g 2M
 #bit2-0:retention
-mem_dg_sys_config:00  #24M
+mem_dg_sys_config:01  #24M
 
 #24g new process #default value 00,if need new process set value 01
 #mem_24g_disable_fec1:00
