V2.12 sn为0时如果未写流水号则报错

This commit is contained in:
ranchuan
2024-01-04 18:09:09 +08:00
parent 1e25675998
commit 78e0ebd0c2
7 changed files with 30 additions and 26 deletions

View File

@@ -299,7 +299,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@@ -377,24 +377,7 @@
<Name></Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>185</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134234652</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\source\rt_thread\libcpu\arm\cortex-m3\context_rvds.S</Filename>
<ExecCommand></ExecCommand>
<Expression>\\checker_slave_app\source/rt_thread/libcpu/arm/cortex-m3/context_rvds.S\185</Expression>
</Bp>
</Breakpoint>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
@@ -540,7 +523,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>

View File

@@ -322,3 +322,5 @@
EW_Updata 添加错误12表示小板中无jwt程序
2024.01.03
V2.11 读流水号时如果目标值为0则不报错
2021.01.04
V2.12 sn为0时如果未写流水号则报错

View File

@@ -91,7 +91,7 @@ uint8_t Gpio_GetDeivceAddr(void)
ul_addr |= ((PCin(SEG1_Pin_Nu) & 0x01) <<1);
ul_addr |= (PAin(SEG0_Pin_Nu) & 0x01);
return ul_addr;
// return 1;
// return 7;
}

View File

@@ -1049,6 +1049,12 @@ void EW_Test_ReadSN(void)
temp.data>>=5;
if((sn!=0)&&(temp.data!=sn)){
uc_rtv=3;
goto end;
}
// sn为0时如果没写过流水号则失败
if((sn==0)&&(temp.data==0)){
uc_rtv=4;
goto end;
}
end:
Checker_SetRtv((uint16_t *)&temp,checker_runcfg.rtv_count);
@@ -1081,11 +1087,18 @@ void EW_Test_WriteSN(void)
uc_rtv=2;
goto end;
}
// 流水号域如果有值且不为要设置的流水号则失败
if((temp.data&(~0x1f))!=0){
if((temp.data>>5)!=sn){
uc_rtv=3;
}
goto end;
}
delay_ms(50);
temp.data=(temp.data&0x1f)|(sn<<5);
uc_rtv |= EW_WriteMTP(checker_runcfg.netid,addr,temp.arr,len);
if(uc_rtv){
uc_rtv=3;
uc_rtv=4;
goto end;
}
end:

View File

@@ -1326,6 +1326,12 @@ void JQ_Test_ReadSN(void)
temp.data>>=5;
if((sn!=0)&&(temp.data!=sn)){
uc_rtv=3;
goto end;
}
// sn为0时如果没写过流水号则失败
if((sn==0)&&(temp.data==0)){
uc_rtv=4;
goto end;
}
end:

View File

@@ -6,8 +6,8 @@
#define BUILD_DATE "2024-01-03 15:32:33"
#define SOFT_VERSION "2.11"
#define BUILD_DATE "2024-01-04 14:39:32"
#define SOFT_VERSION "2.12"

View File

@@ -7,7 +7,7 @@ import mycopy
# 定义软件版本号
SOFT_VERION = "2.11"
SOFT_VERION = "2.12"