解决不能擦除flash的问题

This commit is contained in:
ranchuan
2023-10-08 18:27:10 +08:00
parent 41b36f357e
commit 7f6efb9f5a
14 changed files with 156 additions and 48 deletions

View File

@@ -18,6 +18,7 @@
#include "interface/BaseChecker.h"
#include "interface/JQChecker.h"
#include "interface/XTChecker.h"
#include "interface/EWChecker.h"
#define PLAN_MAX_TASK 64
@@ -196,7 +197,7 @@ array_def *elec_check_with_scheme(array_def *uid_psw)
{
self_def *s=&g_self;
const uint8_t* ptaskindex = (uint8_t*)(APP_TEST_PLAN_ADDR+4);
CheckerTask *tasks_fun_table[]={jqtaskArray,xttaskArray};
CheckerTask *tasks_fun_table[]={jqtaskArray,xttaskArray,ewtaskArray};
CheckerTask_Info_st *task_par=0;
uint8_t chip_type=0;
uint8_t taskid=0;
@@ -205,10 +206,12 @@ array_def *elec_check_with_scheme(array_def *uid_psw)
array_def *r=arr_creat();
chip_type=(board_st.plan_id >> 12 ) & 0x0F;
if(s->scheme_inited==0){
DBG_WARN("scheme not init.");
arr_append(r,1);
return arr_temp(r);
}
if(chip_type>=LENGTH(tasks_fun_table)){
DBG_WARN("unknown chip type.");
arr_append(r,2);
return arr_temp(r);
}
@@ -225,14 +228,17 @@ array_def *elec_check_with_scheme(array_def *uid_psw)
checker_runcfg.excue_rtv = 0;
checker_runcfg.task_info.retry_time = 0;
if(taskid>=CHECKER_MAXID_COUNT){
DBG_WARN("tiskid out of bound.");
break;
}
task_par= s->task_info_array[task_index];
if(task_par==0){
DBG_WARN("can not find task params.");
break;
}
task_fun=tasks_fun_table[chip_type][taskid];
if(task_fun==0){
DBG_WARN("can not find task fun.");
break;
}