解决ew写配置错误的bug,升级ew程序不更改配置区

This commit is contained in:
ranchuan
2023-12-15 19:21:17 +08:00
parent fd1deab81c
commit e4fde0a436
6 changed files with 5 additions and 3 deletions

BIN
doc/CSMZM_V0.11.bin Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -63,7 +63,7 @@ def creat():
d+=arr_byte_copy(0x00,1024*16-len(d)) d+=arr_byte_copy(0x00,1024*16-len(d))
crc_all=crc32(d) crc_all=crc32(d)
crc_app=crc32(d[4096:]) crc_app=crc32(d[4096:4096+11*1024])
print("crc32 of all data:",hex(crc_all)) print("crc32 of all data:",hex(crc_all))
print("crc32 for 0x1000:",hex(crc_app)) print("crc32 for 0x1000:",hex(crc_app))
d+=arr_from_int(crc_all) d+=arr_from_int(crc_all)

View File

@@ -289,3 +289,5 @@
解决 EW_Test_ReadUID 函数数组越界的问题 解决 EW_Test_ReadUID 函数数组越界的问题
2023.12.12 2023.12.12
添加 总线翻转任务 JQ_Test_Toggle 添加 总线翻转任务 JQ_Test_Toggle
2023.12.15
解决ew写配置错误的bug升级ew程序不更改配置区

View File

@@ -1280,7 +1280,7 @@ uint8_t EW_WriteRunCfg(uint16_t addr,RunCfg_un* runcfg)
addr = (addr & 0xFFC0) | 20; addr = (addr & 0xFFC0) | 20;
EW_CommBuf[0] = addr&0xFF; EW_CommBuf[0] = addr&0xFF;
EW_CommBuf[1] = (addr >> 8)&0xFF; EW_CommBuf[1] = (addr >> 8)&0xFF;
memcpy((EW_CommBuf+2),&runcfg,3); memcpy((EW_CommBuf+2),runcfg,3);
DMod_SendBytes((uint8_t*)EW_CommBuf,6,EW_DMOD_Peroid,uc_readflag); DMod_SendBytes((uint8_t*)EW_CommBuf,6,EW_DMOD_Peroid,uc_readflag);
if(uc_readflag == 0) if(uc_readflag == 0)
{ {

View File

@@ -22,7 +22,7 @@
#define UPDATA_PACK_LEN 128 #define UPDATA_PACK_LEN 128
#define UPDATA_BASE_ADDR 0x1000 #define UPDATA_BASE_ADDR 0x1000
#define UPDATA_DATA_LEN (12*1024) #define UPDATA_DATA_LEN (11*1024)
#define UPDATA_FLAG_ADDR (0x7c) #define UPDATA_FLAG_ADDR (0x7c)
#define BOOT_FLAG ((uint8_t []){0x99,0x66,0xaa,0x55}) #define BOOT_FLAG ((uint8_t []){0x99,0x66,0xaa,0x55})
#define UPDATA_FLAG ((uint8_t []){0xaa,0xbb,0xcc,0xdd}) #define UPDATA_FLAG ((uint8_t []){0xaa,0xbb,0xcc,0xdd})