Index: RTC/prj/MDK/YC3121_Keil.uvoptx
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC/prj/MDK/YC3121_Keil.uvoptx	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC/prj/MDK/YC3121_Keil.uvoptx	(working copy)
@@ -229,26 +229,26 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
-  </Group>
-
-  <Group>
-    <GroupName>main</GroupName>
-    <tvExp>1</tvExp>
-    <tvExpOptDlg>0</tvExpOptDlg>
-    <cbSel>0</cbSel>
-    <RteFlg>0</RteFlg>
     <File>
-      <GroupNumber>2</GroupNumber>
+      <GroupNumber>1</GroupNumber>
       <FileNumber>3</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\main.c</PathWithFileName>
-      <FilenameWithoutPath>main.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\core\bt_code.c</PathWithFileName>
+      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
+  </Group>
+
+  <Group>
+    <GroupName>main</GroupName>
+    <tvExp>1</tvExp>
+    <tvExpOptDlg>0</tvExpOptDlg>
+    <cbSel>0</cbSel>
+    <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>2</GroupNumber>
       <FileNumber>4</FileNumber>
@@ -256,8 +256,8 @@
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\bt_code.c</PathWithFileName>
-      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\user\main.c</PathWithFileName>
+      <FilenameWithoutPath>main.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
@@ -324,8 +324,8 @@
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_ipc.c</PathWithFileName>
-      <FilenameWithoutPath>yc_ipc.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_sysctrl.c</PathWithFileName>
+      <FilenameWithoutPath>yc_sysctrl.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
@@ -336,8 +336,8 @@
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_sysctrl.c</PathWithFileName>
-      <FilenameWithoutPath>yc_sysctrl.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_ipc.c</PathWithFileName>
+      <FilenameWithoutPath>yc_ipc.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
Index: RTC/prj/MDK/YC3121_Keil.uvprojx
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC/prj/MDK/YC3121_Keil.uvprojx	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC/prj/MDK/YC3121_Keil.uvprojx	(working copy)
@@ -337,7 +337,7 @@
               <MiscControls></MiscControls>
               <Define>__USEKEILCOMPILE__</Define>
               <Undefine></Undefine>
-              <IncludePath>..\..\..\..\..\Librarier\sdk;..\..\..\..\..\Librarier\core;..\..\user</IncludePath>
+              <IncludePath>..\..\..\..\..\Librarier\sdk;..\..\..\..\..\Librarier\core</IncludePath>
             </VariousControls>
           </Cads>
           <Aads>
@@ -391,6 +391,11 @@
               <FileType>1</FileType>
               <FilePath>..\..\..\..\..\Librarier\core\system.c</FilePath>
             </File>
+            <File>
+              <FileName>bt_code.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\..\..\Librarier\core\bt_code.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>
@@ -401,11 +406,6 @@
               <FileType>1</FileType>
               <FilePath>..\..\user\main.c</FilePath>
             </File>
-            <File>
-              <FileName>bt_code.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\user\bt_code.c</FilePath>
-            </File>
           </Files>
         </Group>
         <Group>
@@ -432,14 +432,14 @@
               <FilePath>..\..\..\..\..\Librarier\sdk\yc_lpm.c</FilePath>
             </File>
             <File>
-              <FileName>yc_ipc.c</FileName>
+              <FileName>yc_sysctrl.c</FileName>
               <FileType>1</FileType>
-              <FilePath>..\..\..\..\..\Librarier\sdk\yc_ipc.c</FilePath>
+              <FilePath>..\..\..\..\..\Librarier\sdk\yc_sysctrl.c</FilePath>
             </File>
             <File>
-              <FileName>yc_sysctrl.c</FileName>
+              <FileName>yc_ipc.c</FileName>
               <FileType>1</FileType>
-              <FilePath>..\..\..\..\..\Librarier\sdk\yc_sysctrl.c</FilePath>
+              <FilePath>..\..\..\..\..\Librarier\sdk\yc_ipc.c</FilePath>
             </File>
             <File>
               <FileName>yc_otp.c</FileName>
Index: RTC/user/bt_code.h
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC/user/bt_code.h	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC/user/bt_code.h	(nonexistent)
@@ -1 +0,0 @@
-extern const unsigned char bt_code[];
Index: RTC/user/bt_code.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC/user/bt_code.c	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC/user/bt_code.c	(nonexistent)
@@ -1,116 +0,0 @@
-const unsigned char bt_code[] = {
-0x00,0x02,0xaa,0x55,0x7a,0x03,0xc0,0x42,0x80,0x19,0xc0,0x43,0x00,0x1b,0xc0,0x43,
-0x80,0x1f,0xc0,0x44,0x00,0x1d,0xc0,0x44,0x80,0x28,0xc0,0x45,0x00,0x2d,0xc0,0x02,
-0x00,0x0d,0xc0,0x03,0x00,0x08,0x20,0x40,0x57,0xaf,0x24,0x36,0xd8,0xa5,0x20,0x40,
-0x00,0xb5,0x20,0x40,0x49,0x36,0x20,0x20,0x58,0xa6,0x09,0x80,0x00,0x18,0x78,0x28,
-0x7c,0x00,0xdb,0x60,0x06,0x64,0x1f,0xef,0x7e,0x00,0x1f,0xf1,0x7e,0x00,0xe7,0xe6,
-0x00,0x05,0x20,0x23,0x46,0x49,0x78,0x36,0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,
-0x84,0x00,0x20,0x40,0x00,0xb9,0x20,0x20,0x58,0x97,0x20,0x40,0x00,0xb1,0x20,0x20,
-0x48,0xf6,0x20,0x40,0x00,0xb3,0x20,0x20,0x49,0x16,0x20,0x40,0x00,0xb7,0x20,0x20,
-0x49,0x22,0x60,0x42,0x00,0x17,0x20,0x20,0x00,0xbb,0x20,0x40,0x00,0xbb,0xda,0x20,
-0x89,0x60,0x20,0x40,0x00,0xa7,0xda,0x20,0x00,0x10,0x20,0x40,0x00,0xa7,0xda,0x20,
-0x00,0x00,0x20,0x20,0x00,0xd6,0x60,0x42,0x00,0x17,0x20,0x40,0x00,0xb9,0x58,0x00,
-0x03,0x84,0x20,0x40,0x4a,0x8e,0x20,0x20,0x49,0x36,0x70,0x89,0x07,0xff,0x70,0x80,
-0x42,0x05,0x20,0x00,0x03,0xe8,0x6f,0xe2,0x4f,0xef,0x24,0x7a,0x00,0x00,0x70,0x4f,
-0xef,0x01,0x70,0x89,0x4e,0xc2,0x70,0x89,0x4e,0xc0,0x20,0x40,0x00,0xca,0xc0,0x81,
-0x00,0x43,0x20,0x00,0x75,0x30,0x20,0x40,0x00,0xca,0xc0,0x81,0x00,0x43,0x20,0x00,
-0x27,0x10,0xda,0x20,0x89,0x56,0xda,0x40,0x00,0xf0,0x20,0x40,0x00,0xd1,0xda,0x20,
-0x89,0x55,0x20,0x40,0x00,0xa7,0xda,0x20,0x00,0x00,0x20,0x40,0x00,0xd6,0x20,0x60,
-0x00,0x00,0x20,0x20,0x00,0x43,0x20,0x40,0x00,0x46,0x20,0x20,0x48,0xf5,0x20,0x40,
-0x00,0x6e,0x20,0x40,0x00,0x77,0x79,0x20,0x2a,0x00,0x78,0x46,0xfc,0x00,0x78,0x2e,
-0xfc,0x00,0x78,0x30,0x7c,0x00,0x78,0x50,0xfc,0x00,0x19,0x31,0x7e,0x00,0x1f,0xec,
-0xfe,0x00,0x1f,0xf1,0xfe,0x00,0x08,0x00,0x86,0x28,0x78,0x24,0xfc,0x00,0x6f,0xe2,
-0x43,0xae,0x08,0x00,0x86,0x08,0xef,0xe2,0x00,0x06,0x1f,0xe1,0x72,0x3f,0x08,0x00,
-0x86,0x08,0x20,0x22,0x80,0x5b,0xef,0xe2,0x00,0x06,0x08,0x00,0x86,0x08,0xc2,0x00,
-0x00,0x58,0x78,0x24,0x7c,0x00,0x08,0x00,0x86,0x18,0x78,0x44,0x7c,0x00,0x37,0xd3,
-0x82,0x00,0x20,0x00,0x00,0x64,0x20,0x60,0x00,0x00,0x78,0x3b,0x7c,0x00,0x70,0x89,
-0x14,0x07,0x20,0x60,0x00,0x00,0x78,0x5b,0x7c,0x00,0x70,0x89,0x14,0x03,0x20,0x60,
-0x00,0x00,0x58,0x71,0x76,0x41,0x1f,0xed,0x7e,0x00,0x1f,0xe1,0xfe,0x29,0x98,0x00,
-0x12,0x00,0x58,0x55,0x55,0x55,0x67,0xe6,0x04,0x63,0x20,0x60,0x00,0x00,0x78,0x44,
-0xfc,0x00,0x78,0x43,0xfc,0x00,0x6f,0xe6,0x04,0x63,0x98,0x00,0x1e,0x00,0x6f,0xe2,
-0x00,0x16,0x1f,0xed,0x84,0x00,0x79,0x20,0x04,0x01,0x18,0x43,0x1c,0x00,0x20,0x60,
-0x00,0x00,0x20,0x40,0x00,0x7c,0x20,0x20,0x49,0x30,0x20,0x40,0x00,0x7c,0x20,0x40,
-0x49,0x1c,0x20,0x20,0x49,0x21,0x20,0x40,0x49,0x15,0x6f,0xe2,0x00,0x16,0x1f,0xe3,
-0x84,0x00,0x20,0x60,0x00,0x00,0x20,0x40,0x00,0x79,0x20,0x40,0x00,0x6e,0x78,0x56,
-0xfc,0x00,0x78,0x26,0xfc,0x00,0x78,0x4e,0xfc,0x00,0x78,0x30,0xfc,0x00,0x78,0x50,
-0x7c,0x00,0x19,0x62,0x36,0x00,0x37,0xc1,0x84,0x00,0x24,0x2c,0x48,0xf5,0x1b,0x42,
-0x04,0x00,0xdd,0x20,0x01,0xe0,0x1c,0x22,0x50,0x00,0x78,0x24,0xfc,0x00,0x09,0x80,
-0x00,0x08,0x19,0x89,0x7e,0x00,0x67,0xe2,0x02,0xd5,0x09,0x80,0x00,0x08,0x19,0x89,
-0x7e,0x00,0xe7,0xe2,0x00,0x05,0x1f,0xe1,0x72,0x3f,0x20,0x22,0x80,0x9a,0x09,0x80,
-0x00,0x08,0x19,0x89,0x7e,0x00,0xe7,0xe2,0x00,0x05,0xc2,0x00,0x00,0x96,0x09,0x80,
-0x00,0x18,0x78,0x28,0x7c,0x00,0xdb,0x60,0x06,0x64,0x1f,0xef,0x7e,0x00,0x1f,0xf1,
-0x7e,0x00,0xe7,0xe6,0x00,0x05,0x20,0x40,0x49,0xba,0x20,0x23,0x48,0xf5,0x78,0x36,
-0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,0xa2,0x02,0x20,0x40,0x49,0x80,0x20,0x20,
-0x49,0x15,0x58,0x00,0x00,0x00,0x67,0xf0,0x0a,0x96,0xdf,0x20,0x00,0x08,0xda,0x40,
-0x0a,0x96,0x20,0x40,0x00,0xcd,0xe7,0xe2,0x00,0x12,0x1a,0x40,0xa4,0x01,0x1a,0x20,
-0xa2,0x01,0xc2,0x00,0x00,0xab,0x20,0x60,0x00,0x00,0xda,0x40,0x00,0xfe,0x20,0x20,
-0x00,0xd2,0xda,0x40,0x00,0xfd,0x20,0x20,0x00,0xd2,0xda,0x40,0x00,0xfc,0x20,0x20,
-0x00,0xd2,0xda,0x40,0x00,0xfb,0x20,0x20,0x00,0xd2,0x18,0x42,0x24,0x00,0x20,0x20,
-0x00,0xd2,0x18,0x41,0xa4,0x80,0x20,0x20,0x00,0xd2,0x67,0xe2,0x89,0x4b,0x70,0x89,
-0x4e,0xc5,0x70,0x89,0x4e,0xc4,0x6f,0xe2,0x89,0x91,0xc4,0x00,0x80,0x00,0x20,0x20,
-0x00,0xc0,0x6f,0xe2,0x89,0x91,0xc3,0x00,0x00,0xc3,0x6f,0xe2,0x89,0x90,0x70,0x89,
-0x4e,0xc6,0x70,0x89,0x4e,0xc4,0x20,0x00,0x03,0xe8,0x20,0x60,0x00,0x00,0x58,0x00,
-0x00,0x02,0x20,0x40,0x00,0xbd,0x20,0x20,0x00,0xc3,0x20,0x40,0x00,0xd6,0x58,0x00,
-0x00,0x06,0x20,0x40,0x00,0xbd,0x20,0x20,0x00,0xc3,0x20,0x40,0x00,0xd6,0x58,0x00,
-0x00,0x05,0x20,0x40,0x00,0xbd,0x1a,0x42,0x7e,0x00,0x20,0x20,0x00,0xbd,0x58,0x00,
-0x00,0x0b,0x20,0x40,0x00,0xbd,0x1a,0x2c,0xfe,0x00,0x20,0x40,0x00,0xbd,0x58,0x00,
-0x00,0x03,0x20,0x40,0x00,0xbd,0x1a,0x21,0x7e,0xff,0x20,0x20,0x00,0xbd,0x3f,0xc9,
-0xaa,0x55,0x01,0x00,0x92,0x40,0x0a,0xaa,0x55,0x01,0x00,0x54,0x46,0x40,0xaa,0x55,
-0x01,0x00,0x06,0x42,0x13,0xaa,0x55,0x08,0x00,0x98,0x40,0xff,0xff,0x8f,0xf8,0x9b,
-0x9d,0x59,0x83,0xaa,0x55,0x03,0x00,0x14,0x42,0x07,0x4a,0x05,0xaa,0x55,0x04,0x00,
-0x3d,0x45,0x00,0x7f,0x00,0x07,0xaa,0x55,0x03,0x00,0x2d,0x46,0x03,0x00,0x04,0xaa,
-0x55,0x01,0x00,0x2c,0x46,0x01,0xaa,0x55,0x06,0x00,0x57,0x46,0x04,0x30,0x30,0x30,
-0x30,0x30,0xaa,0x55,0x10,0x00,0xf0,0x4f,0x00,0x1c,0xff,0x1f,0x00,0x1c,0x00,0x1c,
-0x00,0x4c,0xe0,0x4f,0x00,0x4c,0x00,0x4c,0xaa,0x55,0x02,0x00,0x68,0x46,0x00,0x01,
-0xaa,0x55,0x01,0x00,0x6c,0x46,0x03,0xaa,0x55,0x01,0x00,0x6f,0x46,0x07,0xaa,0x55,
-0x03,0x00,0xaa,0x40,0x24,0x04,0x04,0xaa,0x55,0x01,0x00,0x79,0x46,0x00,0xaa,0x55,
-0x01,0x00,0x91,0x40,0x00,0xaa,0x55,0x03,0x00,0x54,0x41,0x00,0x01,0x08,0xaa,0x55,
-0x01,0x00,0x74,0x41,0x02,0xaa,0x55,0x01,0x00,0x93,0x40,0x03,0xaa,0x55,0x01,0x00,
-0x6d,0x46,0x28,0xaa,0x55,0x06,0x00,0xa0,0x40,0xa7,0x2a,0x2a,0x31,0x10,0x3a,0xaa,
-0x55,0x0c,0x00,0xe7,0x44,0x0b,0x59,0x69,0x63,0x68,0x69,0x70,0x20,0x33,0x31,0x32,
-0x31,0xaa,0x55,0x03,0x00,0xe4,0x41,0x20,0x00,0x01,0xaa,0x55,0x01,0x00,0xe8,0x41,
-0x00,0xaa,0x55,0x01,0x00,0x90,0x44,0x01,0xaa,0x55,0x01,0x00,0x5f,0x44,0x07,0xaa,
-0x55,0x01,0x00,0x98,0x44,0x01,0xaa,0x55,0x04,0x00,0x75,0x46,0x09,0x00,0x2f,0x00,
-0xaa,0x55,0x01,0x00,0x40,0x43,0x01,0xaa,0x55,0x02,0x00,0x54,0x44,0xf0,0x00,0xaa,
-0x55,0x01,0x00,0x6e,0x46,0x05,0xaa,0x55,0x06,0x00,0x72,0x44,0x21,0x22,0x00,0x33,
-0x02,0x3a,0xaa,0x55,0x10,0x00,0x81,0x43,0x0f,0x59,0x69,0x63,0x68,0x69,0x70,0x20,
-0x33,0x31,0x32,0x31,0x20,0x4d,0x6f,0x75,0xaa,0x55,0x04,0x00,0x41,0x43,0x03,0x02,
-0x01,0x0e,0xaa,0x55,0x13,0x00,0x61,0x43,0x0e,0x11,0x09,0x59,0x69,0x63,0x68,0x69,
-0x70,0x20,0x31,0x30,0x32,0x31,0x73,0x20,0x4d,0x6f,0x75,0xaa,0x55,0x07,0x00,0x25,
-0x44,0x02,0x03,0x00,0x05,0x10,0x02,0x03,0xaa,0x55,0x08,0x00,0x68,0x44,0x08,0x00,
-0x10,0x00,0x00,0x00,0x2c,0x01,0xaa,0x55,0x01,0x00,0x78,0x44,0xb5,0xaa,0x55,0x01,
-0x00,0x7a,0x44,0x17,0xaa,0x55,0x02,0x00,0xcc,0x44,0x31,0x00,0xaa,0x55,0x01,0x00,
-0xd1,0x40,0x01,0xaa,0x55,0x0c,0x00,0x49,0x45,0x05,0x03,0x00,0x12,0x00,0x01,0x01,
-0x00,0x01,0x11,0x03,0x00,0xaa,0x55,0x01,0x00,0x5f,0x45,0x00,0xaa,0x55,0x02,0x00,
-0x47,0x45,0x83,0x46,0xaa,0x55,0xb8,0x00,0x83,0x46,0x03,0x12,0x00,0x01,0x00,0x00,
-0x01,0x00,0x01,0x00,0x01,0x36,0x00,0x52,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x01,
-0x09,0x00,0x01,0x35,0x03,0x19,0x12,0x00,0x09,0x00,0x04,0x35,0x0d,0x35,0x06,0x19,
-0x01,0x00,0x09,0x00,0x01,0x35,0x03,0x19,0x00,0x01,0x09,0x00,0x09,0x35,0x08,0x35,
-0x06,0x19,0x12,0x00,0x09,0x01,0x00,0x09,0x02,0x00,0x09,0x01,0x03,0x09,0x02,0x01,
-0x09,0x05,0xac,0x09,0x02,0x02,0x09,0x02,0x39,0x09,0x02,0x03,0x09,0x06,0x44,0x09,
-0x02,0x04,0x28,0x01,0x09,0x02,0x05,0x09,0x00,0x02,0x03,0x11,0x01,0x00,0x03,0x01,
-0x00,0x00,0x01,0x00,0x03,0x36,0x00,0x46,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x03,
-0x09,0x00,0x01,0x35,0x03,0x19,0x11,0x01,0x09,0x00,0x02,0x0a,0x00,0x00,0x00,0x00,
-0x09,0x00,0x04,0x35,0x0c,0x35,0x03,0x19,0x01,0x00,0x35,0x05,0x19,0x00,0x03,0x08,
-0x01,0x09,0x00,0x06,0x35,0x09,0x09,0x65,0x6e,0x09,0x00,0x6a,0x09,0x01,0x00,0x09,
-0x01,0x00,0x25,0x0a,0x53,0x50,0x50,0x20,0x73,0x6c,0x61,0x76,0x65,0x00,0x00,0x00,
-0x01,0x00,0xaa,0x55,0x02,0x00,0x8e,0x44,0xaf,0x47,0xaa,0x55,0x8a,0x00,0xaf,0x47,
-0x01,0x00,0x02,0x00,0x28,0x02,0x00,0x18,0x02,0x00,0x02,0x03,0x28,0x01,0x0a,0x03,
-0x00,0x02,0x00,0x2a,0x13,0x41,0x73,0x74,0x20,0x4c,0x45,0x20,0x4d,0x6f,0x75,0x73,
-0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x04,0x00,0x02,0x00,0x28,0x10,0x55,0xe4,
-0x05,0xd2,0xaf,0x9f,0xa9,0x8f,0xe5,0x4a,0x7d,0xfe,0x43,0x53,0x53,0x49,0x05,0x00,
-0x02,0x03,0x28,0x01,0x10,0x06,0x00,0x02,0x87,0x05,0x14,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
-0x00,0x02,0x02,0x29,0x02,0x00,0x00,0x08,0x00,0x02,0x03,0x28,0x01,0x0e,0x09,0x00,
-0x02,0x98,0x05,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0x10,0x40,
-0xe0,0x07,0xaa,0x55,0x01,0x00,0x20,0x40,0x50,0xaa,0x55,0x04,0x00,0x79,0x41,0x0a,
-0x0b,0xb2,0x32,0xaa,0x55,0x02,0x00,0x57,0x41,0x8b,0x0b,0xaa,0x55,0x08,0x00,0xa1,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0xbd,0x40,0x02,
-0x24,0xaa,0x55,0x08,0x00,0xad,0x40,0x24,0x00,0x80,0x00,0x24,0x00,0x80,0x00,0xaa,
-0x55,0x02,0x00,0xbb,0x40,0x20,0x00,0xaa,0x55,0x04,0x00,0xb7,0x40,0x20,0x00,0x00,
-0x20,0xaa,0x55,0x04,0x00,0xbf,0x40,0x80,0x04,0x00,0x10,0xaa,0x55,0x05,0x00,0xe2,
-0x44,0x08,0x0e,0x05,0x04,0x00,0xaa,0x55,0x02,0x00,0x02,0x42,0x30,0x1f,0xaa,0x55,
-0x01,0x00,0x10,0x42,0x20,0xaa,0x55,0x01,0x00,0xe0,0x41,0x01,0xaa,0x55,0x01,0x00,
-0xe2,0x41,0xff,0xaa,0x55,0x02,0x00,0xc3,0x40,0xe2,0x41,0x97,0xc3
-};
Index: RTC/user/main.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC/user/main.c	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC/user/main.c	(working copy)
@@ -1,6 +1,6 @@
 /**
   ******************************************************************************
-  * @file    ModuleDemo/BPU/RTC/use/main.c
+  * @file    3121Demo\ModuleDemo\BPU\RTC\use\main.c
   * @author  Yichip Application Team
   * @version V1.0.0
   * @date    19-Feb-2019
@@ -10,12 +10,12 @@
   *
   * COPYRIGHT 2019 Yichip Microelectronics
   *
-  * The purpose of this firmware is to provide guidance to customers engaged in 
-	* programming work to guide them smoothly to product development, 
+  * The purpose of this firmware is to provide guidance to customers engaged in
+	* programming work to guide them smoothly to product development,
 	* so as to save their time.
 	*
-	* Therefore, Yichip microelectronics shall not be responsible for any direct, 
-	* indirect or consequential damages caused by any content of this gu jiang 
+	* Therefore, Yichip microelectronics shall not be responsible for any direct,
+	* indirect or consequential damages caused by any content of this gu jiang
 	* and/or contained in this code used by the customer in its products.
   *
   ******************************************************************************
@@ -28,11 +28,11 @@
 #include "yc_rtc.h"
 #include "yc_lpm.h"
 #include "misc.h"
+#include "board_config.h"
 
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
-#define uartBaud 115200
-#define ONE_MINUTE     60
+#define ONE_MINUTE 60
 
 /* Private macro -------------------------------------------------------------*/
 /* Private variables ---------------------------------------------------------*/
@@ -48,40 +48,38 @@
   */
 int main(void)
 {
-	NVIC_Configuration();
-	UART_Configuration();
+    NVIC_Configuration();
+    UART_Configuration();
 
-	
-	MyPrintf("YcChip Yc3121 RTC Demo V1.0.\n");
-	
-	RTC_Configuration();
-	
-	while(1)
-	{	
-		
-	}
+    MyPrintf("YcChip Yc3121 RTC Demo V1.0.\n");
+
+    RTC_Configuration();
+
+    while (1)
+    {
+
+    }
 }
 
 void NVIC_Configuration(void)
 {
-	NVIC_EnableIRQ(SEC_IRQn);
-	NVIC_SetPriority(SEC_IRQn, 0);
+    NVIC_EnableIRQ(SEC_IRQn);
+    NVIC_SetPriority(SEC_IRQn, 0);
 }
 
 void RTC_Configuration(void)
 {
-	uint32_t i = 0xffff;
-	while (i--);
-	
-	MyPrintf("32k RtcCVal: 0x%x\n", RTC_Get_SexMax());
- 
-	RTC_Calibration();
-	RTC_SetWakeUpCounter(5);
-	RTC_SetRefRegister(0);
-	
+    uint32_t i = 0xffff;
+    while (i--);
 
-	RTC_Config(ENABLE);
-	RTC_ClearITPendingBit();
+    MyPrintf("32k RtcCVal: 0x%x\n", RTC_Get_SexMax());
+
+    RTC_Calibration();
+    RTC_SetWakeUpCounter(5);
+    RTC_SetRefRegister(0);
+
+    RTC_Config(ENABLE);
+    RTC_ClearITPendingBit();
 }
 
 /**
@@ -91,28 +89,28 @@
   */
 void UART_Configuration(void)
 {
-	UART_InitTypeDef UART_InitStruct;
+    UART_InitTypeDef UART_InitStruct;
 
-	/* Configure serial ports RX and TX for IO. */
-	GPIO_Config(GPIOA, GPIO_Pin_1, UART0_TXD);
-	GPIO_Config(GPIOA, GPIO_Pin_0, UART0_RXD);
-
-	/* USARTx configured as follow:
-  - BaudRate = 115200 baud  
-  - Word Length = 8 Bits
-  - Stop Bit = 1 Stop Bit
-  - Parity = No Parity
-  - Hardware flow control disabled (RTS and CTS signals)
-  - Receive and transmit enabled
-  */
-	UART_InitStruct.BaudRate = uartBaud;			//Configure serial port baud rate, the baud rate defaults to 128000.
-	UART_InitStruct.DataBits = Databits_8b;
-	UART_InitStruct.StopBits = StopBits_1;
-	UART_InitStruct.Parity = Parity_None;
-	UART_InitStruct.FlowCtrl = FlowCtrl_None;
-	UART_InitStruct.Mode = Mode_duplex;
+    /* Configure serial ports RX and TX for IO. */
+    UART0_TX_IO_CONFIG
+    UART0_RX_IO_CONFIG
+
+    /* USARTx configured as follow:
+    - BaudRate = 115200 baud
+    - Word Length = 8 Bits
+    - Stop Bit = 1 Stop Bit
+    - Parity = No Parity
+    - Hardware flow control disabled (RTS and CTS signals)
+    - Receive and transmit enabled
+    */
+    UART_InitStruct.BaudRate = UARTBAUD;			//Configure serial port baud rate, the baud rate defaults to 128000.
+    UART_InitStruct.DataBits = Databits_8b;
+    UART_InitStruct.StopBits = StopBits_1;
+    UART_InitStruct.Parity = Parity_None;
+    UART_InitStruct.FlowCtrl = FlowCtrl_None;
+    UART_InitStruct.Mode = Mode_duplex;
 
-	UART_Init(UART0, &UART_InitStruct);
+    UART_Init(UART0, &UART_InitStruct);
 }
 
 /**
@@ -122,13 +120,13 @@
   */
 void SEC_IRQHandler(void)
 {
-	static uint32_t timer = 0;
-	timer = RTC_GetRefRegister();
-	MyPrintf("%d second.\n", timer);
-	timer += 5;
-	RTC_SetWakeUpCounter(timer);
-	RTC_Calibration();
-	RTC_ClearITPendingBit();
+    static uint32_t timer = 0;
+    timer = RTC_GetRefRegister();
+    MyPrintf("%d second.\n", timer);
+    timer += 5;
+    RTC_SetWakeUpCounter(timer);
+    RTC_Calibration();
+    RTC_ClearITPendingBit();
 }
 
 /************************ (C) COPYRIGHT Yichip Microelectronics *****END OF FILE****/
Index: RTC_Time/prj/MDK/YC3121_Keil.uvoptx
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/prj/MDK/YC3121_Keil.uvoptx	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/prj/MDK/YC3121_Keil.uvoptx	(working copy)
@@ -229,26 +229,26 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
-  </Group>
-
-  <Group>
-    <GroupName>main</GroupName>
-    <tvExp>1</tvExp>
-    <tvExpOptDlg>0</tvExpOptDlg>
-    <cbSel>0</cbSel>
-    <RteFlg>0</RteFlg>
     <File>
-      <GroupNumber>2</GroupNumber>
+      <GroupNumber>1</GroupNumber>
       <FileNumber>3</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\main.c</PathWithFileName>
-      <FilenameWithoutPath>main.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\core\bt_code.c</PathWithFileName>
+      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
+  </Group>
+
+  <Group>
+    <GroupName>main</GroupName>
+    <tvExp>1</tvExp>
+    <tvExpOptDlg>0</tvExpOptDlg>
+    <cbSel>0</cbSel>
+    <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>2</GroupNumber>
       <FileNumber>4</FileNumber>
@@ -256,8 +256,8 @@
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\bt_code.c</PathWithFileName>
-      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\user\main.c</PathWithFileName>
+      <FilenameWithoutPath>main.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
@@ -368,12 +368,12 @@
     <File>
       <GroupNumber>3</GroupNumber>
       <FileNumber>13</FileNumber>
-      <FileType>1</FileType>
+      <FileType>4</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_qspi.c</PathWithFileName>
-      <FilenameWithoutPath>yc_qspi.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_qspi.lib</PathWithFileName>
+      <FilenameWithoutPath>yc_qspi.lib</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
Index: RTC_Time/prj/MDK/YC3121_Keil.uvprojx
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/prj/MDK/YC3121_Keil.uvprojx	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/prj/MDK/YC3121_Keil.uvprojx	(working copy)
@@ -184,7 +184,6 @@
             <hadXRAM>0</hadXRAM>
             <uocXRam>0</uocXRam>
             <RvdsVP>0</RvdsVP>
-            <RvdsMve>0</RvdsMve>
             <hadIRAM2>0</hadIRAM2>
             <hadIROM2>0</hadIROM2>
             <StupSel>8</StupSel>
@@ -338,7 +337,7 @@
               <MiscControls></MiscControls>
               <Define>__USEKEILCOMPILE__</Define>
               <Undefine></Undefine>
-              <IncludePath>..\..\..\..\..\Librarier\sdk;..\..\..\..\..\Librarier\core;..\..\user</IncludePath>
+              <IncludePath>..\..\..\..\..\Librarier\sdk;..\..\..\..\..\Librarier\core</IncludePath>
             </VariousControls>
           </Cads>
           <Aads>
@@ -392,6 +391,11 @@
               <FileType>1</FileType>
               <FilePath>..\..\..\..\..\Librarier\core\system.c</FilePath>
             </File>
+            <File>
+              <FileName>bt_code.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\..\..\Librarier\core\bt_code.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>
@@ -402,11 +406,6 @@
               <FileType>1</FileType>
               <FilePath>..\..\user\main.c</FilePath>
             </File>
-            <File>
-              <FileName>bt_code.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\user\bt_code.c</FilePath>
-            </File>
           </Files>
         </Group>
         <Group>
@@ -453,9 +452,9 @@
               <FilePath>..\..\..\..\..\Librarier\sdk\yc_timer.c</FilePath>
             </File>
             <File>
-              <FileName>yc_qspi.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\..\..\..\Librarier\sdk\yc_qspi.c</FilePath>
+              <FileName>yc_qspi.lib</FileName>
+              <FileType>4</FileType>
+              <FilePath>..\..\..\..\..\Librarier\sdk\yc_qspi.lib</FilePath>
             </File>
           </Files>
         </Group>
Index: RTC_Time/user/bt_code.h
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/bt_code.h	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/bt_code.h	(nonexistent)
@@ -1 +0,0 @@
-extern const unsigned char bt_code[];
Index: RTC_Time/user/bt_code.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/bt_code.c	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/bt_code.c	(nonexistent)
@@ -1,116 +0,0 @@
-const unsigned char bt_code[] = {
-0x00,0x02,0xaa,0x55,0x7a,0x03,0xc0,0x42,0x80,0x19,0xc0,0x43,0x00,0x1b,0xc0,0x43,
-0x80,0x1f,0xc0,0x44,0x00,0x1d,0xc0,0x44,0x80,0x28,0xc0,0x45,0x00,0x2d,0xc0,0x02,
-0x00,0x0d,0xc0,0x03,0x00,0x08,0x20,0x40,0x57,0xaf,0x24,0x36,0xd8,0xa5,0x20,0x40,
-0x00,0xb5,0x20,0x40,0x49,0x36,0x20,0x20,0x58,0xa6,0x09,0x80,0x00,0x18,0x78,0x28,
-0x7c,0x00,0xdb,0x60,0x06,0x64,0x1f,0xef,0x7e,0x00,0x1f,0xf1,0x7e,0x00,0xe7,0xe6,
-0x00,0x05,0x20,0x23,0x46,0x49,0x78,0x36,0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,
-0x84,0x00,0x20,0x40,0x00,0xb9,0x20,0x20,0x58,0x97,0x20,0x40,0x00,0xb1,0x20,0x20,
-0x48,0xf6,0x20,0x40,0x00,0xb3,0x20,0x20,0x49,0x16,0x20,0x40,0x00,0xb7,0x20,0x20,
-0x49,0x22,0x60,0x42,0x00,0x17,0x20,0x20,0x00,0xbb,0x20,0x40,0x00,0xbb,0xda,0x20,
-0x89,0x60,0x20,0x40,0x00,0xa7,0xda,0x20,0x00,0x10,0x20,0x40,0x00,0xa7,0xda,0x20,
-0x00,0x00,0x20,0x20,0x00,0xd6,0x60,0x42,0x00,0x17,0x20,0x40,0x00,0xb9,0x58,0x00,
-0x03,0x84,0x20,0x40,0x4a,0x8e,0x20,0x20,0x49,0x36,0x70,0x89,0x07,0xff,0x70,0x80,
-0x42,0x05,0x20,0x00,0x03,0xe8,0x6f,0xe2,0x4f,0xef,0x24,0x7a,0x00,0x00,0x70,0x4f,
-0xef,0x01,0x70,0x89,0x4e,0xc2,0x70,0x89,0x4e,0xc0,0x20,0x40,0x00,0xca,0xc0,0x81,
-0x00,0x43,0x20,0x00,0x75,0x30,0x20,0x40,0x00,0xca,0xc0,0x81,0x00,0x43,0x20,0x00,
-0x27,0x10,0xda,0x20,0x89,0x56,0xda,0x40,0x00,0xf0,0x20,0x40,0x00,0xd1,0xda,0x20,
-0x89,0x55,0x20,0x40,0x00,0xa7,0xda,0x20,0x00,0x00,0x20,0x40,0x00,0xd6,0x20,0x60,
-0x00,0x00,0x20,0x20,0x00,0x43,0x20,0x40,0x00,0x46,0x20,0x20,0x48,0xf5,0x20,0x40,
-0x00,0x6e,0x20,0x40,0x00,0x77,0x79,0x20,0x2a,0x00,0x78,0x46,0xfc,0x00,0x78,0x2e,
-0xfc,0x00,0x78,0x30,0x7c,0x00,0x78,0x50,0xfc,0x00,0x19,0x31,0x7e,0x00,0x1f,0xec,
-0xfe,0x00,0x1f,0xf1,0xfe,0x00,0x08,0x00,0x86,0x28,0x78,0x24,0xfc,0x00,0x6f,0xe2,
-0x43,0xae,0x08,0x00,0x86,0x08,0xef,0xe2,0x00,0x06,0x1f,0xe1,0x72,0x3f,0x08,0x00,
-0x86,0x08,0x20,0x22,0x80,0x5b,0xef,0xe2,0x00,0x06,0x08,0x00,0x86,0x08,0xc2,0x00,
-0x00,0x58,0x78,0x24,0x7c,0x00,0x08,0x00,0x86,0x18,0x78,0x44,0x7c,0x00,0x37,0xd3,
-0x82,0x00,0x20,0x00,0x00,0x64,0x20,0x60,0x00,0x00,0x78,0x3b,0x7c,0x00,0x70,0x89,
-0x14,0x07,0x20,0x60,0x00,0x00,0x78,0x5b,0x7c,0x00,0x70,0x89,0x14,0x03,0x20,0x60,
-0x00,0x00,0x58,0x71,0x76,0x41,0x1f,0xed,0x7e,0x00,0x1f,0xe1,0xfe,0x29,0x98,0x00,
-0x12,0x00,0x58,0x55,0x55,0x55,0x67,0xe6,0x04,0x63,0x20,0x60,0x00,0x00,0x78,0x44,
-0xfc,0x00,0x78,0x43,0xfc,0x00,0x6f,0xe6,0x04,0x63,0x98,0x00,0x1e,0x00,0x6f,0xe2,
-0x00,0x16,0x1f,0xed,0x84,0x00,0x79,0x20,0x04,0x01,0x18,0x43,0x1c,0x00,0x20,0x60,
-0x00,0x00,0x20,0x40,0x00,0x7c,0x20,0x20,0x49,0x30,0x20,0x40,0x00,0x7c,0x20,0x40,
-0x49,0x1c,0x20,0x20,0x49,0x21,0x20,0x40,0x49,0x15,0x6f,0xe2,0x00,0x16,0x1f,0xe3,
-0x84,0x00,0x20,0x60,0x00,0x00,0x20,0x40,0x00,0x79,0x20,0x40,0x00,0x6e,0x78,0x56,
-0xfc,0x00,0x78,0x26,0xfc,0x00,0x78,0x4e,0xfc,0x00,0x78,0x30,0xfc,0x00,0x78,0x50,
-0x7c,0x00,0x19,0x62,0x36,0x00,0x37,0xc1,0x84,0x00,0x24,0x2c,0x48,0xf5,0x1b,0x42,
-0x04,0x00,0xdd,0x20,0x01,0xe0,0x1c,0x22,0x50,0x00,0x78,0x24,0xfc,0x00,0x09,0x80,
-0x00,0x08,0x19,0x89,0x7e,0x00,0x67,0xe2,0x02,0xd5,0x09,0x80,0x00,0x08,0x19,0x89,
-0x7e,0x00,0xe7,0xe2,0x00,0x05,0x1f,0xe1,0x72,0x3f,0x20,0x22,0x80,0x9a,0x09,0x80,
-0x00,0x08,0x19,0x89,0x7e,0x00,0xe7,0xe2,0x00,0x05,0xc2,0x00,0x00,0x96,0x09,0x80,
-0x00,0x18,0x78,0x28,0x7c,0x00,0xdb,0x60,0x06,0x64,0x1f,0xef,0x7e,0x00,0x1f,0xf1,
-0x7e,0x00,0xe7,0xe6,0x00,0x05,0x20,0x40,0x49,0xba,0x20,0x23,0x48,0xf5,0x78,0x36,
-0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,0xa2,0x02,0x20,0x40,0x49,0x80,0x20,0x20,
-0x49,0x15,0x58,0x00,0x00,0x00,0x67,0xf0,0x0a,0x96,0xdf,0x20,0x00,0x08,0xda,0x40,
-0x0a,0x96,0x20,0x40,0x00,0xcd,0xe7,0xe2,0x00,0x12,0x1a,0x40,0xa4,0x01,0x1a,0x20,
-0xa2,0x01,0xc2,0x00,0x00,0xab,0x20,0x60,0x00,0x00,0xda,0x40,0x00,0xfe,0x20,0x20,
-0x00,0xd2,0xda,0x40,0x00,0xfd,0x20,0x20,0x00,0xd2,0xda,0x40,0x00,0xfc,0x20,0x20,
-0x00,0xd2,0xda,0x40,0x00,0xfb,0x20,0x20,0x00,0xd2,0x18,0x42,0x24,0x00,0x20,0x20,
-0x00,0xd2,0x18,0x41,0xa4,0x80,0x20,0x20,0x00,0xd2,0x67,0xe2,0x89,0x4b,0x70,0x89,
-0x4e,0xc5,0x70,0x89,0x4e,0xc4,0x6f,0xe2,0x89,0x91,0xc4,0x00,0x80,0x00,0x20,0x20,
-0x00,0xc0,0x6f,0xe2,0x89,0x91,0xc3,0x00,0x00,0xc3,0x6f,0xe2,0x89,0x90,0x70,0x89,
-0x4e,0xc6,0x70,0x89,0x4e,0xc4,0x20,0x00,0x03,0xe8,0x20,0x60,0x00,0x00,0x58,0x00,
-0x00,0x02,0x20,0x40,0x00,0xbd,0x20,0x20,0x00,0xc3,0x20,0x40,0x00,0xd6,0x58,0x00,
-0x00,0x06,0x20,0x40,0x00,0xbd,0x20,0x20,0x00,0xc3,0x20,0x40,0x00,0xd6,0x58,0x00,
-0x00,0x05,0x20,0x40,0x00,0xbd,0x1a,0x42,0x7e,0x00,0x20,0x20,0x00,0xbd,0x58,0x00,
-0x00,0x0b,0x20,0x40,0x00,0xbd,0x1a,0x2c,0xfe,0x00,0x20,0x40,0x00,0xbd,0x58,0x00,
-0x00,0x03,0x20,0x40,0x00,0xbd,0x1a,0x21,0x7e,0xff,0x20,0x20,0x00,0xbd,0x3f,0xc9,
-0xaa,0x55,0x01,0x00,0x92,0x40,0x0a,0xaa,0x55,0x01,0x00,0x54,0x46,0x40,0xaa,0x55,
-0x01,0x00,0x06,0x42,0x13,0xaa,0x55,0x08,0x00,0x98,0x40,0xff,0xff,0x8f,0xf8,0x9b,
-0x9d,0x59,0x83,0xaa,0x55,0x03,0x00,0x14,0x42,0x07,0x4a,0x05,0xaa,0x55,0x04,0x00,
-0x3d,0x45,0x00,0x7f,0x00,0x07,0xaa,0x55,0x03,0x00,0x2d,0x46,0x03,0x00,0x04,0xaa,
-0x55,0x01,0x00,0x2c,0x46,0x01,0xaa,0x55,0x06,0x00,0x57,0x46,0x04,0x30,0x30,0x30,
-0x30,0x30,0xaa,0x55,0x10,0x00,0xf0,0x4f,0x00,0x1c,0xff,0x1f,0x00,0x1c,0x00,0x1c,
-0x00,0x4c,0xe0,0x4f,0x00,0x4c,0x00,0x4c,0xaa,0x55,0x02,0x00,0x68,0x46,0x00,0x01,
-0xaa,0x55,0x01,0x00,0x6c,0x46,0x03,0xaa,0x55,0x01,0x00,0x6f,0x46,0x07,0xaa,0x55,
-0x03,0x00,0xaa,0x40,0x24,0x04,0x04,0xaa,0x55,0x01,0x00,0x79,0x46,0x00,0xaa,0x55,
-0x01,0x00,0x91,0x40,0x00,0xaa,0x55,0x03,0x00,0x54,0x41,0x00,0x01,0x08,0xaa,0x55,
-0x01,0x00,0x74,0x41,0x02,0xaa,0x55,0x01,0x00,0x93,0x40,0x03,0xaa,0x55,0x01,0x00,
-0x6d,0x46,0x28,0xaa,0x55,0x06,0x00,0xa0,0x40,0xa7,0x2a,0x2a,0x31,0x10,0x3a,0xaa,
-0x55,0x0c,0x00,0xe7,0x44,0x0b,0x59,0x69,0x63,0x68,0x69,0x70,0x20,0x33,0x31,0x32,
-0x31,0xaa,0x55,0x03,0x00,0xe4,0x41,0x20,0x00,0x01,0xaa,0x55,0x01,0x00,0xe8,0x41,
-0x00,0xaa,0x55,0x01,0x00,0x90,0x44,0x01,0xaa,0x55,0x01,0x00,0x5f,0x44,0x07,0xaa,
-0x55,0x01,0x00,0x98,0x44,0x01,0xaa,0x55,0x04,0x00,0x75,0x46,0x09,0x00,0x2f,0x00,
-0xaa,0x55,0x01,0x00,0x40,0x43,0x01,0xaa,0x55,0x02,0x00,0x54,0x44,0xf0,0x00,0xaa,
-0x55,0x01,0x00,0x6e,0x46,0x05,0xaa,0x55,0x06,0x00,0x72,0x44,0x21,0x22,0x00,0x33,
-0x02,0x3a,0xaa,0x55,0x10,0x00,0x81,0x43,0x0f,0x59,0x69,0x63,0x68,0x69,0x70,0x20,
-0x33,0x31,0x32,0x31,0x20,0x4d,0x6f,0x75,0xaa,0x55,0x04,0x00,0x41,0x43,0x03,0x02,
-0x01,0x0e,0xaa,0x55,0x13,0x00,0x61,0x43,0x0e,0x11,0x09,0x59,0x69,0x63,0x68,0x69,
-0x70,0x20,0x31,0x30,0x32,0x31,0x73,0x20,0x4d,0x6f,0x75,0xaa,0x55,0x07,0x00,0x25,
-0x44,0x02,0x03,0x00,0x05,0x10,0x02,0x03,0xaa,0x55,0x08,0x00,0x68,0x44,0x08,0x00,
-0x10,0x00,0x00,0x00,0x2c,0x01,0xaa,0x55,0x01,0x00,0x78,0x44,0xb5,0xaa,0x55,0x01,
-0x00,0x7a,0x44,0x17,0xaa,0x55,0x02,0x00,0xcc,0x44,0x31,0x00,0xaa,0x55,0x01,0x00,
-0xd1,0x40,0x01,0xaa,0x55,0x0c,0x00,0x49,0x45,0x05,0x03,0x00,0x12,0x00,0x01,0x01,
-0x00,0x01,0x11,0x03,0x00,0xaa,0x55,0x01,0x00,0x5f,0x45,0x00,0xaa,0x55,0x02,0x00,
-0x47,0x45,0x83,0x46,0xaa,0x55,0xb8,0x00,0x83,0x46,0x03,0x12,0x00,0x01,0x00,0x00,
-0x01,0x00,0x01,0x00,0x01,0x36,0x00,0x52,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x01,
-0x09,0x00,0x01,0x35,0x03,0x19,0x12,0x00,0x09,0x00,0x04,0x35,0x0d,0x35,0x06,0x19,
-0x01,0x00,0x09,0x00,0x01,0x35,0x03,0x19,0x00,0x01,0x09,0x00,0x09,0x35,0x08,0x35,
-0x06,0x19,0x12,0x00,0x09,0x01,0x00,0x09,0x02,0x00,0x09,0x01,0x03,0x09,0x02,0x01,
-0x09,0x05,0xac,0x09,0x02,0x02,0x09,0x02,0x39,0x09,0x02,0x03,0x09,0x06,0x44,0x09,
-0x02,0x04,0x28,0x01,0x09,0x02,0x05,0x09,0x00,0x02,0x03,0x11,0x01,0x00,0x03,0x01,
-0x00,0x00,0x01,0x00,0x03,0x36,0x00,0x46,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x03,
-0x09,0x00,0x01,0x35,0x03,0x19,0x11,0x01,0x09,0x00,0x02,0x0a,0x00,0x00,0x00,0x00,
-0x09,0x00,0x04,0x35,0x0c,0x35,0x03,0x19,0x01,0x00,0x35,0x05,0x19,0x00,0x03,0x08,
-0x01,0x09,0x00,0x06,0x35,0x09,0x09,0x65,0x6e,0x09,0x00,0x6a,0x09,0x01,0x00,0x09,
-0x01,0x00,0x25,0x0a,0x53,0x50,0x50,0x20,0x73,0x6c,0x61,0x76,0x65,0x00,0x00,0x00,
-0x01,0x00,0xaa,0x55,0x02,0x00,0x8e,0x44,0xaf,0x47,0xaa,0x55,0x8a,0x00,0xaf,0x47,
-0x01,0x00,0x02,0x00,0x28,0x02,0x00,0x18,0x02,0x00,0x02,0x03,0x28,0x01,0x0a,0x03,
-0x00,0x02,0x00,0x2a,0x13,0x41,0x73,0x74,0x20,0x4c,0x45,0x20,0x4d,0x6f,0x75,0x73,
-0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x04,0x00,0x02,0x00,0x28,0x10,0x55,0xe4,
-0x05,0xd2,0xaf,0x9f,0xa9,0x8f,0xe5,0x4a,0x7d,0xfe,0x43,0x53,0x53,0x49,0x05,0x00,
-0x02,0x03,0x28,0x01,0x10,0x06,0x00,0x02,0x87,0x05,0x14,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
-0x00,0x02,0x02,0x29,0x02,0x00,0x00,0x08,0x00,0x02,0x03,0x28,0x01,0x0e,0x09,0x00,
-0x02,0x98,0x05,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0x10,0x40,
-0xe0,0x07,0xaa,0x55,0x01,0x00,0x20,0x40,0x50,0xaa,0x55,0x04,0x00,0x79,0x41,0x0a,
-0x0b,0xb2,0x32,0xaa,0x55,0x02,0x00,0x57,0x41,0x8b,0x0b,0xaa,0x55,0x08,0x00,0xa1,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0xbd,0x40,0x02,
-0x24,0xaa,0x55,0x08,0x00,0xad,0x40,0x24,0x00,0x80,0x00,0x24,0x00,0x80,0x00,0xaa,
-0x55,0x02,0x00,0xbb,0x40,0x20,0x00,0xaa,0x55,0x04,0x00,0xb7,0x40,0x20,0x00,0x00,
-0x20,0xaa,0x55,0x04,0x00,0xbf,0x40,0x80,0x04,0x00,0x10,0xaa,0x55,0x05,0x00,0xe2,
-0x44,0x08,0x0e,0x05,0x04,0x00,0xaa,0x55,0x02,0x00,0x02,0x42,0x30,0x1f,0xaa,0x55,
-0x01,0x00,0x10,0x42,0x20,0xaa,0x55,0x01,0x00,0xe0,0x41,0x01,0xaa,0x55,0x01,0x00,
-0xe2,0x41,0xff,0xaa,0x55,0x02,0x00,0xc3,0x40,0xe2,0x41,0x97,0xc3
-};
Index: /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/date.h	(added)
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/date.h	(revision 0)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/date.h	(revision 0)
Index: /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/date.c	(added)
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/date.c	(revision 0)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/date.c	(revision 0)
Index: RTC_Time/user/main.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/main.c	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/RTC_Time/user/main.c	(working copy)
@@ -1,22 +1,22 @@
 /**
   ******************************************************************************
-  * @file    ModuleDemo/BPU/RTC_TIME/use/main.c 
+  * @file    3121Demo\ModuleDemo\BPU\RTC_TIME\use\main.c
   * @author  Yichip Application Team
-  * @version V1.0.0
-  * @date    13-Dec-2019
-  * @brief   Yc3121 RTC interrupt test program.
+  * @version V1.0.1
+  * @date    15-July-2020
+  * @brief   Yc3121 RTC TIME test program.
   ******************************************************************************
   * @attention
   *
   * COPYRIGHT 2019 Yichip Microelectronics
   *
-  * The purpose of this firmware is to provide guidance to customers engaged in 
-	* programming work to guide them smoothly to product development, 
-	* so as to save their time.
-	*
-	* Therefore, Yichip microelectronics shall not be responsible for any direct, 
-	* indirect or consequential damages caused by any content of this gu jiang 
-	* and/or contained in this code used by the customer in its products.
+  * The purpose of this firmware is to provide guidance to customers engaged in
+  * programming work to guide them smoothly to product development,
+  * so as to save their time.
+  *
+  * Therefore, Yichip microelectronics shall not be responsible for any direct,
+  * indirect or consequential damages caused by any content of this gu jiang
+  * and/or contained in this code used by the customer in its products.
   *
   ******************************************************************************
   */
@@ -33,37 +33,36 @@
 #include "stdio.h"
 #include "math.h"
 #include "stdlib.h"
+#include "board_config.h"
+
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
-#define uartBaud 115200
-
 /* Private macro -------------------------------------------------------------*/
+#define RTC_OFFSET_ADR 0x1000000+0x40000
+
 /* Private variables ---------------------------------------------------------*/
+uint8_t Timebuf[15] = {'2', '0', '2', '0', \
+                       '0', '3', '1', '4', \
+                       '2', '3', '5', '9', \
+                       '3', '6', 0
+                      };
+int g_time_offset = 0;
+
 /* Private function prototypes -----------------------------------------------*/
 void UART_Configuration(void);
 void NVIC_Configuration(void);
 void RTC_Configuration(void);
-#define RTC_OFFSET_ADR 0x1000000+0x40000
-             //T40_TbcGetCnt()
-
 uint8_t GetDeviceTime(void);
 uint8_t SetDeviceTime(void);
 
-uint8_t Timebuf[15] = {'2','0','2','0',\
-					'0','3','1','4',\
-					'2','3','5','9',\
-					'3','6',0};
-int g_time_offset = 0;
-
-					
 void UART_Cmd_Menu(void)
 {
-	MyPrintf("-------------RTC年月日时分秒测试案例---------------\n");
-	MyPrintf("-------------发指令字符'0'设置时间-------\n");
-	MyPrintf("-------------发指令字符'2'初始化RTC模块-----纽扣电池没有掉电芯片复位不需要重新初始化RTC-------\n");
-	MyPrintf("-------------发指令字符'1'获取当前时间-------\n");
+    MyPrintf("-------------RTC年月日时分秒测试案例---------------\n");
+    MyPrintf("-------------发指令字符'0'设置时间-------\n");
+    MyPrintf("-------------发指令字符'2'初始化RTC模块-----纽扣电池没有掉电芯片复位不需要重新初始化RTC-------\n");
+    MyPrintf("-------------发指令字符'1'获取当前时间-------\n");
 
-	MyPrintf("收到提示后，按照年月日时分秒14个字符的格式设置时间：如2019年8月20日8点6分6秒  则发20190820080606");
+    MyPrintf("收到提示后，按照年月日时分秒14个字符的格式设置时间：如2019年8月20日8点6分6秒  则发20190820080606");
 }
 
 /**
@@ -73,59 +72,59 @@
   */
 int main(void)
 {
-	UART_Configuration();
-	int i = 0;
-	uint8_t uart_command = 0xff;
-	MyPrintf("YcChip Yc3121 RTC Demo V1.0.\n");
-	UART_Cmd_Menu();
-	g_time_offset =     qspi_flash_read(RTC_OFFSET_ADR, (uint8_t *)(&g_time_offset), 14); //读出时间偏移值
-
-	//SetDeviceTime();
-	while(1)
-	{	
-		if(UART_IsRXFIFONotEmpty(UART0))
-		{
-			uart_command = UART_ReceiveData(UART0);
-		}
-		switch(uart_command)
-		{
-			case '0':
-				i=0;
-				MyPrintf("please input time year+mouth+day+hour+second ;format: 20190206125359;\n");
-				while(1)
-				{
-					if(UART_IsRXFIFONotEmpty(UART0))
-					{
-						Timebuf[i] = UART_ReceiveData(UART0);
-						if(i<13) i++;else break;
-					}
-					
-				}
-			
-				SetDeviceTime();
-				MyPrintf("set device time succ\n");
-			uart_command = 0xff;
-			break;
-			
-			case '1':
-				GetDeviceTime();
-			uart_command = 0xff;
-			break;
-			case '2':
-				RTC_Configuration();
-			MyPrintf("Init RTC\n");
-				uart_command = 0xff;
-			break;		
-		}
-	}
+    UART_Configuration();
+    int i = 0;
+    uint8_t uart_command = 0xff;
+    MyPrintf("YcChip Yc3121 RTC Demo V1.0.\n");
+    UART_Cmd_Menu();
+    g_time_offset =     qspi_flash_read(RTC_OFFSET_ADR, (uint8_t *)(&g_time_offset), 14); //读出时间偏移值
+
+    //SetDeviceTime();
+    while (1)
+    {
+        if (UART_IsRXFIFONotEmpty(UART0))
+        {
+            uart_command = UART_ReceiveData(UART0);
+        }
+        switch (uart_command)
+        {
+        case '0':
+            i = 0;
+            MyPrintf("please input time year+mouth+day+hour+second ;format: 20190206125359;\n");
+            while (1)
+            {
+                if (UART_IsRXFIFONotEmpty(UART0))
+                {
+                    Timebuf[i] = UART_ReceiveData(UART0);
+                    if (i < 13) i++;
+                    else break;
+                }
+            }
+
+            SetDeviceTime();
+            MyPrintf("set device time succ\n");
+            uart_command = 0xff;
+            break;
+
+        case '1':
+            GetDeviceTime();
+            uart_command = 0xff;
+            break;
+        case '2':
+            RTC_Configuration();
+            MyPrintf("Init RTC\n");
+            uart_command = 0xff;
+            break;
+        }
+    }
 }
 
 
 void RTC_Configuration(void)
 {
-	RTC_Calibration();//RTC校准,
-	RTC_SetRefRegister(0);//重新开始计数。
-	RTC_Config(ENABLE);
+    RTC_Calibration();//RTC校准,
+    RTC_SetRefRegister(0);//重新开始计数。
+    RTC_Config(ENABLE);
 }
 
 /**
@@ -135,113 +134,114 @@
   */
 void UART_Configuration(void)
 {
-	UART_InitTypeDef UART_InitStruct;
+    UART_InitTypeDef UART_InitStruct;
 
-	/* Configure serial ports RX and TX for IO. */
-	GPIO_Config(GPIOA, GPIO_Pin_1, UART0_TXD);
-	GPIO_Config(GPIOA, GPIO_Pin_0, UART0_RXD);
-
-	/* USARTx configured as follow:
-  - BaudRate = 115200 baud  
-  - Word Length = 8 Bits
-  - Stop Bit = 1 Stop Bit
-  - Parity = No Parity
-  - Hardware flow control disabled (RTS and CTS signals)
-  - Receive and transmit enabled
-  */
-	UART_InitStruct.BaudRate = uartBaud;			//Configure serial port baud rate, the baud rate defaults to 128000.
-	UART_InitStruct.DataBits = Databits_8b;
-	UART_InitStruct.StopBits = StopBits_1;
-	UART_InitStruct.Parity = Parity_None;
-	UART_InitStruct.FlowCtrl = FlowCtrl_None;
-	UART_InitStruct.Mode = Mode_duplex;
+    /* Configure serial ports RX and TX for IO. */
+    UART0_TX_IO_CONFIG
+    UART0_RX_IO_CONFIG
+
+
+    /* USARTx configured as follow:
+    - BaudRate = 115200 baud
+    - Word Length = 8 Bits
+    - Stop Bit = 1 Stop Bit
+    - Parity = No Parity
+    - Hardware flow control disabled (RTS and CTS signals)
+    - Receive and transmit enabled
+    */
+    UART_InitStruct.BaudRate = UARTBAUD;			//Configure serial port baud rate, the baud rate defaults to 128000.
+    UART_InitStruct.DataBits = Databits_8b;
+    UART_InitStruct.StopBits = StopBits_1;
+    UART_InitStruct.Parity = Parity_None;
+    UART_InitStruct.FlowCtrl = FlowCtrl_None;
+    UART_InitStruct.Mode = Mode_duplex;
 
-	UART_Init(UART0, &UART_InitStruct);
+    UART_Init(UART0, &UART_InitStruct);
 }
 
 /************************ (C) COPYRIGHT Yichip Microelectronics *****END OF FILE****/
 
 uint8_t SetDeviceTime(void)
 {
-        char bufYear[5] = {0};
-        char bufMonth[3] = {0};
-        char bufDay[3] = {0};
-        char bufHour[3] = {0};
-        char bufMin[3] = {0};
-        char bufSec[3] = {0};
-        short hour, min, sec, year, month,day;
-        struct tm bTime;
-
-        //取出关联字符
-        memcpy(bufYear, Timebuf, 4);
-        memcpy(bufMonth, Timebuf + 4, 2);
-        memcpy(bufDay, Timebuf + 6, 2);
-        memcpy(bufHour, Timebuf + 8, 2);
-        memcpy(bufMin, Timebuf + 10, 2);
-        memcpy(bufSec, Timebuf + 12, 2);
-		
-        //变换成整形
-        year = atoi((const char*)bufYear);
-        month = atoi((const char*)bufMonth);
-        day = atoi((const char*)bufDay);
-        hour = atoi((const char*)bufHour);
-        min = atoi((const char*)bufMin);
-        sec = atoi((const char*)bufSec);
-		
-        //数据放入日期相关结构体
-        bTime.tm_year = year - 1900;
-        bTime.tm_mon = month - 1;
-        bTime.tm_mday = day;
-
-        bTime.tm_hour = hour;
-        bTime.tm_min = min;
-        bTime.tm_sec = sec;
-
-
-		RTC_SetRefRegister(0);
-        g_time_offset = mktime(&bTime) - RTC_GetRefRegister();//总秒数减去RTC计数值得到偏移量
-		 
-		 //保存偏移值
-		qspi_flash_sectorerase(RTC_OFFSET_ADR);
-		qspi_flash_write(RTC_OFFSET_ADR,( uint8_t *)(&g_time_offset),4);
-		return 0 ;
+    char bufYear[5] = {0};
+    char bufMonth[3] = {0};
+    char bufDay[3] = {0};
+    char bufHour[3] = {0};
+    char bufMin[3] = {0};
+    char bufSec[3] = {0};
+    short hour, min, sec, year, month, day;
+    struct tm bTime;
+
+    //取出关联字符
+    memcpy(bufYear, Timebuf, 4);
+    memcpy(bufMonth, Timebuf + 4, 2);
+    memcpy(bufDay, Timebuf + 6, 2);
+    memcpy(bufHour, Timebuf + 8, 2);
+    memcpy(bufMin, Timebuf + 10, 2);
+    memcpy(bufSec, Timebuf + 12, 2);
+
+    //变换成整形
+    year = atoi((const char *)bufYear);
+    month = atoi((const char *)bufMonth);
+    day = atoi((const char *)bufDay);
+    hour = atoi((const char *)bufHour);
+    min = atoi((const char *)bufMin);
+    sec = atoi((const char *)bufSec);
+
+    //数据放入日期相关结构体
+    bTime.tm_year = year - 1900;
+    bTime.tm_mon = month - 1;
+    bTime.tm_mday = day;
+
+    bTime.tm_hour = hour;
+    bTime.tm_min = min;
+    bTime.tm_sec = sec;
+
+
+    RTC_SetRefRegister(0);
+    g_time_offset = mktime(&bTime) - RTC_GetRefRegister();//总秒数减去RTC计数值得到偏移量
+
+    //保存偏移值
+    qspi_flash_sectorerase(RTC_OFFSET_ADR);
+    qspi_flash_write(RTC_OFFSET_ADR, (uint8_t *)(&g_time_offset), 4);
+    return 0 ;
 }
 
 
-uint8_t Redata[100] ={0};
+uint8_t Redata[100] = {0};
 unsigned short  VarLen = 0;
 
 
 
 uint8_t GetDeviceTime(void)
 {
-        char buf[16] = {0};
-        int now = 0;
-        struct tm* pTime;
-
-        now = RTC_GetRefRegister();        //获取实时钟计数值
-
-		qspi_flash_read(RTC_OFFSET_ADR,( uint8_t *)(&g_time_offset),4);//获取偏正值
-
-        now = now  + g_time_offset;   //修正偏移
-        pTime = localtime((const time_t*)&now);
-        sprintf((char*)buf, "%04d%02d%02d%02d%02d%02d", pTime->tm_year + 1900, pTime->tm_mon + 1, pTime->tm_mday, pTime->tm_hour, pTime->tm_min, pTime->tm_sec);
-       
-		int i = 16;
-		
-		MyPrintf("%c ",buf[0]);
-
-		while(i-->2)
-		{
-			MyPrintf("%c ",buf[16-i]);
-			if(i==3)MyPrintf("秒");
-			if(i==5)MyPrintf("分");
-			if(i==7)MyPrintf("时");
-			if(i==9)MyPrintf("日");
-			if(i==11)MyPrintf("月");
-			if(i==13)MyPrintf("年");
-		}
-		MyPrintf("\n");
+    char buf[16] = {0};
+    int now = 0;
+    struct tm *pTime;
+
+    now = RTC_GetRefRegister();        //获取实时钟计数值
+
+    qspi_flash_read(RTC_OFFSET_ADR, (uint8_t *)(&g_time_offset), 4); //获取偏正值
+
+    now = now  + g_time_offset;   //修正偏移
+    pTime = localtime((const time_t *)&now);
+    sprintf((char *)buf, "%04d%02d%02d%02d%02d%02d", pTime->tm_year + 1900, pTime->tm_mon + 1, pTime->tm_mday, pTime->tm_hour, pTime->tm_min, pTime->tm_sec);
+
+    int i = 16;
+
+    MyPrintf("%c ", buf[0]);
+
+    while (i-- > 2)
+    {
+        MyPrintf("%c ", buf[16 - i]);
+        if (i == 3)MyPrintf("秒");
+        if (i == 5)MyPrintf("分");
+        if (i == 7)MyPrintf("时");
+        if (i == 9)MyPrintf("日");
+        if (i == 11)MyPrintf("月");
+        if (i == 13)MyPrintf("年");
+    }
+    MyPrintf("\n");
 
-        return FALSE;
+    return FALSE;
 }
Index: SENSOR_TEST/prj/MDK/Objects/YC3121_Keil.axf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: SENSOR_TEST/prj/MDK/Objects/YC3121_Keil.axf
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: SENSOR_TEST/prj/MDK/YC3121_Keil.uvoptx
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/prj/MDK/YC3121_Keil.uvoptx	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/prj/MDK/YC3121_Keil.uvoptx	(working copy)
@@ -229,26 +229,26 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
-  </Group>
-
-  <Group>
-    <GroupName>main</GroupName>
-    <tvExp>1</tvExp>
-    <tvExpOptDlg>0</tvExpOptDlg>
-    <cbSel>0</cbSel>
-    <RteFlg>0</RteFlg>
     <File>
-      <GroupNumber>2</GroupNumber>
+      <GroupNumber>1</GroupNumber>
       <FileNumber>3</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\main.c</PathWithFileName>
-      <FilenameWithoutPath>main.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\core\bt_code.c</PathWithFileName>
+      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
+  </Group>
+
+  <Group>
+    <GroupName>main</GroupName>
+    <tvExp>1</tvExp>
+    <tvExpOptDlg>0</tvExpOptDlg>
+    <cbSel>0</cbSel>
+    <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>2</GroupNumber>
       <FileNumber>4</FileNumber>
@@ -256,8 +256,8 @@
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\bt_code.c</PathWithFileName>
-      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
+      <PathWithFileName>..\..\user\main.c</PathWithFileName>
+      <FilenameWithoutPath>main.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
Index: SENSOR_TEST/prj/MDK/YC3121_Keil.uvprojx
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/prj/MDK/YC3121_Keil.uvprojx	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/prj/MDK/YC3121_Keil.uvprojx	(working copy)
@@ -337,7 +337,7 @@
               <MiscControls></MiscControls>
               <Define>__USEKEILCOMPILE__</Define>
               <Undefine></Undefine>
-              <IncludePath>..\..\..\..\..\Librarier\sdk;..\..\..\..\..\Librarier\core;..\..\user</IncludePath>
+              <IncludePath>..\..\..\..\..\Librarier\sdk;..\..\..\..\..\Librarier\core</IncludePath>
             </VariousControls>
           </Cads>
           <Aads>
@@ -391,6 +391,11 @@
               <FileType>1</FileType>
               <FilePath>..\..\..\..\..\Librarier\core\system.c</FilePath>
             </File>
+            <File>
+              <FileName>bt_code.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\..\..\Librarier\core\bt_code.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>
@@ -401,11 +406,6 @@
               <FileType>1</FileType>
               <FilePath>..\..\user\main.c</FilePath>
             </File>
-            <File>
-              <FileName>bt_code.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\user\bt_code.c</FilePath>
-            </File>
           </Files>
         </Group>
         <Group>
Index: SENSOR_TEST/user/bt_code.h
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/user/bt_code.h	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/user/bt_code.h	(nonexistent)
@@ -1 +0,0 @@
-extern const unsigned char bt_code[];
Index: SENSOR_TEST/user/bt_code.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/user/bt_code.c	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/user/bt_code.c	(nonexistent)
@@ -1,116 +0,0 @@
-const unsigned char bt_code[] = {
-0x00,0x02,0xaa,0x55,0x7a,0x03,0xc0,0x42,0x80,0x19,0xc0,0x43,0x00,0x1b,0xc0,0x43,
-0x80,0x1f,0xc0,0x44,0x00,0x1d,0xc0,0x44,0x80,0x28,0xc0,0x45,0x00,0x2d,0xc0,0x02,
-0x00,0x0d,0xc0,0x03,0x00,0x08,0x20,0x40,0x57,0xaf,0x24,0x36,0xd8,0xa5,0x20,0x40,
-0x00,0xb5,0x20,0x40,0x49,0x36,0x20,0x20,0x58,0xa6,0x09,0x80,0x00,0x18,0x78,0x28,
-0x7c,0x00,0xdb,0x60,0x06,0x64,0x1f,0xef,0x7e,0x00,0x1f,0xf1,0x7e,0x00,0xe7,0xe6,
-0x00,0x05,0x20,0x23,0x46,0x49,0x78,0x36,0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,
-0x84,0x00,0x20,0x40,0x00,0xb9,0x20,0x20,0x58,0x97,0x20,0x40,0x00,0xb1,0x20,0x20,
-0x48,0xf6,0x20,0x40,0x00,0xb3,0x20,0x20,0x49,0x16,0x20,0x40,0x00,0xb7,0x20,0x20,
-0x49,0x22,0x60,0x42,0x00,0x17,0x20,0x20,0x00,0xbb,0x20,0x40,0x00,0xbb,0xda,0x20,
-0x89,0x60,0x20,0x40,0x00,0xa7,0xda,0x20,0x00,0x10,0x20,0x40,0x00,0xa7,0xda,0x20,
-0x00,0x00,0x20,0x20,0x00,0xd6,0x60,0x42,0x00,0x17,0x20,0x40,0x00,0xb9,0x58,0x00,
-0x03,0x84,0x20,0x40,0x4a,0x8e,0x20,0x20,0x49,0x36,0x70,0x89,0x07,0xff,0x70,0x80,
-0x42,0x05,0x20,0x00,0x03,0xe8,0x6f,0xe2,0x4f,0xef,0x24,0x7a,0x00,0x00,0x70,0x4f,
-0xef,0x01,0x70,0x89,0x4e,0xc2,0x70,0x89,0x4e,0xc0,0x20,0x40,0x00,0xca,0xc0,0x81,
-0x00,0x43,0x20,0x00,0x75,0x30,0x20,0x40,0x00,0xca,0xc0,0x81,0x00,0x43,0x20,0x00,
-0x27,0x10,0xda,0x20,0x89,0x56,0xda,0x40,0x00,0xf0,0x20,0x40,0x00,0xd1,0xda,0x20,
-0x89,0x55,0x20,0x40,0x00,0xa7,0xda,0x20,0x00,0x00,0x20,0x40,0x00,0xd6,0x20,0x60,
-0x00,0x00,0x20,0x20,0x00,0x43,0x20,0x40,0x00,0x46,0x20,0x20,0x48,0xf5,0x20,0x40,
-0x00,0x6e,0x20,0x40,0x00,0x77,0x79,0x20,0x2a,0x00,0x78,0x46,0xfc,0x00,0x78,0x2e,
-0xfc,0x00,0x78,0x30,0x7c,0x00,0x78,0x50,0xfc,0x00,0x19,0x31,0x7e,0x00,0x1f,0xec,
-0xfe,0x00,0x1f,0xf1,0xfe,0x00,0x08,0x00,0x86,0x28,0x78,0x24,0xfc,0x00,0x6f,0xe2,
-0x43,0xae,0x08,0x00,0x86,0x08,0xef,0xe2,0x00,0x06,0x1f,0xe1,0x72,0x3f,0x08,0x00,
-0x86,0x08,0x20,0x22,0x80,0x5b,0xef,0xe2,0x00,0x06,0x08,0x00,0x86,0x08,0xc2,0x00,
-0x00,0x58,0x78,0x24,0x7c,0x00,0x08,0x00,0x86,0x18,0x78,0x44,0x7c,0x00,0x37,0xd3,
-0x82,0x00,0x20,0x00,0x00,0x64,0x20,0x60,0x00,0x00,0x78,0x3b,0x7c,0x00,0x70,0x89,
-0x14,0x07,0x20,0x60,0x00,0x00,0x78,0x5b,0x7c,0x00,0x70,0x89,0x14,0x03,0x20,0x60,
-0x00,0x00,0x58,0x71,0x76,0x41,0x1f,0xed,0x7e,0x00,0x1f,0xe1,0xfe,0x29,0x98,0x00,
-0x12,0x00,0x58,0x55,0x55,0x55,0x67,0xe6,0x04,0x63,0x20,0x60,0x00,0x00,0x78,0x44,
-0xfc,0x00,0x78,0x43,0xfc,0x00,0x6f,0xe6,0x04,0x63,0x98,0x00,0x1e,0x00,0x6f,0xe2,
-0x00,0x16,0x1f,0xed,0x84,0x00,0x79,0x20,0x04,0x01,0x18,0x43,0x1c,0x00,0x20,0x60,
-0x00,0x00,0x20,0x40,0x00,0x7c,0x20,0x20,0x49,0x30,0x20,0x40,0x00,0x7c,0x20,0x40,
-0x49,0x1c,0x20,0x20,0x49,0x21,0x20,0x40,0x49,0x15,0x6f,0xe2,0x00,0x16,0x1f,0xe3,
-0x84,0x00,0x20,0x60,0x00,0x00,0x20,0x40,0x00,0x79,0x20,0x40,0x00,0x6e,0x78,0x56,
-0xfc,0x00,0x78,0x26,0xfc,0x00,0x78,0x4e,0xfc,0x00,0x78,0x30,0xfc,0x00,0x78,0x50,
-0x7c,0x00,0x19,0x62,0x36,0x00,0x37,0xc1,0x84,0x00,0x24,0x2c,0x48,0xf5,0x1b,0x42,
-0x04,0x00,0xdd,0x20,0x01,0xe0,0x1c,0x22,0x50,0x00,0x78,0x24,0xfc,0x00,0x09,0x80,
-0x00,0x08,0x19,0x89,0x7e,0x00,0x67,0xe2,0x02,0xd5,0x09,0x80,0x00,0x08,0x19,0x89,
-0x7e,0x00,0xe7,0xe2,0x00,0x05,0x1f,0xe1,0x72,0x3f,0x20,0x22,0x80,0x9a,0x09,0x80,
-0x00,0x08,0x19,0x89,0x7e,0x00,0xe7,0xe2,0x00,0x05,0xc2,0x00,0x00,0x96,0x09,0x80,
-0x00,0x18,0x78,0x28,0x7c,0x00,0xdb,0x60,0x06,0x64,0x1f,0xef,0x7e,0x00,0x1f,0xf1,
-0x7e,0x00,0xe7,0xe6,0x00,0x05,0x20,0x40,0x49,0xba,0x20,0x23,0x48,0xf5,0x78,0x36,
-0xfc,0x00,0x6f,0xe2,0x00,0x17,0x1f,0xe0,0xa2,0x02,0x20,0x40,0x49,0x80,0x20,0x20,
-0x49,0x15,0x58,0x00,0x00,0x00,0x67,0xf0,0x0a,0x96,0xdf,0x20,0x00,0x08,0xda,0x40,
-0x0a,0x96,0x20,0x40,0x00,0xcd,0xe7,0xe2,0x00,0x12,0x1a,0x40,0xa4,0x01,0x1a,0x20,
-0xa2,0x01,0xc2,0x00,0x00,0xab,0x20,0x60,0x00,0x00,0xda,0x40,0x00,0xfe,0x20,0x20,
-0x00,0xd2,0xda,0x40,0x00,0xfd,0x20,0x20,0x00,0xd2,0xda,0x40,0x00,0xfc,0x20,0x20,
-0x00,0xd2,0xda,0x40,0x00,0xfb,0x20,0x20,0x00,0xd2,0x18,0x42,0x24,0x00,0x20,0x20,
-0x00,0xd2,0x18,0x41,0xa4,0x80,0x20,0x20,0x00,0xd2,0x67,0xe2,0x89,0x4b,0x70,0x89,
-0x4e,0xc5,0x70,0x89,0x4e,0xc4,0x6f,0xe2,0x89,0x91,0xc4,0x00,0x80,0x00,0x20,0x20,
-0x00,0xc0,0x6f,0xe2,0x89,0x91,0xc3,0x00,0x00,0xc3,0x6f,0xe2,0x89,0x90,0x70,0x89,
-0x4e,0xc6,0x70,0x89,0x4e,0xc4,0x20,0x00,0x03,0xe8,0x20,0x60,0x00,0x00,0x58,0x00,
-0x00,0x02,0x20,0x40,0x00,0xbd,0x20,0x20,0x00,0xc3,0x20,0x40,0x00,0xd6,0x58,0x00,
-0x00,0x06,0x20,0x40,0x00,0xbd,0x20,0x20,0x00,0xc3,0x20,0x40,0x00,0xd6,0x58,0x00,
-0x00,0x05,0x20,0x40,0x00,0xbd,0x1a,0x42,0x7e,0x00,0x20,0x20,0x00,0xbd,0x58,0x00,
-0x00,0x0b,0x20,0x40,0x00,0xbd,0x1a,0x2c,0xfe,0x00,0x20,0x40,0x00,0xbd,0x58,0x00,
-0x00,0x03,0x20,0x40,0x00,0xbd,0x1a,0x21,0x7e,0xff,0x20,0x20,0x00,0xbd,0x3f,0xc9,
-0xaa,0x55,0x01,0x00,0x92,0x40,0x0a,0xaa,0x55,0x01,0x00,0x54,0x46,0x40,0xaa,0x55,
-0x01,0x00,0x06,0x42,0x13,0xaa,0x55,0x08,0x00,0x98,0x40,0xff,0xff,0x8f,0xf8,0x9b,
-0x9d,0x59,0x83,0xaa,0x55,0x03,0x00,0x14,0x42,0x07,0x4a,0x05,0xaa,0x55,0x04,0x00,
-0x3d,0x45,0x00,0x7f,0x00,0x07,0xaa,0x55,0x03,0x00,0x2d,0x46,0x03,0x00,0x04,0xaa,
-0x55,0x01,0x00,0x2c,0x46,0x01,0xaa,0x55,0x06,0x00,0x57,0x46,0x04,0x30,0x30,0x30,
-0x30,0x30,0xaa,0x55,0x10,0x00,0xf0,0x4f,0x00,0x1c,0xff,0x1f,0x00,0x1c,0x00,0x1c,
-0x00,0x4c,0xe0,0x4f,0x00,0x4c,0x00,0x4c,0xaa,0x55,0x02,0x00,0x68,0x46,0x00,0x01,
-0xaa,0x55,0x01,0x00,0x6c,0x46,0x03,0xaa,0x55,0x01,0x00,0x6f,0x46,0x07,0xaa,0x55,
-0x03,0x00,0xaa,0x40,0x24,0x04,0x04,0xaa,0x55,0x01,0x00,0x79,0x46,0x00,0xaa,0x55,
-0x01,0x00,0x91,0x40,0x00,0xaa,0x55,0x03,0x00,0x54,0x41,0x00,0x01,0x08,0xaa,0x55,
-0x01,0x00,0x74,0x41,0x02,0xaa,0x55,0x01,0x00,0x93,0x40,0x03,0xaa,0x55,0x01,0x00,
-0x6d,0x46,0x28,0xaa,0x55,0x06,0x00,0xa0,0x40,0xa7,0x2a,0x2a,0x31,0x10,0x3a,0xaa,
-0x55,0x0c,0x00,0xe7,0x44,0x0b,0x59,0x69,0x63,0x68,0x69,0x70,0x20,0x33,0x31,0x32,
-0x31,0xaa,0x55,0x03,0x00,0xe4,0x41,0x20,0x00,0x01,0xaa,0x55,0x01,0x00,0xe8,0x41,
-0x00,0xaa,0x55,0x01,0x00,0x90,0x44,0x01,0xaa,0x55,0x01,0x00,0x5f,0x44,0x07,0xaa,
-0x55,0x01,0x00,0x98,0x44,0x01,0xaa,0x55,0x04,0x00,0x75,0x46,0x09,0x00,0x2f,0x00,
-0xaa,0x55,0x01,0x00,0x40,0x43,0x01,0xaa,0x55,0x02,0x00,0x54,0x44,0xf0,0x00,0xaa,
-0x55,0x01,0x00,0x6e,0x46,0x05,0xaa,0x55,0x06,0x00,0x72,0x44,0x21,0x22,0x00,0x33,
-0x02,0x3a,0xaa,0x55,0x10,0x00,0x81,0x43,0x0f,0x59,0x69,0x63,0x68,0x69,0x70,0x20,
-0x33,0x31,0x32,0x31,0x20,0x4d,0x6f,0x75,0xaa,0x55,0x04,0x00,0x41,0x43,0x03,0x02,
-0x01,0x0e,0xaa,0x55,0x13,0x00,0x61,0x43,0x0e,0x11,0x09,0x59,0x69,0x63,0x68,0x69,
-0x70,0x20,0x31,0x30,0x32,0x31,0x73,0x20,0x4d,0x6f,0x75,0xaa,0x55,0x07,0x00,0x25,
-0x44,0x02,0x03,0x00,0x05,0x10,0x02,0x03,0xaa,0x55,0x08,0x00,0x68,0x44,0x08,0x00,
-0x10,0x00,0x00,0x00,0x2c,0x01,0xaa,0x55,0x01,0x00,0x78,0x44,0xb5,0xaa,0x55,0x01,
-0x00,0x7a,0x44,0x17,0xaa,0x55,0x02,0x00,0xcc,0x44,0x31,0x00,0xaa,0x55,0x01,0x00,
-0xd1,0x40,0x01,0xaa,0x55,0x0c,0x00,0x49,0x45,0x05,0x03,0x00,0x12,0x00,0x01,0x01,
-0x00,0x01,0x11,0x03,0x00,0xaa,0x55,0x01,0x00,0x5f,0x45,0x00,0xaa,0x55,0x02,0x00,
-0x47,0x45,0x83,0x46,0xaa,0x55,0xb8,0x00,0x83,0x46,0x03,0x12,0x00,0x01,0x00,0x00,
-0x01,0x00,0x01,0x00,0x01,0x36,0x00,0x52,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x01,
-0x09,0x00,0x01,0x35,0x03,0x19,0x12,0x00,0x09,0x00,0x04,0x35,0x0d,0x35,0x06,0x19,
-0x01,0x00,0x09,0x00,0x01,0x35,0x03,0x19,0x00,0x01,0x09,0x00,0x09,0x35,0x08,0x35,
-0x06,0x19,0x12,0x00,0x09,0x01,0x00,0x09,0x02,0x00,0x09,0x01,0x03,0x09,0x02,0x01,
-0x09,0x05,0xac,0x09,0x02,0x02,0x09,0x02,0x39,0x09,0x02,0x03,0x09,0x06,0x44,0x09,
-0x02,0x04,0x28,0x01,0x09,0x02,0x05,0x09,0x00,0x02,0x03,0x11,0x01,0x00,0x03,0x01,
-0x00,0x00,0x01,0x00,0x03,0x36,0x00,0x46,0x09,0x00,0x00,0x0a,0x00,0x01,0x00,0x03,
-0x09,0x00,0x01,0x35,0x03,0x19,0x11,0x01,0x09,0x00,0x02,0x0a,0x00,0x00,0x00,0x00,
-0x09,0x00,0x04,0x35,0x0c,0x35,0x03,0x19,0x01,0x00,0x35,0x05,0x19,0x00,0x03,0x08,
-0x01,0x09,0x00,0x06,0x35,0x09,0x09,0x65,0x6e,0x09,0x00,0x6a,0x09,0x01,0x00,0x09,
-0x01,0x00,0x25,0x0a,0x53,0x50,0x50,0x20,0x73,0x6c,0x61,0x76,0x65,0x00,0x00,0x00,
-0x01,0x00,0xaa,0x55,0x02,0x00,0x8e,0x44,0xaf,0x47,0xaa,0x55,0x8a,0x00,0xaf,0x47,
-0x01,0x00,0x02,0x00,0x28,0x02,0x00,0x18,0x02,0x00,0x02,0x03,0x28,0x01,0x0a,0x03,
-0x00,0x02,0x00,0x2a,0x13,0x41,0x73,0x74,0x20,0x4c,0x45,0x20,0x4d,0x6f,0x75,0x73,
-0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x04,0x00,0x02,0x00,0x28,0x10,0x55,0xe4,
-0x05,0xd2,0xaf,0x9f,0xa9,0x8f,0xe5,0x4a,0x7d,0xfe,0x43,0x53,0x53,0x49,0x05,0x00,
-0x02,0x03,0x28,0x01,0x10,0x06,0x00,0x02,0x87,0x05,0x14,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
-0x00,0x02,0x02,0x29,0x02,0x00,0x00,0x08,0x00,0x02,0x03,0x28,0x01,0x0e,0x09,0x00,
-0x02,0x98,0x05,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0x10,0x40,
-0xe0,0x07,0xaa,0x55,0x01,0x00,0x20,0x40,0x50,0xaa,0x55,0x04,0x00,0x79,0x41,0x0a,
-0x0b,0xb2,0x32,0xaa,0x55,0x02,0x00,0x57,0x41,0x8b,0x0b,0xaa,0x55,0x08,0x00,0xa1,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x55,0x02,0x00,0xbd,0x40,0x02,
-0x24,0xaa,0x55,0x08,0x00,0xad,0x40,0x24,0x00,0x80,0x00,0x24,0x00,0x80,0x00,0xaa,
-0x55,0x02,0x00,0xbb,0x40,0x20,0x00,0xaa,0x55,0x04,0x00,0xb7,0x40,0x20,0x00,0x00,
-0x20,0xaa,0x55,0x04,0x00,0xbf,0x40,0x80,0x04,0x00,0x10,0xaa,0x55,0x05,0x00,0xe2,
-0x44,0x08,0x0e,0x05,0x04,0x00,0xaa,0x55,0x02,0x00,0x02,0x42,0x30,0x1f,0xaa,0x55,
-0x01,0x00,0x10,0x42,0x20,0xaa,0x55,0x01,0x00,0xe0,0x41,0x01,0xaa,0x55,0x01,0x00,
-0xe2,0x41,0xff,0xaa,0x55,0x02,0x00,0xc3,0x40,0xe2,0x41,0x97,0xc3
-};
Index: SENSOR_TEST/user/main.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/user/main.c	(revision 665)
+++ /YC3121_demo/ModuleDemo/BPU/SENSOR_TEST/user/main.c	(working copy)
@@ -1,22 +1,22 @@
 /**
   ******************************************************************************
-  * @file    ModuleDemo/BPU/SENSOR_TEST/use/main.c 
+  * @file    3121Demo\ModuleDemo\BPU\SENSOR_TEST\use\main.c
   * @author  Yichip Application Team
   * @version V1.0.0
-  * @date    13-Dec-2019
+  * @date    15-July-2020
   * @brief   Yc3121 SENSOR test program.
   ******************************************************************************
   * @attention
   *
   * COPYRIGHT 2019 Yichip Microelectronics
   *
-  * The purpose of this firmware is to provide guidance to customers engaged in 
-	* programming work to guide them smoothly to product development, 
-	* so as to save their time.
-	*
-	* Therefore, Yichip microelectronics shall not be responsible for any direct, 
-	* indirect or consequential damages caused by any content of this gu jiang 
-	* and/or contained in this code used by the customer in its products.
+  * The purpose of this firmware is to provide guidance to customers engaged in
+  * programming work to guide them smoothly to product development,
+  * so as to save their time.
+  *
+  * Therefore, Yichip microelectronics shall not be responsible for any direct,
+  * indirect or consequential damages caused by any content of this gu jiang
+  * and/or contained in this code used by the customer in its products.
   *
   ******************************************************************************
   */
@@ -27,14 +27,13 @@
 #include "yc_uart.h"
 #include "yc_ssc.h"
 #include "misc.h"
+#include "board_config.h"
 
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
-#define uartBaud 115200
-
 /* Private macro -------------------------------------------------------------*/
 /* Private variables ---------------------------------------------------------*/
-uint32_t Datain[6] = {0x00000000, 0x11111111, 0x22222222, 0x33333333, 0x44444444,0x55555555};
+uint32_t Datain[6] = {0x00000000, 0x11111111, 0x22222222, 0x33333333, 0x44444444, 0x55555555};
 uint32_t Dataout[6];
 
 /* Private function prototypes -----------------------------------------------*/
@@ -52,41 +51,41 @@
   */
 int main(void)
 {
-	UART_Configuration();
-	NVIC_Configuration();
-	
-	MyPrintf("YcChip Yc3121 SENSOR test Demo V1.0.\n");
-	
-	printv((uint8_t *)Datain, 24, "Datain");
-	printv((uint8_t *)Dataout, 24, "Dataout");
-	MyPrintf("\nf8400 LPM_CTRL is      %08x\n", lpm_read(LPM_CTRL));
-	MyPrintf("f8404 LPM_SENSOR is    %08x\n", lpm_read(LPM_SENSOR));
-	MyPrintf("f8414 LPM_GPIO_WKHI is %08x\n", lpm_read(LPM_GPIO_WKHI));
-	MyPrintf("f8478 LPM_STATUS is    %08x\n", lpm_read(LPM_STATUS));
-	MyPrintf("\n");
-	
-	ssc_enable();
-	tamper_test();
-	sensor_test();
-	BPK_RW_test();
-	SSC_ClearKeyCMD(ENABLE);
+    UART_Configuration();
+    NVIC_Configuration();
+
+    MyPrintf("YcChip Yc3121 SENSOR test Demo V1.0.\n");
+
+    printv((uint8_t *)Datain, 24, "Datain");
+    printv((uint8_t *)Dataout, 24, "Dataout");
+    MyPrintf("\nf8400 LPM_CTRL is      %08x\n", lpm_read(LPM_CTRL));
+    MyPrintf("f8404 LPM_SENSOR is    %08x\n", lpm_read(LPM_SENSOR));
+    MyPrintf("f8414 LPM_GPIO_WKHI is %08x\n", lpm_read(LPM_GPIO_WKHI));
+    MyPrintf("f8478 LPM_STATUS is    %08x\n", lpm_read(LPM_STATUS));
+    MyPrintf("\n");
+
+    ssc_enable();
+    tamper_test();
+    sensor_test();
+    BPK_RW_test();
+    SSC_ClearKeyCMD(ENABLE);
 //	SSC_LPMLock();
-	
-	MyPrintf("f8400 LPM_CTRL is      %08x\n", lpm_read(LPM_CTRL));
-	MyPrintf("f8404 LPM_SENSOR is    %08x\n", lpm_read(LPM_SENSOR));
-	MyPrintf("f8414 LPM_GPIO_WKHI is %08x\n", lpm_read(LPM_GPIO_WKHI));
-	MyPrintf("f8478 LPM_STATUS is    %08x\n", lpm_read(LPM_STATUS));
-	MyPrintf("\n");
-	while(1)
-	{	
-		
-	}
+
+    MyPrintf("f8400 LPM_CTRL is      %08x\n", lpm_read(LPM_CTRL));
+    MyPrintf("f8404 LPM_SENSOR is    %08x\n", lpm_read(LPM_SENSOR));
+    MyPrintf("f8414 LPM_GPIO_WKHI is %08x\n", lpm_read(LPM_GPIO_WKHI));
+    MyPrintf("f8478 LPM_STATUS is    %08x\n", lpm_read(LPM_STATUS));
+    MyPrintf("\n");
+    while (1)
+    {
+
+    }
 }
 
 void NVIC_Configuration(void)
 {
-	NVIC_EnableIRQ(SEC_IRQn);
-	NVIC_SetPriority(SEC_IRQn, 0);
+    NVIC_EnableIRQ(SEC_IRQn);
+    NVIC_SetPriority(SEC_IRQn, 0);
 }
 
 /**
@@ -96,28 +95,28 @@
   */
 void UART_Configuration(void)
 {
-	UART_InitTypeDef UART_InitStruct;
+    UART_InitTypeDef UART_InitStruct;
 
-	/* Configure serial ports RX and TX for IO. */
-	GPIO_Config(GPIOA, GPIO_Pin_1, UART0_TXD);
-	GPIO_Config(GPIOA, GPIO_Pin_0, UART0_RXD);
-
-	/* USARTx configured as follow:
-  - BaudRate = 115200 baud  
-  - Word Length = 8 Bits
-  - Stop Bit = 1 Stop Bit
-  - Parity = No Parity
-  - Hardware flow control disabled (RTS and CTS signals)
-  - Receive and transmit enabled
-  */
-	UART_InitStruct.BaudRate = uartBaud;			//Configure serial port baud rate, the baud rate defaults to 128000.
-	UART_InitStruct.DataBits = Databits_8b;
-	UART_InitStruct.StopBits = StopBits_1;
-	UART_InitStruct.Parity = Parity_None;
-	UART_InitStruct.FlowCtrl = FlowCtrl_None;
-	UART_InitStruct.Mode = Mode_duplex;
+    /* Configure serial ports RX and TX for IO. */
+    UART0_TX_IO_CONFIG
+    UART0_RX_IO_CONFIG
+
+    /* USARTx configured as follow:
+    - BaudRate = 115200 baud
+    - Word Length = 8 Bits
+    - Stop Bit = 1 Stop Bit
+    - Parity = No Parity
+    - Hardware flow control disabled (RTS and CTS signals)
+    - Receive and transmit enabled
+    */
+    UART_InitStruct.BaudRate = UARTBAUD;			//Configure serial port baud rate, the baud rate defaults to 128000.
+    UART_InitStruct.DataBits = Databits_8b;
+    UART_InitStruct.StopBits = StopBits_1;
+    UART_InitStruct.Parity = Parity_None;
+    UART_InitStruct.FlowCtrl = FlowCtrl_None;
+    UART_InitStruct.Mode = Mode_duplex;
 
-	UART_Init(UART0, &UART_InitStruct);
+    UART_Init(UART0, &UART_InitStruct);
 }
 
 /**
@@ -127,8 +126,8 @@
   */
 void ssc_enable(void)
 {
-	SSC_Interval(INTERVAL_999MS);
-	SSC_LPMSheildingAlarmEnable(ENABLE);
+    SSC_Interval(INTERVAL_999MS);
+    SSC_LPMSheildingAlarmEnable(ENABLE);
 }
 
 /**
@@ -138,16 +137,16 @@
   */
 void tamper_test(void)
 {
-	TAMPER_InitTypeDef TAMPER_InitStruct;
-	
-	TAMPER_InitStruct.TAMPER_Port_mode     = TAMPER_Port_S01_active | TAMPER_Port_S23_active;
-	TAMPER_InitStruct.TAMPER_Port_PullUp   = TAMPER_Port_S4_PU | TAMPER_Port_S5_PU |\
-	                                         TAMPER_Port_S6_PU | TAMPER_Port_S7_PU;
-	TAMPER_InitStruct.TAMPER_Port_Enable   = TAMPER_Port_ALL;
-	TAMPER_InitStruct.TAMPER_GlitchTimes   = TAMPER_GlitchTimes_4ms;
-	TAMPER_InitStruct.TAMPER_PUPU_HoldTime = TAMPER_PUPU_HoldTime_8ms;
-	
-	SSC_TemperInit(&TAMPER_InitStruct);
+    TAMPER_InitTypeDef TAMPER_InitStruct;
+
+    TAMPER_InitStruct.TAMPER_Port_mode     = TAMPER_Port_S01_active | TAMPER_Port_S23_active;
+    TAMPER_InitStruct.TAMPER_Port_PullUp   = TAMPER_Port_S1_PU | TAMPER_Port_S3_PU | TAMPER_Port_S4_PU | TAMPER_Port_S5_PU | \
+            TAMPER_Port_S6_PU | TAMPER_Port_S7_PU;
+    TAMPER_InitStruct.TAMPER_Port_Enable   = TAMPER_Port_ALL;
+    TAMPER_InitStruct.TAMPER_GlitchTimes   = TAMPER_GlitchTimes_8ms;
+    TAMPER_InitStruct.TAMPER_PUPU_HoldTime = TAMPER_PUPU_HoldTime_always;
+
+    SSC_TemperInit(&TAMPER_InitStruct);
 }
 
 /**
@@ -157,11 +156,11 @@
   */
 void sensor_test(void)
 {
-	SSC_SensorDur(SENSOR_DUR_8MS);
-	SSC_SensorDelay(SENEOR_DELAY_4MS);
-	SSC_LPMSensorCmd(LPM_BAT_VDT12L_ENABLE | LPM_BAT_VDT33H_ENABLE | \
-	                 LPM_BAT_VDT33L_ENABLE | LPM_TEMPERATURE_40_ENABLE | \
-	                 LPM_TEMPERATURE_120_ENABLE, ENABLE);
+    SSC_SensorDur(SENSOR_DUR_8MS);
+    SSC_SensorDelay(SENEOR_DELAY_4MS);
+    SSC_LPMSensorCmd(LPM_BAT_VDT12L_ENABLE | LPM_BAT_VDT33H_ENABLE | \
+                     LPM_BAT_VDT33L_ENABLE | LPM_TEMPERATURE_40_ENABLE | \
+                     LPM_TEMPERATURE_120_ENABLE, ENABLE);
 }
 
 /**
@@ -171,10 +170,10 @@
   */
 void BPK_RW_test(void)
 {
-	SSC_LPMKeyWrite(Datain, 6, 1);
-	SSC_LPMKeyRead(Dataout, 6, 1);
-	printv((uint8_t *)Dataout, 24, "Dataout");
-	MyPrintf("\nf8414 LPM_GPIO_WKHI is %08x\n", lpm_read(LPM_GPIO_WKHI));
+    SSC_LPMKeyWrite(Datain, 6, 1);
+    SSC_LPMKeyRead(Dataout, 6, 1);
+    printv((uint8_t *)Dataout, 24, "Dataout");
+    MyPrintf("\nf8414 LPM_GPIO_WKHI is %08x\n", lpm_read(LPM_GPIO_WKHI));
 }
 
 /**
@@ -183,11 +182,12 @@
   * @retval None
   */
 void SEC_IRQHandler(void)
-{			
-	MyPrintf("SEC_IRQHandler In\n");
-	SSC_LPMKeyRead(Dataout, 6, 1);
-	printv((uint8_t *)Dataout, 24, "Dataout");
-	SSC_LPMClearStatusBit();
+{
+    MyPrintf("SEC_IRQHandler In\n");
+    SSC_LPMKeyRead(Dataout, 6, 1);
+    printv((uint8_t *)Dataout, 24, "Dataout");
+    MyPrintf("f8478 LPM_STATUS is    %08x\n", lpm_read(LPM_STATUS));
+    SSC_LPMClearStatusBit();
 }
 
 /************************ (C) COPYRIGHT Yichip Microelectronics *****END OF FILE****/

