{"text_format":"2","workbook":"xlsx","n_sheets":4,"sheets":["分区说明","协议说明","固件包文件格式","升级流程图"],"not_rendered":{"charts":0,"images":1,"macros":0,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"分区说明","index":0,"n_rows":21,"n_cols":5,"rows_kept":21,"cut":false,"hidden":false,"merged":[[8,4,12,4],[19,1,20,1],[15,2,17,2],[19,4,20,4],[14,4,18,4],[9,3,11,3],[15,3,17,3],[2,1,2,3],[3,1,3,3],[4,1,4,3],[5,1,5,3],[8,1,12,1],[9,2,11,2],[14,1,18,1]]}
[]
[]
[null,"STM32F407芯片容量1024kb有效地址从0x08000000~0x080FFFFF，这里将地址范围不均等地划分成12个扇区（从扇区0到扇区11），其中扇区0~3的地址空间是16KB，扇区4的地址空间是64KB，扇区5~11的地址空间是128KB。"]
[null,"最小擦除单位为一个扇区"]
[null,"最小写入单位2字节"]
[null,"存储字节为小端模式"]
[]
[null,"Flash分区","地址","Sector11"]
[null,"download区","0x080C0000","Sector10","384k"]
[null,null,"128kb","1扇区"]
[]
[]
[null,null,"0x08080000","Sector8"]
[null,"paramter区","0x08060000","Sector7","128k"]
[null,"app区","0x08040000","Sector6","352k"]
[null,null,"208kb","3扇区"]
[]
[]
[null,null,"0x08008000","Sector2"]
[null,"bootloader区","0x08004000","Sector1","32k"]
[null,null,"0x08000000","Sector0"]

{"sheet":"协议说明","index":1,"n_rows":71,"n_cols":12,"rows_kept":71,"cut":false,"hidden":false,"merged":[[72,1,72,12],[45,6,45,11],[44,5,44,11],[49,6,49,11],[48,6,48,11],[51,2,51,11],[40,4,40,5],[40,6,40,11],[41,8,41,9],[41,6,41,7],[36,6,36,7],[36,8,36,11],[37,6,37,11],[33,6,33,11],[32,5,32,8],[32,9,32,10],[24,5,24,11],[25,6,25,11],[22,2,22,11],[29,6,29,11],[28,5,28,6],[28,7,28,11],[10,2,10,11],[13,5,13,11],[1,1,1,12],[2,1,2,12],[14,4,14,5],[14,6,14,11],[18,3,19,11],[18,2,19,2],[15,5,15,11],[16,5,16,11],[17,5,17,11],[6,5,6,11],[7,5,7,11],[4,2,4,11],[11,2,17,2],[11,3,17,3],[11,5,11,11],[12,5,12,11]]}
[]
[null,"使用CAN2.0B，扩展帧模式，通讯速率500k，自定义多包"]
[null,"PGN：00DF00"]
[]
[null,null,"帧结构说明"]
[null,null,"帧结构","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF Fx Ex","操作码","数据域"]
[null,null,"BMS","0x18 DF Ex Fx","操作码","结果"]
[]
[]
[null,null,"操作码说明"]
[null,null,"UPP","0x18 DF Ex Fx","0x71","查询版本号"]
[{"$nulls":4},"0x72","发送固件信息"]
[{"$nulls":4},"0x73","下达擦除download区命令+固件CRC"]
[{"$nulls":4},"0x80|帧号(或运算)",null,"下发固件内容"]
[{"$nulls":4},"0x74","查询传输结果"]
[{"$nulls":4},"0x75","下达执行升级命令"]
[{"$nulls":4},"0x76","查询设备类型"]
[null,null,"特别说明","传输固件内容时，将帧号于0x80进行或运算，得值即为操作码，帧数最大为0x7FFF（32767）帧，因此该操作码使用两字节，取大端字节序放入帧data[0]、data[1]，剩下六字节做数据域，为固件内容区。"]
[]
[]
[]
[null,null,"应用说明"]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","0x71","无"]
[null,null,"BMS","0x18 DF E1 F1","0x71","0x01","版本号"]
[]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","0x76","设备识别码"]
[null,null,"BMS","0x18 DF E1 F1","0x76","0x01","设备类型"]
[]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","0x72","固件总字节数",null,null,null,"总帧数"]
[null,null,"BMS","0x18 DF E1 F1","0x72","0x01","设备类型"]
[]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","0x73","0x01","固件校验码"]
[null,null,"BMS","0x18 DF E1 F1","0x73","0x01（成功）/0x00（失败）"]
[]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","（0x80|帧号)",null,"数据区"]
[null,null,"BMS","0x18 DF E1 F1","0x80","0x01:成功\n0x00：固件信息CRC错误\n0x01：设备信息CRC错误\n0x02：固件信息包CRC错误\n0x03：小包CRC错误\n0x04：分包长度异常\n0x05：设备类型不匹配","发送帧号",null,"设备接收计数"]
[]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","0x74"]
[null,null,"BMS","0x18 DF E1 F1","0x74","0x01（成功）/0x00（失败）"]
[]
[null,null,"角色","ID","Data[0]","Data[1]","Data[2]","Data[3]","Data[4]","Data[5]","Data[6]","Data[7]"]
[null,null,"UPP","0x18 DF F1 E1","0x75","0x01"]
[null,null,"BMS","0x18 DF E1 F1","0x75","0x01","版本号"]
[]
[null,null,"固件CRC计算方式"]
[null,null,"// 参数pbuff -固件内容。len 固件大小（字帯数）"]
[null,null,"uint16_t Firmware_CRCl6(uint8_t *pbuff, uint16_t len)"]
[null,null,"{"]
[null,null,"    uint16_t temp = 0;"]
[null,null,"    uint16_t crc = 0xFFFF;"]
[null,null,"    for (int i = 0; i < len; i++)"]
[null,null,"    {"]
[null,null,"        for (int j = 0; j < 8; j++)"]
[null,null,"        {"]
[null,null,"            temp = ((pbuff[i] << j) & 0x80) ^ ((crc & 0x8000) >> 8);"]
[null,null,"            crc <<= 1;"]
[null,null,"            if (temp != 0)"]
[null,null,"            {"]
[null,null,"                crc ^= 0x1021;"]
[null,null,"            }"]
[null,null,"        }"]
[null,null,"    }"]
[null,null,"    return crc;"]
[null,null,"}"]

{"sheet":"固件包文件格式","index":2,"n_rows":27,"n_cols":8,"rows_kept":27,"cut":false,"hidden":false,"merged":[[17,3,19,3],[20,3,26,3],[17,5,18,5],[20,5,26,5],[1,1,1,7],[17,1,26,1],[5,2,16,2],[17,2,26,2],[5,3,5,5],[6,3,6,5],[7,3,7,5],[8,3,8,5],[9,3,9,5],[10,3,10,5],[11,3,11,5],[2,3,2,5],[3,3,3,5],[2,1,2,2],[3,1,4,2],[4,3,4,5],[5,1,16,1],[12,3,12,5],[13,3,13,5],[14,3,14,5],[15,3,15,5],[16,3,16,5]]}
[]
[null,"固件包文件格式"]
[null,null,null,"更新信息",null,null,"大小\n（byte）","是否加密"]
[null,"固件信息",null,"更新设备数量",null,null,4,"否"]
[null,null,null,"CRC16",null,null,2,"否"]
[null,"设备信息","设备1","设备标识（人工输入）",null,null,2,"否"]
[null,null,null,"烧录方式（人工输入）",null,null,1,"否"]
[null,null,null,"KEY",null,null,12,"否"]
[null,null,null,"MD5",null,null,32,"否"]
[null,null,null,"设备数据长度",null,null,4,"否"]
[null,null,null,"芯片ID",null,null,1,"否"]
[null,null,null,"固件ID",null,null,3,"否"]
[null,null,null,"App版本",null,null,3,"否"]
[null,null,null,"Bootloader版本",null,null,2,"否"]
[null,null,null,"烧录起始地址",null,null,4,"否"]
[null,null,null,"烧录结束地址",null,null,4,"否"]
[null,null,null,"CRC16",null,null,2,"否"]
[null,"固件数据","设备1","信息","固件小包数量","固件信息",4,"否"]
[{"$nulls":4},"固件小包长度",null,2,"否"]
[{"$nulls":4},"CRC16",null,2,"否"]
[null,null,null,"数据","小包1序号","固件数据",4,"否"]
[{"$nulls":4},"小包1数据",null,200,"是"]
[{"$nulls":4},"小包1 CRC16",null,2,"否"]
[{"$nulls":4},"…",null,"…","否"]
[{"$nulls":4},"小包n序号",null,4,"否"]
[{"$nulls":4},"小包n数据",null,200,"是"]
[{"$nulls":4},"小包n CRC16",null,2,"否"]

{"sheet":"升级流程图","index":3,"n_rows":3,"n_cols":5,"rows_kept":3,"cut":false,"hidden":false,"merged":[[3,1,58,3],[3,4,58,6],[2,1,2,3],[2,4,2,6],[1,1,1,6]]}
[]
[]
[null,"UPP",null,null,"BMS"]