Index: output/otp.dat
===================================================================
--- /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/output/otp.dat	(revision 3063)
+++ /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/output/otp.dat	(working copy)
@@ -11,100 +11,112 @@
 00
 aa
 55
-fa
-09
+d6
+0a
 c2
 84
 00
-13
+15
+c0
+00
+00
+1c
 c0
 01
 00
-7f
+b8
 c0
 08
 80
-88
+c1
 c0
 0a
 02
-3d
+74
 c0
 0a
 81
-0f
+4d
 c0
 0c
 01
-1d
+5b
 c0
 0c
-80
-dc
+81
+1a
 c0
 0d
 00
-96
+d3
 c0
 12
 82
-5f
+96
+c0
+13
+80
+47
 c0
 51
 80
-23
+5c
 c0
 52
 80
-69
+a2
 c0
 53
 00
-19
+52
 c0
 55
 00
-58
+91
 c0
 56
 00
-57
+90
 c0
 58
 81
-3c
+7a
 c0
 62
 81
-24
+62
 c0
 6d
 02
-0e
+45
 c0
 6e
 02
-1e
+55
 20
 20
 23
 5a
 c0
 12
+00
+20
+c0
+12
 80
-40
+79
 c0
 13
 00
-45
+7e
 c0
 1c
 82
-59
+90
 c0
 26
 82
-5d
+94
 c1
 7f
 80
@@ -113,10 +125,226 @@
 20
 23
 5a
+24
+35
+a0
+02
+37
+d9
+82
+00
+37
+d9
+82
+00
+20
+20
+20
+02
 20
 40
+25
+c2
+c5
+97
+80
+26
+78
+3c
+fc
+00
+20
+00
 00
 1e
+20
+40
+25
+c2
+19
+69
+96
+00
+78
+56
+fc
+00
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+19
+62
+36
+00
+37
+c1
+84
+00
+20
+37
+00
+2f
+1b
+42
+04
+00
+60
+4b
+00
+0f
+24
+2c
+26
+fa
+78
+28
+7c
+00
+6f
+e0
+c1
+67
+d8
+40
+4e
+20
+98
+40
+84
+00
+6f
+e0
+c1
+48
+98
+4f
+b6
+00
+20
+40
+68
+77
+20
+37
+26
+77
+20
+40
+00
+3d
+6f
+e0
+81
+68
+c3
+01
+a6
+77
+20
+55
+a4
+77
+20
+20
+26
+77
+68
+4b
+00
+0f
+1b
+42
+7e
+00
+20
+40
+7d
+12
+1f
+e2
+04
+00
+20
+40
+26
+ff
+1b
+42
+56
+00
+1d
+22
+7e
+00
+98
+40
+fe
+00
+1f
+e2
+52
+00
+20
+60
+00
+00
+c5
+84
+a4
+89
+68
+4a
+40
+ad
+df
+e0
+06
+00
+98
+46
+7c
+00
+20
+61
+00
+00
+18
+42
+22
+00
+68
+4b
+00
+0f
+1d
+62
+7e
+00
+20
+40
+7d
+10
+1a
+22
+04
+00
+20
+20
+24
+7d
+20
+40
+00
+57
 6f
 e0
 ce
@@ -196,7 +424,7 @@
 24
 42
 80
-36
+6f
 6f
 e0
 ce
@@ -204,7 +432,7 @@
 24
 5a
 00
-31
+6a
 20
 20
 65
@@ -216,7 +444,7 @@
 c0
 03
 00
-34
+6d
 20
 60
 00
@@ -236,7 +464,7 @@
 20
 3a
 00
-39
+72
 20
 20
 65
@@ -248,7 +476,7 @@
 20
 3a
 00
-3c
+75
 20
 20
 64
@@ -384,7 +612,7 @@
 c0
 00
 80
-5e
+97
 20
 20
 66
@@ -400,7 +628,7 @@
 c0
 03
 00
-62
+9b
 20
 60
 00
@@ -408,7 +636,7 @@
 20
 40
 00
-64
+9d
 20
 20
 67
@@ -492,7 +720,7 @@
 24
 3a
 00
-79
+b2
 20
 20
 65
@@ -556,7 +784,7 @@
 20
 20
 00
-7f
+b8
 70
 8a
 0f
@@ -613,6 +841,22 @@
 60
 00
 00
+37
+d9
+82
+00
+70
+81
+3c
+58
+37
+d9
+82
+00
+20
+60
+00
+00
 70
 01
 bb
@@ -655,8 +899,8 @@
 fe
 20
 40
-00
-e4
+01
+22
 6f
 e0
 c4
@@ -665,6 +909,10 @@
 5a
 70
 d7
+24
+55
+80
+cf
 37
 d9
 82
@@ -679,8 +927,8 @@
 99
 c0
 08
-00
-d1
+01
+0f
 6f
 e0
 c4
@@ -723,8 +971,8 @@
 3b
 20
 40
-00
-c3
+01
+01
 70
 80
 43
@@ -747,16 +995,16 @@
 6e
 20
 40
-01
-e0
+02
+17
 20
 40
 02
-0b
+42
 20
 40
 00
-bd
+fb
 70
 41
 48
@@ -768,7 +1016,7 @@
 20
 20
 02
-0d
+44
 20
 75
 80
@@ -799,8 +1047,8 @@
 99
 c0
 0c
-00
-c9
+01
+07
 6f
 e0
 c4
@@ -892,15 +1140,15 @@
 20
 20
 00
-af
+ed
 6f
 e0
 c1
 41
 c0
 05
-00
-df
+01
+1d
 20
 20
 22
@@ -928,7 +1176,7 @@
 20
 35
 81
-0b
+49
 6f
 e2
 02
@@ -1095,8 +1343,8 @@
 0f
 20
 20
-00
-f5
+01
+33
 20
 40
 68
@@ -1204,7 +1452,7 @@
 20
 40
 01
-2c
+6a
 20
 40
 70
@@ -1248,7 +1496,7 @@
 20
 22
 81
-37
+75
 1f
 e2
 04
@@ -1256,7 +1504,7 @@
 20
 40
 01
-3a
+78
 1a
 20
 a2
@@ -1264,7 +1512,7 @@
 c2
 00
 01
-31
+6f
 20
 60
 00
@@ -1277,38 +1525,6 @@
 20
 6e
 dd
-70
-8a
-00
-9f
-70
-8a
-16
-fe
-6f
-f0
-81
-38
-79
-3f
-fe
-03
-79
-3f
-fe
-05
-79
-3f
-fe
-06
-67
-f0
-81
-38
-37
-d9
-82
-00
 20
 40
 73
@@ -1317,6 +1533,10 @@
 75
 80
 00
+70
+40
+a6
+0a
 20
 40
 64
@@ -1328,7 +1548,7 @@
 58
 00
 01
-9c
+d3
 67
 e1
 43
@@ -1336,7 +1556,7 @@
 58
 00
 01
-79
+b0
 67
 e1
 43
@@ -1344,7 +1564,7 @@
 58
 00
 01
-8e
+c5
 67
 e1
 43
@@ -1360,7 +1580,7 @@
 58
 00
 01
-27
+65
 67
 e1
 43
@@ -1376,7 +1596,7 @@
 58
 00
 01
-72
+a9
 67
 e1
 43
@@ -1392,7 +1612,7 @@
 20
 40
 01
-5a
+95
 20
 20
 64
@@ -1416,7 +1636,7 @@
 58
 00
 01
-68
+9f
 67
 e1
 45
@@ -1464,7 +1684,7 @@
 20
 40
 01
-6c
+a3
 20
 20
 63
@@ -1528,15 +1748,15 @@
 c0
 0a
 01
-80
+b7
 c0
 0a
 81
-7e
+b5
 c0
 20
 01
-85
+bc
 20
 20
 64
@@ -1544,7 +1764,7 @@
 20
 40
 01
-6c
+a3
 20
 20
 64
@@ -1560,7 +1780,7 @@
 20
 40
 01
-6f
+a6
 20
 40
 67
@@ -1592,7 +1812,7 @@
 24
 3a
 01
-99
+d0
 6f
 e4
 4f
@@ -1612,7 +1832,7 @@
 c0
 12
 01
-91
+c8
 20
 60
 00
@@ -1636,7 +1856,7 @@
 24
 3a
 01
-99
+d0
 6f
 e4
 4f
@@ -1700,7 +1920,7 @@
 20
 20
 01
-a6
+dd
 6f
 e1
 48
@@ -1764,7 +1984,7 @@
 20
 40
 01
-c3
+fa
 6f
 e1
 06
@@ -1812,7 +2032,7 @@
 c2
 00
 01
-af
+e6
 20
 60
 00
@@ -1855,8 +2075,8 @@
 00
 20
 20
-01
-cd
+02
+04
 1a
 60
 8c
@@ -1867,8 +2087,8 @@
 06
 20
 20
-01
-d0
+02
+07
 20
 40
 65
@@ -1891,8 +2111,8 @@
 00
 20
 40
-01
-d7
+02
+0e
 20
 20
 65
@@ -1983,8 +2203,8 @@
 06
 20
 40
-01
-fd
+02
+34
 2a
 2f
 fe
@@ -2015,8 +2235,8 @@
 1e
 20
 40
-01
-fd
+02
+34
 d8
 a0
 8a
@@ -2043,8 +2263,8 @@
 ff
 20
 21
-01
-f2
+02
+29
 20
 20
 21
@@ -2148,7 +2368,7 @@
 20
 40
 02
-36
+6d
 70
 8a
 08
@@ -2184,7 +2404,7 @@
 20
 40
 02
-2c
+63
 6f
 f0
 8a
@@ -2228,7 +2448,7 @@
 20
 40
 02
-36
+6d
 70
 80
 cd
@@ -2288,7 +2508,7 @@
 c3
 02
 82
-37
+6e
 68
 59
 01
@@ -2324,7 +2544,7 @@
 c0
 08
 02
-56
+8d
 58
 00
 57
@@ -2368,7 +2588,7 @@
 c0
 08
 02
-53
+8a
 58
 00
 2b
@@ -2404,7 +2624,7 @@
 20
 20
 02
-4f
+86
 58
 00
 83
@@ -2416,7 +2636,7 @@
 20
 20
 02
-44
+7b
 6f
 e0
 c3
@@ -2464,7 +2684,7 @@
 20
 40
 02
-66
+9d
 20
 20
 24
@@ -2536,7 +2756,7 @@
 20
 22
 82
-79
+b0
 e7
 e0
 80
@@ -2556,7 +2776,7 @@
 c2
 00
 02
-73
+aa
 1a
 42
 04
@@ -2565,19 +2785,19 @@
 60
 00
 00
-e3
-7f
+8a
+12
 aa
 55
 40
 00
 00
 40
-04
+05
 00
 32
 07
-20
+a0
 00
 00
 00
@@ -2609,7 +2829,7 @@
 00
 00
 00
-60
+70
 00
 00
 02
@@ -2665,17 +2885,16 @@
 2a
 aa
 55
-07
+06
 00
 6b
 42
-06
-42
+05
+5a
 4c
-45
-5f
-4d
-33
+2d
+30
+37
 aa
 55
 08
@@ -4710,7 +4929,7 @@
 9a
 40
 00
-0c
+30
 aa
 55
 05
@@ -4810,7 +5029,7 @@
 aa
 aa
 55
-52
+8d
 57
-33
-47
+99
+bd
Index: output/ramcode.rom
===================================================================
--- /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/output/ramcode.rom	(revision 3063)
+++ /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/output/ramcode.rom	(working copy)
@@ -1,29 +1,86 @@
-c2840013
-c001007f
-c0088088
-c00a023d
-c00a810f
-c00c011d
-c00c80dc
-c00d0096
-c012825f
-c0518023
-c0528069
-c0530019
-c0550058
-c0560057
-c058813c
-c0628124
-c06d020e
-c06e021e
+c2840015
+c000001c
+c00100b8
+c00880c1
+c00a0274
+c00a814d
+c00c015b
+c00c811a
+c00d00d3
+c0128296
+c0138047
+c051805c
+c05280a2
+c0530052
+c0550091
+c0560090
+c058817a
+c0628162
+c06d0245
+c06e0255
 2020235a
-c0128040
-c0130045
-c01c8259
-c026825d
+c0120020
+c0128079
+c013007e
+c01c8290
+c0268294
 c17f8000
 2020235a
-2040001e
+2435a002
+37d98200
+37d98200
+20202002
+204025c2
+c5978026
+783cfc00
+2000001e
+204025c2
+19699600
+7856fc00
+7826fc00
+7830fc00
+78507c00
+19623600
+37c18400
+2037002f
+1b420400
+604b000f
+242c26fa
+78287c00
+6fe0c167
+d8404e20
+98408400
+6fe0c148
+984fb600
+20406877
+20372677
+2040003d
+6fe08168
+c301a677
+2055a477
+20202677
+684b000f
+1b427e00
+20407d12
+1fe20400
+204026ff
+1b425600
+1d227e00
+9840fe00
+1fe25200
+20600000
+c584a489
+684a40ad
+dfe00600
+98467c00
+20610000
+18422200
+684b000f
+1d627e00
+20407d10
+1a220400
+2020247d
+20400057
 6fe0cec7
 c00065a2
 c000e5a5
@@ -43,20 +100,20 @@
 18e27e00
 6848cec5
 98467c00
-24428036
+2442806f
 6fe0cec9
-245a0031
+245a006a
 20206515
 18e27e00
-c0030034
+c003006d
 20600000
 704ec900
 20204325
 6fe0cec9
-203a0039
+203a0072
 20206529
 20406730
-203a003c
+203a0075
 202064c5
 18e27e00
 2fe00e01
@@ -90,13 +147,13 @@
 efe18006
 67e1c397
 c003e704
-c000805e
+c0008097
 202066db
 18c08dfe
 efe08006
-c0030062
+c003009b
 20600000
-20400064
+2040009d
 202067bf
 704eaa01
 7049e400
@@ -117,7 +174,7 @@
 24417806
 1a608c09
 efe08006
-243a0079
+243a00b2
 20206547
 704ec001
 2040656b
@@ -133,7 +190,7 @@
 20402018
 2040310f
 2040248c
-2020007f
+202000b8
 708a0f60
 708a10aa
 708a127a
@@ -148,6 +205,10 @@
 708a1260
 708a23dd
 20600000
+37d98200
+70813c58
+37d98200
+20600000
 7001bb00
 7001bc00
 37d98200
@@ -158,13 +219,14 @@
 708a844a
 708a8540
 708a16fe
-204000e4
+20400122
 6fe0c436
 205a70d7
+245580cf
 37d98200
 70813b5f
 6fe0c099
-c00800d1
+c008010f
 6fe0c438
 1fe1fe04
 67f08a02
@@ -175,18 +237,18 @@
 67f18a73
 708a8660
 708a8b3b
-204000c3
+20400101
 70804300
 70804205
 58557474
 67f18968
 7089606e
-204001e0
-2040020b
-204000bd
+20400217
+20400242
+204000fb
 7041480c
 20406f4e
-2020020d
+20200244
 20758000
 37d98200
 6fe0c11c
@@ -194,7 +256,7 @@
 37d98200
 20600000
 6fe0c099
-c00c00c9
+c00c0107
 6fe0c438
 1fe1fe06
 67f08a02
@@ -217,16 +279,16 @@
 67f18a73
 708a762a
 70890204
-202000af
+202000ed
 6fe0c141
-c00500df
+c005011d
 2020220e
 708a1425
 58a93f3f
 67f18a60
 708a631f
 20600000
-2035810b
+20358149
 6fe2020d
 207a0000
 37d98200
@@ -268,7 +330,7 @@
 6fe1415b
 207a0000
 67e1020f
-202000f5
+20200133
 2040686f
 204021ba
 18002a08
@@ -295,7 +357,7 @@
 20206b38
 20406f35
 7044ecff
-2040012c
+2040016a
 2040701b
 2020739a
 6fe0c6ce
@@ -306,49 +368,42 @@
 efe08011
 6848c6cf
 98467c00
-20228137
+20228175
 1fe20400
-2040013a
+20400178
 1a20a201
-c2000131
+c200016f
 20600000
 79200407
 20206edd
-708a009f
-708a16fe
-6ff08138
-793ffe03
-793ffe05
-793ffe06
-67f08138
-37d98200
 20407396
 20758000
+7040a60a
 20406454
 20406459
-5800019c
+580001d3
 67e143db
-58000179
+580001b0
 67e143dd
-5800018e
+580001c5
 67e143df
 580062d3
 67e143d3
-58000127
+58000165
 67e143d5
 58006329
 67e143d7
-58000172
+580001a9
 67e143e3
 58006505
 67e14524
-2040015a
+20400195
 2020647d
 5800632b
 67e143d5
 58006329
 67e143d7
-58000168
+5800019f
 67e1451f
 5800639a
 67e14521
@@ -360,7 +415,7 @@
 202077ac
 6fe0c51c
 c1808000
-2040016c
+204001a3
 20206342
 6fe14512
 67e14518
@@ -376,15 +431,15 @@
 20406311
 202064d9
 1a627e00
-c00a0180
-c00a817e
-c0200185
+c00a01b7
+c00a81b5
+c02001bc
 202064e0
-2040016c
+204001a3
 202064ef
 1c427e00
 67e249e6
-2040016f
+204001a6
 20406729
 202062e2
 6fe1433c
@@ -392,18 +447,18 @@
 6fe4450a
 207a0000
 20406730
-243a0199
+243a01d0
 6fe44f02
 67e442d3
 20202e93
 6fe14398
-c0120191
+c01201c8
 20600000
 204078ad
 7044f101
 20406730
 2040432b
-243a0199
+243a01d0
 6fe44f02
 67e442d3
 20202e93
@@ -419,7 +474,7 @@
 20407ce1
 78547c00
 2040701b
-202001a6
+202001dd
 6fe148ac
 67e1442e
 204065be
@@ -435,7 +490,7 @@
 67e1068c
 18e27e00
 67e1067a
-204001c3
+204001fa
 6fe1068c
 1fe22600
 6fe1067a
@@ -447,7 +502,7 @@
 1fe0a60a
 6fe10678
 1fe27200
-c20001af
+c20001e6
 20600000
 1a60a405
 efe20012
@@ -458,16 +513,16 @@
 24417806
 580003e8
 98467c00
-202001cd
+20200204
 1a608c04
 efe08006
-202001d0
+20200207
 2040656b
 6fe0cec9
 243a655d
 20406561
 20216500
-204001d7
+2040020e
 20206557
 da604a30
 20406730
@@ -490,7 +545,7 @@
 708ac200
 708ac300
 d8e00006
-204001fd
+20400234
 2a2ffe0d
 2040211d
 2a4ffe0d
@@ -498,14 +553,14 @@
 d8e00005
 2040211c
 2040211e
-204001fd
+20400234
 d8a08ac2
 1a31fe00
 20402117
 1a51fe00
 20402117
 18e08fff
-202101f2
+20210229
 2020214f
 2000003c
 58000f00
@@ -531,7 +586,7 @@
 6fe0c409
 67f080cd
 20000bb8
-20400236
+2040026d
 708a08c1
 6a40c419
 df200008
@@ -540,7 +595,7 @@
 67e0c433
 6240c419
 20600000
-2040022c
+20400263
 6ff08a09
 793ffe07
 67f08a09
@@ -551,7 +606,7 @@
 6fe0c409
 67f080cd
 20000bb8
-20400236
+2040026d
 7080cd00
 20206fa1
 6ff080cc
@@ -566,7 +621,7 @@
 20600000
 7080cc03
 6ff08129
-c3028237
+c302826e
 68590164
 6049440a
 7080cc00
@@ -575,7 +630,7 @@
 708a8d12
 708a8e0a
 6fe0c099
-c0080256
+c008028d
 58005762
 67f10907
 70890103
@@ -586,7 +641,7 @@
 708a8d44
 708a8e0a
 6fe0c099
-c0080253
+c008028a
 58002bb1
 67f10907
 c6978000
@@ -595,10 +650,10 @@
 20600000
 58004189
 67f10907
-2020024f
+20200286
 58008312
 67f10907
-20200244
+2020027b
 6fe0c334
 c1000000
 c001b04a
@@ -610,7 +665,7 @@
 6fe240ad
 9840fe00
 67e240ad
-20400266
+2040029d
 20202425
 600440e7
 d8c08070
@@ -628,11 +683,11 @@
 efe08011
 e8408013
 98467c00
-20228279
+202282b0
 e7e08013
 37d98200
 1a20a201
 1a60a601
-c2000273
+c20002aa
 1a420400
 20600000
Index: output/sched.rom
===================================================================
--- /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/output/sched.rom	(revision 3063)
+++ /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/output/sched.rom	(working copy)
@@ -1,9 +1,9 @@
 mem_patch00:
-04   #mem_patch00
+05   #mem_patch00
 00   #mem_patch01
 32   #mem_patch02
 07   #mem_patch03
-20   #mem_patch04
+a0   #mem_patch04
 00   #mem_patch05
 00   #mem_patch06
 00   #mem_patch07
@@ -35,7 +35,7 @@
 00   #mem_patch21
 00   #mem_patch22
 00   #mem_patch23
-60   #mem_patch24
+70   #mem_patch24
 00   #mem_patch25
 00   #mem_patch26
 02   #mem_patch27
@@ -73,7 +73,7 @@
 mem_le_lap:0a 21 20 98 07 2a
 mem_le_name_len:
 #'Selfie
-'BLE_M3
+'ZL-07
 mem_tx_power:06
 
 //save otp addr
@@ -667,7 +667,7 @@
 mem_version:08 0e 05 03 00
 mem_le_tx2m_delay:20
 
-mem_rx_window_sniff:00 0c
+mem_rx_window_sniff:00 30
 
 mem_gain_fix:ff	#00:soft agc; ff:hw agc
 mem_gain_table:04 00 00
Index: program/patch.prog
===================================================================
--- /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/program/patch.prog	(revision 3063)
+++ /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/program/patch.prog	(working copy)
@@ -2,6 +2,7 @@
 //define AUTO_TEST
 
 	bbit1 8,pf_patch_ext
+	beq patch00_0,p_soft_reset
 	beq patch00_2,p_main_loop
 	//beq patch01_7,p_rx_dcoc
 	beq patch02_1,p_set_sync_on
@@ -13,6 +14,7 @@
 	//beq patch03_3,p_rfpll_aac_ghpc
 	//beq patch03_5,p_dpll_ring_ibias_calc
 	beq patch04_5,p_lpm_sleep
+	beq patch04_7,p_lpm_adjust_clk
 	beq patch14_3,p_shutter_dy_key_press
 	beq patch14_5,p_shutter_dy_shutter_key_release
 	beq patch14_6,p_shutter_dy_keyscan_key_check_long_press
@@ -25,6 +27,7 @@
 	branch assert
 
 pf_patch_ext:
+	beq patch24_4,p_le_receive_rxon
 	beq patch24_5,p_le_rx_dec
 	beq patch24_6,p_le_rx_nopayload
 	beq patch27_1,p_le_parse
@@ -32,6 +35,76 @@
 	rtneq patch3f_7
 	branch assert
 
+p_soft_reset:
+	nbranch soft_reset+1,wake
+	until null,lpo_edge
+	until null,lpo_edge
+	branch soft_reset+1
+
+p_le_receive_rxon:
+//	bpatchx patch24_4,mem_patch24
+	call le_prep
+	bmark0 mark_ble_lr,p_le_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call le_prep
+	lshift3 timeup,timeup
+p_le_receive_nolr:
+	disable match
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	copy timeup,stop_watch
+	correlate null,timeout
+	branch p_le_receive_on_attempt,attempt
+	copy clke,temp
+	storet 6,mem_sync_clke
+p_le_receive_on_attempt:
+	nbranch le_unsync_end,sync
+	enable swfine
+	fetch 1,mem_le_tx_ifs_defference
+	arg PARAM_20MS_INIT,temp
+	iadd temp,temp
+	fetch 1,mem_system_clk
+	imul32 temp,stop_watch
+	call rf_debug_rx_sync_line	//L-H
+	branch le_receive_skip,attempt
+	call p_calc_clke_all_modem
+	fetch 1,mem_le_state
+	bbit0 lestate_got_first_packet,le_receive_skip
+	call lpm_adjust_clk,wake
+	branch le_receive_skip
+
+p_calc_clke_all_modem:
+	fetcht  6,mem_sync_clke
+	copy clke,pdata
+	call clk_diff
+	copy pdata,temp
+
+	call calc_clke_all_modem
+	copy clke,rege
+	copy clke_rt,pdata
+	iadd temp,pdata
+//	add pdata,8,pdata
+	copy pdata,clke_rt
+	rtn
+
+p_lpm_adjust_clk:
+	//bpatch patch04_7,mem_patch04
+	bmark0 mark_context,lpm_clear_counter
+	fetcht 4,mem_sleep_counter_all
+	arg 0x600,pdata
+	isub temp,null
+	rtn positive				// interval too small
+	copy temp,rega
+	fetcht 6,mem_sync_clke
+	deposit rege
+	call clk_diff_rt
+//	sub pdata,13,null
+//	rtn positive
+	copy rega,temp
+	branch lpm_adjust_clk+6
+
 p_shutter_dy_keyscan_key_check_long_press:
 	call p_shutter_dy_long_key_function
 	fetch 1,mem_move_mode_set
@@ -207,6 +280,12 @@
 	jam 0xdd,0x8a23 
 	rtn
 
+p_set_ck2rfp11:
+	until null,lpo_edge
+	jam 0x58,0x813c
+	until null,lpo_edge
+	rtn
+
 p_initialize_radio_cont:
 	jam 0,mem_le_testtype
 	jam 0,mem_cmd_le_create_conn
@@ -224,7 +303,7 @@
 //	branch initialize_radio_cont+1
 	fetch 1,mem_wdt_always_work
 	call wdt_set_disable,blank
-
+	ncall p_set_ck2rfp11,wake
 	until null,lpo_edge
 	jam 0x5f,0x813b 
 	fetch 1,mem_fcomp_div
@@ -417,16 +496,9 @@
 	branch gpio_config_input	
 
 p_shutter_dy_init:
-	jam 0x9f,0x8a00
-	jam 0xfe,0x8a16
-	fetch 1,0x8138
-	set0 3,pdata
-	set0 5,pdata
-	set0 6,pdata
-	store 1,0x8138
-	until null,lpo_edge
 	call enable_authrom
 	rtn wake
+	jam 0x0a,mem_lpm_overhead
 	call shutter_dy_key_conf
 	call shutter_dy_adv_conf
 
@@ -454,7 +526,7 @@
 	setarg shutter_dy_key_change
 	store 2,mem_cb_shutter_keycan
 
-	call p_shutter_common_init	
+	call p_shutter_common_init+4	
 
 	branch shutter_dy_init+15
 
Index: sched/1305.dat
===================================================================
--- /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/sched/1305.dat	(revision 3063)
+++ /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/sched/1305.dat	(working copy)
@@ -15,7 +15,7 @@
 mem_version:08 0e 05 03 00
 mem_le_tx2m_delay:20
 
-mem_rx_window_sniff:00 0c
+mem_rx_window_sniff:00 30
 
 mem_gain_fix:ff	#00:soft agc; ff:hw agc
 mem_gain_table:04 00 00
Index: sched/shutter_dy.dat
===================================================================
--- /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/sched/shutter_dy.dat	(revision 3063)
+++ /1121s/branch/shutter/branch/dy/JXY/yc1089s_jxy_pacb217_7key/sched/shutter_dy.dat	(working copy)
@@ -6,7 +6,7 @@
 mem_le_lap:0a 21 20 98 07 2a
 mem_le_name_len:
 #'Selfie
-'BLE_M3
+'ZL-07
 mem_tx_power:06
 
 //save otp addr
