Index: do.bat
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/do.bat	(revision 4021)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/do.bat	(working copy)
@@ -81,7 +81,7 @@
 perl ../util/mergepatch.pl mouse_ble_att_list usb_kbdata_vendor_define usb_kbdata usb_msdata usb_devicedata usb_confdata ble_shutter_gatt_list ble_shutter_key_value_list ble_car_att_list sha256 
 perl ../util/romcrc.pl romcode.rom
 perl  ../util/mergepatch.pl otp
-
+perl  ../util/otpcheck.pl
 
 if "%device_option%" equ "shutter_dy" (
 cd ..\output
Index: output/otp.dat
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/output/otp.dat	(revision 4021)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/output/otp.dat	(working copy)
@@ -11,7 +11,7 @@
 00
 aa
 55
-8a
+ba
 11
 c2
 84
@@ -24,35 +24,35 @@
 c0
 01
 01
-e1
+e2
 c0
 08
 81
-ea
+eb
 c0
 0a
 04
-21
+23
 c0
 0a
 82
-76
+78
 c0
 0c
 02
-84
+86
 c0
 0c
 82
-43
+45
 c0
 0d
 01
-fc
+fd
 c0
 12
 84
-43
+45
 c0
 13
 80
@@ -64,7 +64,7 @@
 c0
 52
 81
-c2
+c3
 c0
 53
 00
@@ -76,7 +76,7 @@
 c0
 55
 01
-b1
+b2
 c0
 56
 80
@@ -84,19 +84,19 @@
 c0
 58
 82
-8e
+90
 c0
 62
 82
-8b
+8d
 c0
 6d
 03
-f2
+f4
 c0
 6e
 04
-02
+04
 20
 20
 23
@@ -108,19 +108,19 @@
 c0
 12
 81
-9a
+9b
 c0
 13
 01
-9f
+a0
 c0
 1c
 84
-3d
+3f
 c0
 26
 84
-41
+43
 c1
 7f
 80
@@ -388,11 +388,11 @@
 c0
 02
 02
-cb
+cd
 c0
 01
 03
-0b
+0d
 20
 60
 00
@@ -588,7 +588,7 @@
 24
 42
 81
-94
+95
 6f
 e0
 ce
@@ -1514,9 +1514,9 @@
 00
 05
 20
-20
-67
-be
+60
+00
+00
 20
 40
 67
@@ -1606,9 +1606,9 @@
 80
 05
 20
-20
-67
-be
+60
+00
+00
 18
 e2
 7e
@@ -1622,6 +1622,10 @@
 00
 00
 70
+48
+9e
+14
+70
 4e
 c9
 00
@@ -1636,7 +1640,7 @@
 20
 3a
 01
-97
+98
 20
 20
 65
@@ -1764,7 +1768,7 @@
 c0
 00
 81
-b7
+b8
 20
 20
 66
@@ -1780,7 +1784,7 @@
 c0
 03
 01
-bb
+bc
 20
 60
 00
@@ -1788,7 +1792,7 @@
 20
 40
 01
-bd
+be
 20
 20
 67
@@ -1872,7 +1876,7 @@
 24
 3a
 01
-d2
+d3
 20
 20
 65
@@ -1888,7 +1892,7 @@
 20
 40
 01
-dd
+de
 da
 60
 4a
@@ -1924,7 +1928,7 @@
 20
 40
 01
-d8
+d9
 70
 4b
 fe
@@ -1972,7 +1976,7 @@
 20
 20
 01
-e1
+e2
 70
 8a
 0f
@@ -2067,6 +2071,10 @@
 10
 70
 8a
+88
+40
+70
+8a
 13
 cd
 70
@@ -2088,7 +2096,7 @@
 20
 40
 02
-4b
+4d
 6f
 e0
 c4
@@ -2100,7 +2108,7 @@
 24
 55
 81
-f8
+f9
 37
 d9
 82
@@ -2116,7 +2124,7 @@
 c0
 08
 02
-38
+3a
 6f
 e0
 c4
@@ -2160,7 +2168,7 @@
 20
 40
 02
-2a
+2c
 70
 80
 43
@@ -2184,15 +2192,15 @@
 20
 40
 03
-c4
+c6
 20
 40
 03
-ef
+f1
 20
 40
 02
-24
+26
 70
 41
 48
@@ -2204,7 +2212,7 @@
 20
 20
 03
-f1
+f3
 20
 75
 80
@@ -2236,7 +2244,7 @@
 c0
 0c
 02
-30
+32
 6f
 e0
 c4
@@ -2328,7 +2336,7 @@
 20
 20
 02
-16
+18
 6f
 e0
 c1
@@ -2336,7 +2344,7 @@
 c0
 05
 02
-46
+48
 20
 20
 22
@@ -2364,7 +2372,7 @@
 20
 35
 82
-72
+74
 6f
 e2
 02
@@ -2532,7 +2540,7 @@
 20
 20
 02
-5c
+5e
 20
 40
 68
@@ -2656,7 +2664,7 @@
 58
 00
 03
-7e
+80
 67
 e1
 43
@@ -2664,7 +2672,7 @@
 58
 00
 03
-53
+55
 67
 e1
 43
@@ -2672,7 +2680,7 @@
 58
 00
 03
-70
+72
 67
 e1
 43
@@ -2688,7 +2696,7 @@
 58
 00
 02
-a6
+a8
 67
 e1
 43
@@ -2704,7 +2712,7 @@
 58
 00
 02
-bb
+bd
 67
 e1
 43
@@ -2736,7 +2744,7 @@
 20
 40
 02
-ab
+ad
 20
 40
 70
@@ -2780,7 +2788,7 @@
 20
 22
 82
-b6
+b8
 1f
 e2
 04
@@ -2788,7 +2796,7 @@
 20
 40
 02
-b9
+bb
 1a
 20
 a2
@@ -2796,7 +2804,7 @@
 c2
 00
 02
-b0
+b2
 20
 60
 00
@@ -2812,11 +2820,11 @@
 20
 40
 02
-c4
+c6
 20
 40
 03
-47
+49
 20
 40
 68
@@ -2852,7 +2860,7 @@
 da
 40
 02
-c7
+c9
 20
 20
 42
@@ -2864,11 +2872,11 @@
 c0
 00
 82
-cb
+cd
 c0
 01
 03
-0b
+0d
 20
 60
 00
@@ -2884,7 +2892,7 @@
 24
 3a
 02
-f2
+f4
 6f
 e0
 cf
@@ -2892,7 +2900,7 @@
 24
 5a
 02
-e8
+ea
 70
 4f
 c8
@@ -2924,7 +2932,7 @@
 20
 22
 82
-e5
+e7
 da
 40
 4f
@@ -3052,15 +3060,15 @@
 20
 22
 83
-07
+09
 6f
 e0
 cf
 ca
 24
 3a
-02
-ff
+03
+01
 70
 4f
 ba
@@ -3140,7 +3148,7 @@
 24
 3a
 03
-32
+34
 6f
 e0
 cf
@@ -3148,7 +3156,7 @@
 24
 5a
 03
-28
+2a
 70
 4f
 c8
@@ -3180,7 +3188,7 @@
 20
 22
 83
-25
+27
 da
 40
 4f
@@ -3308,7 +3316,7 @@
 20
 22
 83
-07
+09
 6f
 e0
 cf
@@ -3316,7 +3324,7 @@
 24
 3a
 03
-3f
+41
 70
 4f
 ba
@@ -3384,7 +3392,7 @@
 da
 40
 03
-4c
+4e
 20
 20
 42
@@ -3424,11 +3432,11 @@
 c0
 20
 03
-67
+69
 c0
 18
 83
-57
+59
 20
 20
 64
@@ -3440,7 +3448,7 @@
 20
 40
 03
-5a
+5c
 20
 60
 00
@@ -3452,11 +3460,11 @@
 20
 3a
 03
-5d
+5f
 20
 20
 03
-62
+64
 6f
 e1
 4f
@@ -3520,7 +3528,7 @@
 24
 3a
 03
-7b
+7d
 6f
 e4
 4f
@@ -3540,7 +3548,7 @@
 c0
 12
 03
-73
+75
 20
 60
 00
@@ -3564,7 +3572,7 @@
 24
 3a
 03
-7b
+7d
 6f
 e4
 4f
@@ -3636,7 +3644,7 @@
 20
 20
 03
-8a
+8c
 6f
 e1
 48
@@ -3700,7 +3708,7 @@
 20
 40
 03
-a7
+a9
 6f
 e1
 06
@@ -3748,7 +3756,7 @@
 c2
 00
 03
-93
+95
 20
 60
 00
@@ -3792,7 +3800,7 @@
 20
 20
 03
-b1
+b3
 1a
 60
 8c
@@ -3804,7 +3812,7 @@
 20
 20
 03
-b4
+b6
 20
 40
 65
@@ -3828,7 +3836,7 @@
 20
 40
 03
-bb
+bd
 20
 20
 65
@@ -3920,7 +3928,7 @@
 20
 40
 03
-e1
+e3
 2a
 2f
 fe
@@ -3952,7 +3960,7 @@
 20
 40
 03
-e1
+e3
 d8
 a0
 8a
@@ -3980,7 +3988,7 @@
 20
 21
 03
-d6
+d8
 20
 20
 21
@@ -4084,7 +4092,7 @@
 20
 40
 04
-1a
+1c
 70
 8a
 08
@@ -4120,7 +4128,7 @@
 20
 40
 04
-10
+12
 6f
 f0
 8a
@@ -4164,7 +4172,7 @@
 20
 40
 04
-1a
+1c
 70
 80
 cd
@@ -4224,7 +4232,7 @@
 c3
 02
 84
-1b
+1d
 68
 59
 01
@@ -4260,7 +4268,7 @@
 c0
 08
 04
-3a
+3c
 58
 00
 57
@@ -4304,7 +4312,7 @@
 c0
 08
 04
-37
+39
 58
 00
 2b
@@ -4340,7 +4348,7 @@
 20
 20
 04
-33
+35
 58
 00
 83
@@ -4352,7 +4360,7 @@
 20
 20
 04
-28
+2a
 6f
 e0
 c3
@@ -4400,11 +4408,51 @@
 20
 40
 04
-4a
+56
+6f
+e0
+c0
+cb
+79
 20
+7e
+04
 20
+40
+23
+e1
 24
-25
+55
+a3
+cb
+37
+d9
+82
+00
+1b
+22
+7e
+00
+67
+e3
+40
+b1
+6f
+e1
+c0
+c6
+6a
+20
+c0
+c9
+df
+20
+00
+03
+20
+20
+24
+2e
 60
 04
 40
@@ -4472,7 +4520,7 @@
 20
 22
 84
-5d
+69
 e7
 e0
 80
@@ -4492,7 +4540,7 @@
 c2
 00
 04
-57
+63
 1a
 42
 04
@@ -4501,8 +4549,8 @@
 60
 00
 00
-61
-1c
+f8
+8a
 aa
 55
 40
@@ -4634,8 +4682,8 @@
 4f
 b0
 1f
-70
-1a
+f0
+1b
 aa
 55
 02
@@ -6958,7 +7006,7 @@
 aa
 aa
 55
-e9
-83
-59
-89
+6a
+84
+71
+a1
Index: output/ramcode.rom
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/output/ramcode.rom	(revision 4021)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/output/ramcode.rom	(working copy)
@@ -1,30 +1,30 @@
 c2840016
 c000001d
-c00101e1
-c00881ea
-c00a0421
-c00a8276
-c00c0284
-c00c8243
-c00d01fc
-c0128443
+c00101e2
+c00881eb
+c00a0423
+c00a8278
+c00c0286
+c00c8245
+c00d01fd
+c0128445
 c0138048
 c0518085
-c05281c2
+c05281c3
 c0530053
 c0538060
-c05501b1
+c05501b2
 c05680a1
-c058828e
-c062828b
-c06d03f2
-c06e0402
+c0588290
+c062828d
+c06d03f4
+c06e0404
 2020235a
 c0120021
-c012819a
-c013019f
-c01c843d
-c0268441
+c012819b
+c01301a0
+c01c843f
+c0268443
 c17f8000
 2020235a
 2435a002
@@ -91,8 +91,8 @@
 c002e765
 c0006761
 c000e777
-c00202cb
-c001030b
+c00202cd
+c001030d
 20600000
 6fe0cec7
 c000e5cf
@@ -141,7 +141,7 @@
 18e27e00
 6848cec5
 98467c00
-24428194
+24428195
 6fe0cec9
 245a018f
 18e27e00
@@ -373,7 +373,7 @@
 18a08a04
 6fe24b17
 e7e20005
-202067be
+20600000
 20406730
 243a0182
 58000034
@@ -396,14 +396,15 @@
 1ff27e00
 1fed7e00
 e7e18005
-202067be
+20600000
 18e27e00
 c0030192
 20600000
+70489e14
 704ec900
 20204325
 6fe0cec9
-203a0197
+203a0198
 20206529
 20406730
 207a0000
@@ -435,13 +436,13 @@
 efe18006
 67e1c397
 c003e704
-c00081b7
+c00081b8
 202066db
 18c08dfe
 efe08006
-c00301bb
+c00301bc
 20600000
-204001bd
+204001be
 202067bf
 704eaa01
 7049e400
@@ -462,11 +463,11 @@
 24417806
 1a608c09
 efe08006
-243a01d2
+243a01d3
 20206547
 704ec001
 2040656b
-204001dd
+204001de
 da604aae
 dfe00003
 2020655a
@@ -475,7 +476,7 @@
 704fc900
 704fc801
 20600000
-204001d8
+204001d9
 704bfe00
 704f8d00
 20600000
@@ -487,7 +488,7 @@
 20402018
 2040310f
 2040248c
-202001e1
+202001e2
 708a0f60
 708a10aa
 708a127a
@@ -511,19 +512,20 @@
 37d98200
 7089460d
 70896f10
+708a8840
 708a13cd
 708a0610
 708a844a
 708a8540
 708a16fe
-2040024b
+2040024d
 6fe0c436
 205a70d7
-245581f8
+245581f9
 37d98200
 70813b5f
 6fe0c099
-c0080238
+c008023a
 6fe0c438
 1fe1fe04
 67f08a02
@@ -534,18 +536,18 @@
 67f18a73
 708a8660
 708a8b3b
-2040022a
+2040022c
 70804300
 70804205
 58557474
 67f18968
 7089606e
-204003c4
-204003ef
-20400224
+204003c6
+204003f1
+20400226
 7041480c
 20406f4e
-202003f1
+202003f3
 20758000
 37d98200
 6fe0c11c
@@ -553,7 +555,7 @@
 37d98200
 20600000
 6fe0c099
-c00c0230
+c00c0232
 6fe0c438
 1fe1fe06
 67f08a02
@@ -576,16 +578,16 @@
 67f18a73
 708a762a
 70890204
-20200216
+20200218
 6fe0c141
-c0050246
+c0050248
 2020220e
 708a1425
 58a93f3f
 67f18a60
 708a631f
 20600000
-20358272
+20358274
 6fe2020d
 207a0000
 37d98200
@@ -627,7 +629,7 @@
 6fe1415b
 207a0000
 67e1020f
-2020025c
+2020025e
 2040686f
 204021ba
 18002a08
@@ -658,19 +660,19 @@
 20406454
 20406459
 7040a60a
-5800037e
+58000380
 67e143db
-58000353
+58000355
 67e143dd
-58000370
+58000372
 67e143df
 580062d3
 67e143d3
-580002a6
+580002a8
 67e143d5
 58006329
 67e143d7
-580002bb
+580002bd
 67e143e3
 58006505
 67e14524
@@ -678,7 +680,7 @@
 2020647d
 20406f35
 7044ecff
-204002ab
+204002ad
 2040701b
 2020739a
 6fe0c6ce
@@ -689,16 +691,16 @@
 efe08011
 6848c6cf
 98467c00
-202282b6
+202282b8
 1fe20400
-204002b9
+204002bb
 1a20a201
-c20002b0
+c20002b2
 20600000
 79200407
 20206edd
-204002c4
-20400347
+204002c6
+20400349
 20406858
 2040676c
 2040675a
@@ -707,17 +709,17 @@
 20406311
 202064d9
 da604fba
-da4002c7
+da4002c9
 202042e0
 6fe0cfbd
-c00082cb
-c001030b
+c00082cd
+c001030d
 20600000
 704fbd01
 20406730
-243a02f2
+243a02f4
 6fe0cfc8
-245a02e8
+245a02ea
 704fc800
 704fba01
 7049e50a
@@ -725,7 +727,7 @@
 1fe0fe01
 67e0cfbe
 1fe67c5a
-202282e5
+202282e7
 da404fbf
 d8404c02
 efe08012
@@ -757,9 +759,9 @@
 1fe0fe01
 67e0cfc9
 1fe67c28
-20228307
+20228309
 6fe0cfca
-243a02ff
+243a0301
 704fba01
 704ec500
 7049e514
@@ -779,9 +781,9 @@
 20600000
 704fbd02
 20406730
-243a0332
+243a0334
 6fe0cfc8
-245a0328
+245a032a
 704fc800
 704fba01
 7049e50a
@@ -789,7 +791,7 @@
 1fe0fe01
 67e0cfbe
 1fe67c5a
-20228325
+20228327
 da404fc2
 d8404c02
 efe08012
@@ -821,9 +823,9 @@
 1fe0fe01
 67e0cfc9
 1fe67c1e
-20228307
+20228309
 6fe0cfca
-243a033f
+243a0341
 704fba01
 704ec500
 7049e514
@@ -840,7 +842,7 @@
 6fe0cec9
 207a0000
 da604fb8
-da40034c
+da40034e
 202042e0
 704fb805
 6fe0cfb9
@@ -850,15 +852,15 @@
 c000c325
 20600000
 1a627e00
-c0200367
-c0188357
+c0200369
+c0188359
 202064e0
 704ec201
-2040035a
+2040035c
 20600000
 20406730
-203a035d
-20200362
+203a035f
+20200364
 6fe14f74
 67e14eae
 6fe14f76
@@ -874,18 +876,18 @@
 6fe4450a
 207a0000
 20406730
-243a037b
+243a037d
 6fe44f02
 67e442d3
 20202e93
 6fe14398
-c0120373
+c0120375
 20600000
 204078ad
 7044f101
 20406730
 2040432b
-243a037b
+243a037d
 6fe44f02
 67e442d3
 20202e93
@@ -903,7 +905,7 @@
 20407ce1
 78547c00
 2040701b
-2020038a
+2020038c
 6fe148ac
 67e1442e
 204065be
@@ -919,7 +921,7 @@
 67e1068c
 18e27e00
 67e1067a
-204003a7
+204003a9
 6fe1068c
 1fe22600
 6fe1067a
@@ -931,7 +933,7 @@
 1fe0a60a
 6fe10678
 1fe27200
-c2000393
+c2000395
 20600000
 1a60a405
 efe20012
@@ -942,16 +944,16 @@
 24417806
 580003e8
 98467c00
-202003b1
+202003b3
 1a608c04
 efe08006
-202003b4
+202003b6
 2040656b
 6fe0cec9
 243a655d
 20406561
 20216500
-204003bb
+204003bd
 20206557
 da604a30
 7049e50a
@@ -974,7 +976,7 @@
 708ac200
 708ac300
 d8e00006
-204003e1
+204003e3
 2a2ffe0d
 2040211d
 2a4ffe0d
@@ -982,14 +984,14 @@
 d8e00005
 2040211c
 2040211e
-204003e1
+204003e3
 d8a08ac2
 1a31fe00
 20402117
 1a51fe00
 20402117
 18e08fff
-202103d6
+202103d8
 2020214f
 2000003c
 58000f00
@@ -1015,7 +1017,7 @@
 6fe0c409
 67f080cd
 20000bb8
-2040041a
+2040041c
 708a08c1
 6a40c419
 df200008
@@ -1024,7 +1026,7 @@
 67e0c433
 6240c419
 20600000
-20400410
+20400412
 6ff08a09
 793ffe07
 67f08a09
@@ -1035,7 +1037,7 @@
 6fe0c409
 67f080cd
 20000bb8
-2040041a
+2040041c
 7080cd00
 20206fa1
 6ff080cc
@@ -1050,7 +1052,7 @@
 20600000
 7080cc03
 6ff08129
-c302841b
+c302841d
 68590164
 6049440a
 7080cc00
@@ -1059,7 +1061,7 @@
 708a8d12
 708a8e0a
 6fe0c099
-c008043a
+c008043c
 58005762
 67f10907
 70890103
@@ -1070,7 +1072,7 @@
 708a8d44
 708a8e0a
 6fe0c099
-c0080437
+c0080439
 58002bb1
 67f10907
 c6978000
@@ -1079,10 +1081,10 @@
 20600000
 58004189
 67f10907
-20200433
+20200435
 58008312
 67f10907
-20200428
+2020042a
 6fe0c334
 c1000000
 c001b04a
@@ -1094,8 +1096,18 @@
 6fe240ad
 9840fe00
 67e240ad
-2040044a
-20202425
+20400456
+6fe0c0cb
+79207e04
+204023e1
+2455a3cb
+37d98200
+1b227e00
+67e340b1
+6fe1c0c6
+6a20c0c9
+df200003
+2020242e
 600440e7
 d8c08070
 d8a040cc
@@ -1112,11 +1124,11 @@
 efe08011
 e8408013
 98467c00
-2022845d
+20228469
 e7e08013
 37d98200
 1a20a201
 1a60a601
-c2000457
+c2000463
 1a420400
 20600000
Index: output/sched.rom
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/output/sched.rom	(revision 4021)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/output/sched.rom	(working copy)
@@ -77,8 +77,8 @@
 mem_tx_power:06
 
 //save otp addr
-mem_shutter_efuse_start_offset: b0 1f
-mem_shutter_efuse_end_offset: 70 1a
+mem_shutter_efuse_start_offset:b0 1f
+mem_shutter_efuse_end_offset:f0 1b
 
 mem_shutter_le_pairing_handle:2b 00
 
Index: program/patch.prog
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/program/patch.prog	(revision 4021)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/program/patch.prog	(working copy)
@@ -488,7 +488,8 @@
 	increase 4,contw
 	fetch 4,mem_shutter_move_data
 	istore 4,contw
-	branch shutter_dy_store_move_config_info
+	rtn
+	// branch shutter_dy_store_move_config_info
 
 p_get_move_release_data:
 	call shutter_dy_check_iphone
@@ -515,7 +516,8 @@
 	lshift4 pdata,pdata
 	lshift8 pdata,pdata
 	istore 3,contw
-	branch shutter_dy_store_move_config_info
+	rtn
+	// branch shutter_dy_store_move_config_info
 
 p_shutter_short_key_cancel:
 	copy queue,pdata
@@ -523,6 +525,7 @@
 	rtn
 
 p_move_mode_disable:
+	jam 0x14,mem_shutter_1s_timer
 	jam 0,mem_move_mode_trigger_enable
 	branch app_led_off
 
@@ -671,7 +674,7 @@
 
 	jam 0x0d,0x8946
 	jam 0x10,0x896f
-
+	jam 0x40,core_rx_cfg0
 	jam 0xcd,0x8a13
 	jam 0x10,0x8a06
 	jam 0x4a,0x8a84
@@ -852,7 +855,6 @@
 	call shutter_dy_key_conf
 	call shutter_dy_adv_conf
 	jam 0x0a,mem_lpm_overhead
-
 	setarg p_shutter_dy_process_idle
 	store 2,mem_cb_idle_process
 
@@ -1435,7 +1437,18 @@
 	iadd temp,pdata
 	store 4,mem_sleep_counter_all
 	call p_lpm_save_context
-	branch lpm_sleep_skip_cb_function+4
+	fetch 1,mem_lpm_hv_sel
+	set1 LPM_DOZE_EN_BIT, pdata
+	call lpm_write_sel_hv
+	ncall lpm_preon_counter,wake
+	until null,lpo_edge
+	copy clkn,pdata
+	store 6,mem_sleep_clkn
+	// storer clkn,6,mem_sleep_clkn
+	fetch 3,mem_lpm_isogate
+	fetchr rega,1,mem_lpm_ldo_sel
+	arg 3,loopcnt
+	branch lpm_sleep_loop
 
 p_lpm_save_context:
 	storer mark,8,mem_saved_mark
Index: sched/shutter_dy.dat
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/sched/shutter_dy.dat	(revision 4021)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/sched/shutter_dy.dat	(working copy)
@@ -10,8 +10,8 @@
 mem_tx_power:06
 
 //save otp addr
-mem_shutter_efuse_start_offset: b0 1f
-mem_shutter_efuse_end_offset: 70 1a
+mem_shutter_efuse_start_offset:b0 1f
+mem_shutter_efuse_end_offset:f0 1b
 
 mem_shutter_le_pairing_handle:2b 00
 
Index: util/otpcheck.pl
===================================================================
--- /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/util/otpcheck.pl	(nonexistent)
+++ /1121s/branch/shutter/branch/dy/Xinfeiyi/yc1088s_xfy_drag_8key/util/otpcheck.pl	(working copy)
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use File::Spec;  
+# 获取当前脚本的目录路径
+my $current_dir = File::Spec->rel2abs('.');
+my $parent_dir = File::Spec->catdir($current_dir, '..');  # 获取上一级目录
+
+# 指定要搜索的文件名
+my $filename = File::Spec->catfile($parent_dir, 'output', 'otp.dat');
+# 打开文件进行读取
+open(my $fh, '<',$filename) or die "无法打开文件 '$filename':$!";
+
+# 读取整个文件到数组中
+my @file_content = <$fh>;
+chomp @file_content;  # 移除每行的换行符
+
+# 关闭文件句柄
+close($fh);
+
+# 初始化变量
+my $found = 0;
+my $otp_end_address = 0;
+# 循环遍历文件内容，每次移动一个字节
+for my $start (0 ..$#file_content - 3) {
+    # 提取从当前起始位置开始的四个字节
+    my $chunk = join('', @file_content[$start .. $start + 3]);
+    
+    # 检查这四个字节是否匹配指定的字符串
+    if ($chunk eq '55aaaa55') {
+        $otp_end_address = $start +9;
+        # print "After adding 9 to the start position: $start\n";
+        $found = 1;
+    }
+}
+
+# 如果找到了 "55aaaa55"，则继续处理 sched.rom 文件
+if ($found) {
+    my $sched_filename = File::Spec->catfile($parent_dir, 'output', 'sched.rom');
+    # 打开文件进行读取
+    open(my $sched_fh, '<',$sched_filename) or die "无法打开文件 '$sched_filename'$!";
+    # 读取整个文件到字符串中
+    my $sched_content = do { local$/; <$sched_fh> };
+    chomp $sched_content;  # 移除字符串末尾的换行符
+    # print "sched_content: $sched_content\n";
+    # 关闭文件句柄
+    close($sched_fh);
+    # 在 sched_content 中查找 "mem_shutter_efuse_end_offset:"
+    my $sched_position = index($sched_content, 'mem_shutter_efuse_end_offset:');
+    # 如果找到了 "mem_shutter_efuse_end_offset:"
+    if ($sched_position != -1) {
+        # 获取 "mem_shutter_efuse_end_offset:" 后面的两个字节
+        my $five_bytes_with_spaces = substr($sched_content, $sched_position + length("mem_shutter_efuse_end_offset:"), 5);
+        $five_bytes_with_spaces =~ s/ //g;  # 移除空格
+        my $five_bytes =$five_bytes_with_spaces;
+        print "Q:  $five_bytes\n";
+        # 字节颠倒
+        my $reversed_bytes = substr($five_bytes, 2, 2) . substr($five_bytes, 0, 2);
+        my $decimal_value = hex($reversed_bytes);
+        # 打印找到的字符串位置信息以及后面跟随的两个字节
+        print "Original otp store start little-endian bytes: $five_bytes\n";
+        print "Reversed (big-endian) bytes:  $decimal_value\n";
+        print "otp end bytes:  $otp_end_address\n";
+        if($decimal_value>$otp_end_address)
+        {
+            print"otp check done";
+        }
+        else
+        {
+            die "otp check failed, please check mem_shutter_efuse_end_offset'\n";
+        }
+    } else {
+        print "String 'mem_shutter_efuse_end_offset:' not found in file '$sched_filename'.\n";
+    }
+}
+
+
