测量阻值是5是返回校准值
升级用的延时改为delay_os_ms
This commit is contained in:
@@ -154,6 +154,7 @@ void Checker_ResistorSample(void)
|
||||
case 2: us_resistor = aus_sample[2];break;
|
||||
case 3: us_resistor = aus_sample[3];break;
|
||||
case 4: us_resistor = aus_sample[4];break;
|
||||
case 5: us_resistor = board_st.resistor_diff;break;
|
||||
default : us_resistor = 0;break;
|
||||
}
|
||||
Checker_MaskResult(0,checker_runcfg.task_info.runindex);
|
||||
|
@@ -39,7 +39,7 @@ static uint8_t EW_bootErease(void)
|
||||
uint8_t read[4]={0};
|
||||
uint8_t ret=0;
|
||||
DMod_SendBytesXor(data,2,1);
|
||||
delay_ms(50);
|
||||
delay_os_ms(50);
|
||||
ret=DMod_ReadBytesXor(read,4,100);
|
||||
DBG_LOG("ret=%d,dat=%02x,%02x,%02x,%02x,",ret,read[0],read[1],read[2],read[3]);
|
||||
return ret;
|
||||
@@ -245,7 +245,7 @@ commend_export(jwt_app_commtest,cmd_jwt_app_commtest,"jwt commtest in app")
|
||||
static void EW_appRunBoot(void)
|
||||
{
|
||||
EW_Charge(1,0,0);
|
||||
delay_ms(6000);
|
||||
delay_os_ms(6000);
|
||||
EW_RunBootLoader(1,1);
|
||||
DBG_LOG("run boot");
|
||||
}
|
||||
@@ -279,7 +279,7 @@ typedef struct{
|
||||
int EW_HardReset(ew_updata_def *e)
|
||||
{
|
||||
EW_BUS_OFF;
|
||||
delay_ms(e->time_poweroff);
|
||||
delay_os_ms(e->time_poweroff);
|
||||
EW_BUS_ON;
|
||||
return 0;
|
||||
}
|
||||
@@ -290,14 +290,14 @@ int EW_HardReset(ew_updata_def *e)
|
||||
int EW_CheckState(ew_updata_def *e)
|
||||
{
|
||||
uint16_t ret=0;
|
||||
delay_ms(100);
|
||||
delay_os_ms(100);
|
||||
ret=EW_bootCharg();
|
||||
if(ret==0){
|
||||
delay_ms(e->time_charg);
|
||||
delay_os_ms(e->time_charg);
|
||||
e->state=1;
|
||||
}else{
|
||||
EW_HardReset(e);
|
||||
delay_ms(e->time_loadapp);
|
||||
delay_os_ms(e->time_loadapp);
|
||||
ret=EW_appCommTest();
|
||||
delay_ms(5);
|
||||
if(ret==0){
|
||||
@@ -319,7 +319,7 @@ static int EW_TurnToBoot1(ew_updata_def *e)
|
||||
EW_EnWriteMTP(0,1);
|
||||
delay_ms(5);
|
||||
EW_RunBootLoader(0,0);
|
||||
delay_ms(500);
|
||||
delay_os_ms(500);
|
||||
if(EW_bootCharg()==0)
|
||||
return 0;
|
||||
else
|
||||
@@ -410,7 +410,7 @@ void EW_Updata(void)
|
||||
DBG_LOG("erase app");
|
||||
ret=EW_bootErease();
|
||||
if(ret) {ret=2;goto err;}
|
||||
delay_ms(600);
|
||||
delay_os_ms(600);
|
||||
while(len>0){
|
||||
pack_len=len>UPDATA_PACK_LEN?UPDATA_PACK_LEN:len;
|
||||
LED1_Out=!LED1_Out;
|
||||
@@ -428,10 +428,10 @@ void EW_Updata(void)
|
||||
DBG_LOG("module crc:0x%04x.",crc_module);
|
||||
if(ret) {ret=4;goto err;}
|
||||
if(crc!=crc_module){ret=5;goto err;}
|
||||
delay_ms(50);
|
||||
delay_os_ms(50);
|
||||
ret=EW_bootJump();
|
||||
if(ret) {ret=6;goto err;}
|
||||
delay_ms(ew_updata.time_loadapp);
|
||||
delay_os_ms(ew_updata.time_loadapp);
|
||||
ret=EW_EnWriteMTP(0,1);
|
||||
if(ret) {ret=7;goto err;}
|
||||
DBG_LOG("EW_EnWriteMTP success.");
|
||||
@@ -440,7 +440,7 @@ void EW_Updata(void)
|
||||
ret=EW_WriteMTP(1,(uint8_t)(UPDATA_FLAG_ADDR/4),UPDATA_FLAG,4);
|
||||
if(ret) {ret=8;goto err;}
|
||||
DBG_LOG("EW_WriteMTP success.");
|
||||
delay_ms(20);
|
||||
delay_os_ms(20);
|
||||
ret=EW_ReadMTP(1,(uint8_t)(UPDATA_FLAG_ADDR/4),read_buf,4);
|
||||
if(ret) {ret=9;goto err;}
|
||||
if(memcmp(read_buf,UPDATA_FLAG,4)!=0){
|
||||
@@ -450,9 +450,9 @@ void EW_Updata(void)
|
||||
DBG_LOG("EW_ReadMTP check success.");
|
||||
delay_ms(5);
|
||||
XTBUS_OFF;
|
||||
delay_ms(ew_updata.time_poweroff);
|
||||
delay_os_ms(ew_updata.time_poweroff);
|
||||
XTBUS_ON;
|
||||
delay_ms(ew_updata.time_loadapp);
|
||||
delay_os_ms(ew_updata.time_loadapp);
|
||||
ret=EW_appCommTest();
|
||||
if(ret) {ret=11;goto err;}
|
||||
DBG_LOG("EW_appCommTest success.");
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
|
||||
#define BUILD_DATE "2023-12-26 17:20:22"
|
||||
#define BUILD_DATE "2023-12-27 11:39:17"
|
||||
#define SOFT_VERSION "2.10"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user