From fa8669b0092240642af78e84c0e89f596444fdad Mon Sep 17 00:00:00 2001
From: tao_z <tzj0429@163.com>
Date: Sun, 29 May 2022 12:05:33 +0800
Subject: [PATCH] 修改vettable为flash,并更新ld文件

---
 Application/source/nvm.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Application/source/nvm.c b/Application/source/nvm.c
index 2c087ad..9be73eb 100644
--- a/Application/source/nvm.c
+++ b/Application/source/nvm.c
@@ -55,8 +55,8 @@
 
 extern int8_t Fbl_CheckPresent()
 {
-    int8_t rtn = 0;
-    uint8_t i = 0;
+    int8_t rtn = 1;
+    uint8_t i = 1;
     uint8_t prensnttemp[8] = {0};
     uint8_t prensntmasktemp[8] = {0};
     FblReadPattern(prensnttemp, APP_PRESENT_ADDR);
@@ -65,7 +65,7 @@
     {
         if ((prensnttemp[i] + prensntmasktemp[i]) != 0xff)
         {
-            rtn = 1;
+            rtn = 0;
             break;
         }
     }
@@ -88,7 +88,7 @@
     if ((retValue1 == EE_OK) && (retValue2 == EE_OK))
     {
         // rtn = OP_STATUS_OK;
-        rtn = FblWriteProgramBlock();
+        rtn = DID_SaveProgamDataToNvm();
     }
     return rtn;
 }

--
Gitblit v1.8.0