diff --git a/si4/ps5ws.si4project/soft_ps5ws.sip_xm b/si4/ps5ws.si4project/soft_ps5ws.sip_xm index 552e261..309909c 100644 Binary files a/si4/ps5ws.si4project/soft_ps5ws.sip_xm and b/si4/ps5ws.si4project/soft_ps5ws.sip_xm differ diff --git a/source/app/app_config.c b/source/app/app_config.c index 2489081..3a19225 100644 --- a/source/app/app_config.c +++ b/source/app/app_config.c @@ -44,7 +44,7 @@ void L3_reg_2_iap(void) L0_uart0_sendstr("e2p write success"); } #endif - if(L1_eep_write_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_PARAM_BLOCK_SIZE, (U8*)&R.p,sizeof(R.p),TRUE) == 0) + if(L1_eep_write_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_SECTOR_BLOCK_SIZE, (U8*)&R.p,sizeof(R.p),TRUE) == 0) { L0_uart0_sendstr("e2p write success"); return; @@ -73,7 +73,7 @@ void L3_iap_2_reg(void) R.p.adc_blur_threshold[0] = iapData.adc_blur_threshold[0]; R.p.adc_blur_threshold[1] = iapData.adc_blur_threshold[1]; #endif - if(L1_eep_read_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_PARAM_BLOCK_SIZE, (U8*)&R.p, NULL) == 0) + if(L1_eep_read_block(D_EEP_PARAM_IN_SECTOR, D_EEP_PARAM_IN_BLOCK, D_EEP_SECTOR_BLOCK_SIZE, (U8*)&R.p, NULL) == 0) { L0_uart0_sendstr("e2p read success"); return; diff --git a/source/app/task_encrypt.c b/source/app/task_encrypt.c index 51c2e70..c7218ac 100644 --- a/source/app/task_encrypt.c +++ b/source/app/task_encrypt.c @@ -31,7 +31,7 @@ int L3_mcu_id_ok(void) U8 i = 0; //1. 获取eeprom中存储的enc信息 - if(L1_eep_read_block(D_EEP_ENC_IN_SECTOR, D_EEP_ENC_IN_BLOCK, D_EEP_ENC_BLOCK_SIZE, (U8*)&eep_enc,NULL) == 1) + if(L1_eep_read_block(D_EEP_ENC_IN_SECTOR, D_EEP_ENC_IN_BLOCK, D_EEP_SECTOR_BLOCK_SIZE, (U8*)&eep_enc,NULL) == 1) { //L0_uart0_sendstr("e2p read enc failed"); return 0; diff --git a/source/bsp/bsp_config.h b/source/bsp/bsp_config.h index c37d08f..126bc70 100644 --- a/source/bsp/bsp_config.h +++ b/source/bsp/bsp_config.h @@ -116,13 +116,13 @@ //EEP User Defined 参数区存储配置 #define D_EEP_PARAM_IN_SECTOR 1 //eeprom参数区扇区地址,从0开始 #define D_EEP_PARAM_IN_BLOCK 0 //eeprom参数区数据块地址,从0开始 - #define D_EEP_PARAM_BLOCK_SIZE (D_EEP_SECTOR_BLOCK_SIZE) //参数区每个块大小,必须:D_EEP_PARAM_BLOCK_SIZE<=D_EEP_SECTOR_BLOCK_SIZE!!!,因为eeprom.h中是按照D_EEP_SECTOR_BLOCK_SIZE分配的buf - #define D_EEP_PARAM_BLOCK_NUM (D_EEP_SECTOR_SIZE / D_EEP_PARAM_BLOCK_SIZE) //每个扇区数据块的数量 + //#define D_EEP_PARAM_BLOCK_SIZE (D_EEP_SECTOR_BLOCK_SIZE) //参数区每个块大小,必须:D_EEP_PARAM_BLOCK_SIZE<=D_EEP_SECTOR_BLOCK_SIZE!!!,因为eeprom.h中是按照D_EEP_SECTOR_BLOCK_SIZE分配的buf + //#define D_EEP_PARAM_BLOCK_NUM (D_EEP_SECTOR_SIZE / D_EEP_PARAM_BLOCK_SIZE) //每个扇区数据块的数量 //EEP 加密区存储配置 #if(D_CODE_ENCRYPTION_TYPE == TYPE_ENCRYPTION_ENABLE) #define D_EEP_ENC_IN_SECTOR 0 //eeprom加密区扇区地址,从0开始 #define D_EEP_ENC_IN_BLOCK 0 //eeprom加密区数据块地址,从0开始 - #define D_EEP_ENC_BLOCK_SIZE 0x20 //ENC_BLOCK_SIZE必须与加密程序中的ENC_BLOCK_SIZE匹配,此处不建议修改,如需修改,请同时修改加密程序 + //#define D_EEP_ENC_BLOCK_SIZE 0x20 //ENC_BLOCK_SIZE必须与加密程序中的ENC_BLOCK_SIZE匹配,此处不建议修改,如需修改,请同时修改加密程序 #endif #elif xxx