Index: debug.bat
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/debug.bat	(revision 4601)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/debug.bat	(working copy)
@@ -1,6 +1,5 @@
 e pu
 e 8043 00
 e 0x4094 0
-e 0x42d3 0x003c001c
-e 0x4094 1
-e cu
\ No newline at end of file
+e cu
+e uu 0x4321
\ No newline at end of file
Index: output/otp.dat
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/output/otp.dat	(revision 4601)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/output/otp.dat	(working copy)
@@ -11,7 +11,7 @@
 00
 aa
 55
-2e
+72
 13
 c2
 84
@@ -64,7 +64,7 @@
 c0
 14
 04
-c7
+d8
 c0
 58
 83
@@ -556,7 +556,7 @@
 20
 40
 04
-7c
+8d
 20
 40
 75
@@ -632,7 +632,7 @@
 20
 3a
 03
-dc
+ed
 20
 60
 00
@@ -648,7 +648,7 @@
 20
 40
 03
-dc
+ed
 20
 20
 43
@@ -656,7 +656,7 @@
 20
 40
 03
-da
+eb
 58
 00
 00
@@ -3224,7 +3224,7 @@
 24
 40
 83
-dc
+ed
 20
 40
 02
@@ -3260,7 +3260,7 @@
 c0
 00
 84
-ab
+bc
 6f
 e0
 c5
@@ -3324,7 +3324,7 @@
 c2
 82
 04
-bf
+d0
 6f
 e1
 44
@@ -3348,7 +3348,7 @@
 20
 20
 03
-da
+eb
 70
 44
 ec
@@ -3384,11 +3384,11 @@
 c0
 1f
 84
-75
+86
 c0
 08
 04
-a6
+b7
 c0
 16
 03
@@ -3472,7 +3472,7 @@
 20
 40
 03
-dc
+ed
 6f
 e0
 c8
@@ -3528,7 +3528,7 @@
 20
 40
 03
-dc
+ed
 70
 45
 1c
@@ -3772,39 +3772,107 @@
 20
 40
 04
-1e
+2f
 20
 40
 03
-b4
+c5
 20
 40
 03
-b7
+c8
 20
 40
 03
-c5
+d6
 20
 40
 03
-de
+ef
 20
 40
-03
-ef
+04
+00
 20
 40
-03
-f5
+04
+06
 20
 40
 04
+11
+20
+20
+03
+b4
+6f
+e0
+c5
+1c
+c1
+80
+80
 00
+da
+60
+44
+f8
+da
+40
+03
+b9
+20
 20
+42
+e7
+6f
+e0
+c5
+1c
+c1
+80
+80
+00
+6f
+e1
+44
+e9
+c3
+84
+80
+00
+6f
+e1
+45
+12
+67
+e1
+45
+16
+67
+e1
+45
+18
+6f
+e1
+44
+f4
 20
+40
 63
-22
+c7
+6f
+e1
+44
+e9
+c3
+85
+80
+00
+20
+20
+43
+17
 da
 60
 48
@@ -3832,7 +3900,7 @@
 da
 40
 03
-bc
+cd
 20
 20
 42
@@ -3852,7 +3920,7 @@
 20
 20
 83
-c3
+d4
 70
 48
 ef
@@ -3860,7 +3928,7 @@
 20
 40
 03
-dc
+ed
 20
 20
 43
@@ -3872,7 +3940,7 @@
 20
 20
 03
-da
+eb
 6f
 e0
 c8
@@ -3904,7 +3972,7 @@
 da
 40
 03
-ce
+df
 20
 20
 42
@@ -3928,11 +3996,11 @@
 c0
 00
 83
-d4
+e5
 20
 20
 03
-d7
+e8
 6f
 e0
 c8
@@ -3940,7 +4008,7 @@
 24
 3a
 03
-da
+eb
 20
 20
 43
@@ -3952,7 +4020,7 @@
 24
 3a
 03
-dc
+ed
 20
 20
 43
@@ -3980,7 +4048,7 @@
 c0
 00
 83
-ec
+fd
 6f
 e0
 c8
@@ -3996,7 +4064,7 @@
 da
 40
 03
-e5
+f6
 20
 20
 42
@@ -4040,7 +4108,7 @@
 20
 20
 03
-e5
+f6
 6f
 e0
 c8
@@ -4071,8 +4139,8 @@
 18
 da
 40
-03
-f8
+04
+09
 20
 20
 42
@@ -4104,7 +4172,7 @@
 20
 40
 03
-dc
+ed
 20
 20
 63
@@ -4116,7 +4184,7 @@
 da
 40
 04
-03
+14
 20
 20
 42
@@ -4160,7 +4228,7 @@
 24
 3a
 04
-14
+25
 6f
 e0
 c8
@@ -4204,7 +4272,7 @@
 20
 20
 04
-0d
+1e
 6f
 e0
 c8
@@ -4236,7 +4304,7 @@
 c2
 80
 04
-21
+32
 20
 60
 00
@@ -4260,7 +4328,7 @@
 20
 40
 04
-18
+29
 24
 61
 00
@@ -4300,7 +4368,7 @@
 20
 40
 04
-35
+46
 6f
 e0
 c4
@@ -4308,11 +4376,11 @@
 c2
 80
 84
-55
+66
 c3
 00
 04
-5e
+6f
 70
 48
 bb
@@ -4320,7 +4388,7 @@
 20
 20
 04
-5a
+6b
 ef
 e4
 00
@@ -4380,7 +4448,7 @@
 20
 21
 04
-51
+62
 68
 49
 06
@@ -4392,11 +4460,11 @@
 24
 21
 04
-53
+64
 20
 3a
 04
-53
+64
 1f
 ef
 a2
@@ -4464,7 +4532,7 @@
 20
 40
 03
-dc
+ed
 20
 20
 43
@@ -4492,7 +4560,7 @@
 c2
 84
 84
-66
+77
 70
 48
 ba
@@ -4508,7 +4576,7 @@
 20
 40
 03
-dc
+ed
 70
 48
 bb
@@ -4516,7 +4584,7 @@
 20
 20
 04
-68
+79
 20
 40
 43
@@ -4524,7 +4592,7 @@
 20
 20
 04
-60
+71
 6f
 e1
 44
@@ -4548,11 +4616,11 @@
 24
 3a
 04
-72
+83
 20
 20
 04
-6f
+80
 6f
 e2
 44
@@ -4620,11 +4688,11 @@
 20
 40
 04
-81
+92
 20
 20
 04
-9d
+ae
 68
 4a
 48
@@ -4696,7 +4764,7 @@
 24
 3a
 04
-9b
+ac
 68
 49
 48
@@ -4712,7 +4780,7 @@
 20
 22
 84
-98
+a9
 20
 60
 00
@@ -4736,7 +4804,7 @@
 20
 20
 04
-94
+a5
 20
 40
 24
@@ -4780,7 +4848,7 @@
 c3
 00
 84
-bc
+cd
 68
 49
 44
@@ -4792,7 +4860,7 @@
 c0
 00
 84
-b2
+c3
 70
 48
 e7
@@ -4820,7 +4888,7 @@
 20
 20
 04
-bf
+d0
 70
 48
 e6
@@ -4856,7 +4924,7 @@
 20
 3a
 04
-0d
+1e
 20
 20
 7d
@@ -4921,8 +4989,8 @@
 20
 24
 8d
-54
-d9
+e8
+51
 aa
 55
 40
@@ -5381,5 +5449,5 @@
 55
 07
 67
-30
-9b
+1d
+7f
Index: output/ramcode.rom
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/output/ramcode.rom	(revision 4601)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/output/ramcode.rom	(working copy)
@@ -10,7 +10,7 @@
 c00e0048
 c01281e0
 c01381d5
-c01404c7
+c01404d8
 c0588319
 c0628144
 c06d0175
@@ -133,7 +133,7 @@
 242126fa
 2020268e
 20400091
-2040047c
+2040048d
 20407552
 20407448
 20402a45
@@ -152,13 +152,13 @@
 2020809c
 7048ef00
 6fe0c8ba
-203a03dc
+203a03ed
 20600000
 c51a00a0
 7048ef00
-204003dc
+204003ed
 20204327
-204003da
+204003eb
 58000000
 67e148e3
 58000001
@@ -800,7 +800,7 @@
 20406edd
 6848c8f0
 20406ee6
-244083dc
+244083ed
 2040026e
 2040027e
 204002f5
@@ -809,7 +809,7 @@
 6fe144e9
 c3860000
 6fe0c8dd
-c00084ab
+c00084bc
 6fe0c51b
 67e0c4ec
 58000000
@@ -825,13 +825,13 @@
 6fe0c6d0
 203a033c
 6ff08132
-c28204bf
+c28204d0
 6fe144e9
 c3860000
 20204327
 7048f201
 7048f105
-202003da
+202003eb
 7044ecff
 70451c01
 20206340
@@ -840,8 +840,8 @@
 c00a0351
 c018835a
 c00a835c
-c01f8475
-c00804a6
+c01f8486
+c00804b7
 c016034f
 c0168350
 202062da
@@ -862,7 +862,7 @@
 204078ad
 7044f100
 7048b700
-204003dc
+204003ed
 6fe0c8e6
 243a0366
 5800001e
@@ -876,7 +876,7 @@
 7044ee00
 7048e300
 7048b700
-204003dc
+204003ed
 70451c02
 20404325
 2020639e
@@ -937,32 +937,49 @@
 efe08005
 67e0c4eb
 20600000
-2040041e
-204003b4
-204003b7
+2040042f
 204003c5
-204003de
+204003c8
+204003d6
 204003ef
-204003f5
 20400400
-20206322
+20400406
+20400411
+202003b4
+6fe0c51c
+c1808000
+da6044f8
+da4003b9
+202042e7
+6fe0c51c
+c1808000
+6fe144e9
+c3848000
+6fe14512
+67e14516
+67e14518
+6fe144f4
+204063c7
+6fe144e9
+c3858000
+20204317
 da6048f3
 da404323
 202042e0
 6fe0c8f2
 207a0000
 da6048f1
-da4003bc
+da4003cd
 202042e0
 7048f105
 6848c8f0
 20406ee6
-202083c3
+202083d4
 7048ef00
-204003dc
+204003ed
 20204327
 7048ef01
-202003da
+202003eb
 6fe0c8ef
 247a0000
 6fe0c8b7
@@ -970,30 +987,30 @@
 6fe0c8ba
 207a0000
 da6048ec
-da4003ce
+da4003df
 202042e0
 7048ec05
 6fe0c8ed
 79407e00
 67e0c8ed
-c00083d4
-202003d7
+c00083e5
+202003e8
 6fe0c8ae
-243a03da
+243a03eb
 20204323
 6fe0c8ae
-243a03dc
+243a03ed
 20204325
 6848c8ee
 20206ef7
 6848c8ee
 20206ef3
 6fe0c8f4
-c00083ec
+c00083fd
 6fe0c8eb
 245a4323
 da6048eb
-da4003e5
+da4003f6
 202042e0
 7044ee01
 580046a7
@@ -1004,7 +1021,7 @@
 20206340
 7048f400
 7048eb00
-202003e5
+202003f6
 6fe0c8ce
 c4008000
 6fe144e9
@@ -1012,7 +1029,7 @@
 7048e600
 20600000
 da604518
-da4003f8
+da400409
 202042e7
 6fe0c8ce
 c300e314
@@ -1020,10 +1037,10 @@
 7044ee00
 7048e300
 7048b700
-204003dc
+204003ed
 20206314
 da6046ca
-da400403
+da400414
 202042e0
 6fe0c8ce
 c300e31b
@@ -1034,7 +1051,7 @@
 c002639e
 c002e39e
 6fe0c8e5
-243a0414
+243a0425
 6fe0c8e5
 243a4327
 79200034
@@ -1045,7 +1062,7 @@
 6fe0c6b2
 c002639e
 c002e39e
-2020040d
+2020041e
 6fe0c8b9
 1fe0fe01
 67e0c8b9
@@ -1053,13 +1070,13 @@
 98467c00
 20600000
 6fe0c8ce
-c2800421
+c2800432
 20600000
 6fe0c8ef
 247a0000
 6fe0c8b7
 207a0000
-20400418
+20400429
 24610000
 7048b900
 70440701
@@ -1069,12 +1086,12 @@
 2040022b
 67e148b5
 da2048af
-20400435
+20400446
 6fe0c40c
-c2808455
-c300045e
+c2808466
+c300046f
 7048bb01
-2020045a
+2020046b
 efe40011
 67e40670
 20406ff3
@@ -1089,11 +1106,11 @@
 6fe10676
 68490670
 98467c00
-20210451
+20210462
 68490672
 98467e00
-24210453
-203a0453
+24210464
+203a0464
 1fefa264
 6fe10670
 68490672
@@ -1110,29 +1127,29 @@
 7048bc01
 7048bd01
 20404325
-204003dc
+204003ed
 20204327
 7048ba01
 6fe144e9
 c284c325
 20600000
 6fe144e9
-c2848466
+c2848477
 7048ba00
 6fe0c8bb
 207a0000
-204003dc
+204003ed
 7048bb00
-20200468
+20200479
 20404323
-20200460
+20200471
 6fe144e9
 c4058000
 6fe0c8ba
 247a0000
 6fe144f8
-243a0472
-2020046f
+243a0483
+20200480
 6fe244fe
 67e246aa
 20204321
@@ -1149,8 +1166,8 @@
 6fe0c8ce
 c4008000
 c69a0000
-20400481
-2020049d
+20400492
+202004ae
 684a48de
 1c427e00
 98467c00
@@ -1168,17 +1185,17 @@
 1fe0fe01
 67e148e3
 6fe0c8e6
-243a049b
+243a04ac
 684948d9
 6fe148e3
 98467c00
-20228498
+202284a9
 20600000
 793f8034
 20404325
 20204327
 684948db
-20200494
+202004a5
 20402408
 6fe1c0bd
 207a0000
@@ -1189,17 +1206,17 @@
 604a40a9
 2020241e
 6fe0c8ce
-c30084bc
+c30084cd
 68494430
 efe08002
-c00084b2
+c00084c3
 7048e700
 6fe0c51c
 c000e305
 70438801
 793f8034
 7048dd01
-202004bf
+202004d0
 7048e600
 7048e700
 70438800
@@ -1208,7 +1225,7 @@
 204063ad
 18408c05
 efe10006
-203a040d
+203a041e
 20207d79
 68494430
 efe08002
Index: program/patch.prog
===================================================================
--- /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/program/patch.prog	(revision 4601)
+++ /1121s/branch/shutter/branch/shutter/jxy_project/yc1089s_jxy_JM120/program/patch.prog	(working copy)
@@ -1413,7 +1413,28 @@
 	call p_shutter_check_le_adv_status_timer
 	call p_shutter_check_sleep_timer
 	call p_shutter_check_power_off_timer
-	branch ble_shutter_reconn_timer
+	branch p_ble_shutter_reconn_timer
+
+p_ble_shutter_reconn_timer:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	arg mem_ble_shutter_reconn_timer,regc
+	arg p_shutter_start_bluetooth_discovery,regb
+	branch timer_single_step_2B
+
+p_shutter_start_bluetooth_discovery:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 2,mem_ble_shutter_discovery_timeout
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	fetch 2,mem_ble_shutter_discovery_adv_interval
+	call shutter_ble_adv_interval_set
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	branch app_ble_start_adv
 
 p_shutter_1s_con_timer:
 	arg mem_shutter_con_time,regc
