Index: output/eeprom.dat
===================================================================
--- /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/output/eeprom.dat	(revision 1150)
+++ /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/output/eeprom.dat	(working copy)
@@ -2,24 +2,28 @@
 02
 aa
 55
-c2
-01
+1a
+02
 c2
 84
 00
-05
+06
 c0
 0b
 80
-07
+08
 c0
 0c
 00
-15
+16
+c0
+10
+00
+31
 c0
 38
 00
-30
+46
 20
 20
 3a
@@ -39,7 +43,7 @@
 c0
 03
 00
-11
+12
 c0
 05
 3a
@@ -71,7 +75,7 @@
 20
 20
 00
-0b
+0c
 70
 8a
 3b
@@ -87,7 +91,7 @@
 20
 20
 00
-0d
+0e
 70
 8a
 75
@@ -159,7 +163,7 @@
 c0
 84
 00
-28
+29
 70
 8a
 08
@@ -183,7 +187,7 @@
 20
 40
 00
-0a
+0b
 70
 8a
 9a
@@ -196,6 +200,90 @@
 20
 3a
 35
+6f
+e1
+43
+a2
+20
+40
+74
+87
+37
+d9
+82
+00
+70
+80
+05
+01
+20
+40
+3a
+f7
+37
+d9
+82
+00
+70
+80
+05
+02
+58
+00
+0f
+0f
+20
+40
+3b
+fa
+6f
+e2
+40
+ae
+98
+40
+fe
+00
+67
+e2
+40
+ae
+20
+40
+3b
+13
+37
+d9
+82
+00
+70
+80
+05
+02
+6a
+42
+40
+cc
+6f
+e2
+c0
+c7
+67
+f2
+00
+4c
+1b
+22
+7e
+00
+67
+e3
+40
+b2
+20
+20
+3b
+5b
 20
 40
 6e
@@ -295,7 +383,7 @@
 20
 40
 00
-60
+76
 20
 40
 61
@@ -319,7 +407,7 @@
 20
 20
 00
-4f
+65
 58
 00
 00
@@ -347,7 +435,7 @@
 20
 3a
 00
-58
+6e
 6f
 e0
 84
@@ -355,7 +443,7 @@
 c3
 01
 00
-5b
+71
 6f
 e1
 44
@@ -391,7 +479,7 @@
 58
 00
 00
-68
+7e
 67
 e1
 43
@@ -399,7 +487,7 @@
 58
 00
 00
-65
+7b
 67
 e1
 43
@@ -415,7 +503,7 @@
 20
 40
 00
-6b
+81
 20
 20
 6c
@@ -427,7 +515,7 @@
 20
 40
 00
-65
+7b
 20
 20
 6e
@@ -452,8 +540,8 @@
 60
 00
 00
-43
-22
+80
+80
 aa
 55
 40
@@ -464,7 +552,7 @@
 00
 80
 01
-00
+01
 00
 00
 00
@@ -1142,7 +1230,7 @@
 aa
 aa
 55
-57
+58
 65
-ef
-e9
+9a
+3e
Index: output/ramcode.rom
===================================================================
--- /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/output/ramcode.rom	(revision 1150)
+++ /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/output/ramcode.rom	(working copy)
@@ -1,12 +1,13 @@
-c2840005
-c00b8007
-c00c0015
-c0380030
+c2840006
+c00b8008
+c00c0016
+c0100031
+c0380046
 20203a8a
 c17f8000
 20203a8a
 6fe0c116
-c0030011
+c0030012
 c0053a00
 708a3b2c
 708a3c17
@@ -14,11 +15,11 @@
 708a3a0f
 202039f4
 708a3b48
-2020000b
+2020000c
 708a3b70
 708a3c1f
 708a39c9
-2020000d
+2020000e
 708a7503
 708a8500
 70896f10
@@ -36,16 +37,37 @@
 70896876
 70896976
 6fe0c09a
-c0840028
+c0840029
 708a0834
 708a01ff
 20000064
 708a020e
 708a0003
-2040000a
+2040000b
 708a9a28
 708a9b3f
 20203a35
+6fe143a2
+20407487
+37d98200
+70800501
+20403af7
+37d98200
+70800502
+58000f0f
+20403bfa
+6fe240ae
+9840fe00
+67e240ae
+20403b13
+37d98200
+70800502
+6a4240cc
+6fe2c0c7
+67f2004c
+1b227e00
+67e340b2
+20203b5b
 20406eb3
 20758000
 58000002
@@ -70,22 +92,22 @@
 67e143a2
 5800604d
 67e1438c
-20400060
+20400076
 20406110
 6fe0c474
 c000604a
 6fe0c475
 67e0c437
-2020004f
+20200065
 58000000
 2040612b
 70442f01
 20406ec2
 20406ecc
 6fe0c689
-203a0058
+203a006e
 6fe084f1
-c301005b
+c3010071
 6fe14434
 c3860000
 20204e13
@@ -94,16 +116,16 @@
 58000032
 67e1446c
 20206137
-58000068
+5800007e
 67e1438e
-58000065
+5800007b
 67e14390
 20206040
 20406bc9
-2040006b
+20400081
 20206c75
 704437ff
-20400065
+2040007b
 20206eb7
 58000000
 67e40016
Index: output/sched.rom
===================================================================
--- /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/output/sched.rom	(revision 1150)
+++ /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/output/sched.rom	(working copy)
@@ -3,7 +3,7 @@
 00   #mem_patch01
 80   #mem_patch02
 01   #mem_patch03
-00   #mem_patch04
+01   #mem_patch04
 00   #mem_patch05
 00   #mem_patch06
 00   #mem_patch07
Index: program/patch.prog
===================================================================
--- /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/program/patch.prog	(revision 1150)
+++ /1306ac/branch/shutter/shutter_yc1089jk_kcl_yz09b/program/patch.prog	(working copy)
@@ -3,6 +3,7 @@
 	bbit1 8,pf_patch_ext
 	beq patch02_7,p_tx_on_next
 	beq patch03_0,p_initialize_radio_cont
+	beq patch04_0,p_lpm_sleep
 	beq patch0e_0,p_shutter_init
 	branch assert
 	
@@ -69,6 +70,30 @@
 	jam 0x3f,core_tx_mixer_cfg2
 	branch initialize_radio_cont_next_2
 
+p_lpm_sleep:
+	fetch 2,mem_cb_before_lpm_sleep
+	call callback_func
+	until null,lpo_edge
+	jam lpmreg_sel_ctrl,core_lpm_wr
+	call lpm_ctrl3_cfg_dig_vsel
+	until null,lpo_edge
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	setarg 0xf0f
+	call lpm_write_config_reg
+p_lpm_sleep_skip_cb_function:
+	fetch 4,mem_sleep_counter_all
+	iadd temp,pdata
+	store 4,mem_sleep_counter_all
+	call lpm_save_context
+	until null,lpo_edge
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	fetchr regb,4,mem_lpm_ctrl3
+	fetch 5,mem_lpm_xtalcnt
+	store 4,core_lpm_reg
+	copy clkn,pdata
+	store 6,mem_sleep_clkn 
+	branch lpm_sleep_skip_cb_function+10
+
 
 p_shutter_init:
 	call enable_authrom
