Index: otp_read_write/prj/MDK/YC3121_Keil.uvoptx
===================================================================
--- /YC3121_demo/ModuleDemo/OTP/otp_read_write/prj/MDK/YC3121_Keil.uvoptx	(revision 659)
+++ /YC3121_demo/ModuleDemo/OTP/otp_read_write/prj/MDK/YC3121_Keil.uvoptx	(working copy)
@@ -244,18 +244,6 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
-    <File>
-      <GroupNumber>2</GroupNumber>
-      <FileNumber>4</FileNumber>
-      <FileType>1</FileType>
-      <tvExp>0</tvExp>
-      <tvExpOptDlg>0</tvExpOptDlg>
-      <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\bt_code.c</PathWithFileName>
-      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
-      <RteFlg>0</RteFlg>
-      <bShared>0</bShared>
-    </File>
   </Group>
 
   <Group>
@@ -266,7 +254,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>5</FileNumber>
+      <FileNumber>4</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -278,7 +266,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>6</FileNumber>
+      <FileNumber>5</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -290,7 +278,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>7</FileNumber>
+      <FileNumber>6</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -310,7 +298,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>8</FileNumber>
+      <FileNumber>7</FileNumber>
       <FileType>2</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -322,7 +310,7 @@
     </File>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>9</FileNumber>
+      <FileNumber>8</FileNumber>
       <FileType>2</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
Index: otp_read_write/prj/MDK/YC3121_Keil.uvprojx
===================================================================
--- /YC3121_demo/ModuleDemo/OTP/otp_read_write/prj/MDK/YC3121_Keil.uvprojx	(revision 659)
+++ /YC3121_demo/ModuleDemo/OTP/otp_read_write/prj/MDK/YC3121_Keil.uvprojx	(working copy)
@@ -401,11 +401,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: otp_read_write/user/main.c
===================================================================
--- /YC3121_demo/ModuleDemo/OTP/otp_read_write/user/main.c	(revision 659)
+++ /YC3121_demo/ModuleDemo/OTP/otp_read_write/user/main.c	(working copy)
@@ -1,21 +1,21 @@
 /**
   ******************************************************************************
-  * @file    3121Demo\ModuleDemo\OTP\otp_read_write\user\main.c 
+  * @file    3121Demo\ModuleDemo\OTP\otp_read_write\user\main.c
   * @author  Yichip Application Team
-  * @version V1.0.0
-  * @date    15-July-2019
+  * @version V1.0.1
+  * @date    21-July-2020
   * @brief   otp read write 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, 
+  * 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.
   *
   ******************************************************************************
@@ -26,11 +26,10 @@
 #include "yc_gpio.h"
 #include "yc_uart.h"
 #include "yc_otp.h"
+#include "board_config.h"
 
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
-#define uartBaud 115200
-
 #define BLOCK_NUM   (1)
 #define OTP_W_ADDR (0x1000+BLOCK_NUM*64)
 
@@ -48,17 +47,17 @@
   */
 int main(void)
 {
-	UART_Configuration();
+    UART_Configuration();
+
+    MyPrintf("Yc3121 otp read write Demo !\n\n");
+
+    otp_read_test();
+    otp_write_test();
 
-  MyPrintf("Yc3121 otp read write Demo !\n\n");
-	
-	otp_read_test();
-	otp_write_test();
-	
-	while (1)
-	{
-		
-	}
+    while (1)
+    {
+
+    }
 }
 
 /**
@@ -68,68 +67,68 @@
   */
 void UART_Configuration(void)
 {
-	UART_InitTypeDef UART_InitStruct;
+    UART_InitTypeDef UART_InitStruct;
 
-	/* Configure serial ports 0 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;
-	
-	UART_Init(UART0, &UART_InitStruct);
+    /* Configure serial ports 0 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);
 }
 
 
 void otp_write_test(void)
 {
-  int addr = OTP_W_ADDR;
-  uint8_t rbuf[64]={0};
-  uint8_t wbuf[64]={0};
-  for(int i =0;i<64;i++)
-  {
-   wbuf[i] = i;
-  }
-
-  read_otp(addr,rbuf,64);
-  printv(rbuf, 64, "read otrp:");
-  
-  write_otp(addr,wbuf,64);
- 
-  read_otp(addr, rbuf,64);
-  printv(rbuf, 64, "read otrp:");
+    int addr = OTP_W_ADDR;
+    uint8_t rbuf[64] = {0};
+    uint8_t wbuf[64] = {0};
+    for (int i = 0; i < 64; i++)
+    {
+        wbuf[i] = i;
+    }
+
+    read_otp(addr, rbuf, 64);
+    printv(rbuf, 64, "read otrp:");
+
+    write_otp(addr, wbuf, 64);
+
+    read_otp(addr, rbuf, 64);
+    printv(rbuf, 64, "read otrp:");
 }
 
 void otp_read_test(void)
 {
-	uint8_t tmp[1024]={0};
-	uint8_t id[6];
-	uint32_t i = 0;;
-
-	read_otp(0, tmp, 10);
-	for (i = 0; i < 10; i++)
-	{
-		MyPrintf("\n i = %d %x", i, tmp[i]);
-	}
-
-	read_chipid(id);
-	for (i = 0; i < 6; i++)
-	{
-		MyPrintf("\n ID[%d] = %x",i ,id[i]);
-	}
-	MyPrintf("\n life = %x", read_chip_life());
+    uint8_t tmp[1024] = {0};
+    uint8_t id[6];
+    uint32_t i = 0;;
+
+    read_otp(0, tmp, 10);
+    for (i = 0; i < 10; i++)
+    {
+        MyPrintf("\n i = %d %x", i, tmp[i]);
+    }
+
+    read_chipid(id);
+    for (i = 0; i < 6; i++)
+    {
+        MyPrintf("\n ID[%d] = %x", i, id[i]);
+    }
+    MyPrintf("\n life = %x", read_chip_life());
 }
 
 /************************ (C) COPYRIGHT Yichip Microelectronics *****END OF FILE****/
