迪文科技论坛

 找回密码
 立即注册
搜索
查看: 4842|回复: 0

【教学视频】0xAA串口更新ICL文件

[复制链接]

94

主题

138

回帖

1300

积分

超级版主

Rank: 8Rank: 8

积分
1300
发表于 2023-2-24 23:51:18 | 显示全部楼层 |阅读模式
0xAA串口更新ICL文件。


此处使用0x02模式,串口更新ICL文件。
D11:0x5A=启动一次外部存储器操作, CPU 操作完清零。
D10:操作模式。0x02,写 32Kbytes 数据块到外部 SPI NOR FLASH。
D9:D8:32Kbytes 存储器块地址,0x0000-0x07FF,对应整个 SPI NOR 存储器。
D7:D6:更新数据保存在数据变量空间的首地址,必须是偶数。
D5:D0:未定义,写 0x00。

以标准品16MB Flash,更新32.icl大小4.17KB,数据变量空间首地址(RAM)0x8000为例:
一.以32Kbytes 数据块为基准,计算ICL数据包起始位置。

16MB存储器可划分为64个256KB的存储器,即0-63范围(32.icL按此划分);也可划分为512个32KB的存储器。
1个16MB Flash划分块:16*1024/32=512(单位换算,1MB=1024KB),即范围是:0x0000-0x01FF(0-511);
4个16MB Flash划分块:16*4*1024/32=2048,即范围是:0x0000-0x07FF(0-2047)

更新32.icl按32KB数据块发包计算起始ID:32*256/32=256=0x0100,即32.icl的第一个数据包放到0x0100位置。

二.将32.icl数据写入变量空间首地址(RAM)0x8000暂存。
1个32KB占用RAM地址计算:32*1024/2=16384(字)=0x4000(字);(1kB=1024bytes,2bytes=1个字,10进制与16进制的换算)。
0x8000+0x4000=0xC000;(RAM范围是0x0000-0xFFFF)

以上即1个32KB数据块占用0x8000-0xC000地址范围(暂存地址不要做其他用,不然会把数据修改)。


由于一条指令最大不超过255字节,数据部分不超过249字节,以240字节作为数据部分的长度(便于计算)。
32KB数据包分成N条指令   :32*1024/240=136.5(32KB数据换算137条指令)
4.17KB数据包分成N条指令:4.17*1024/240=17.8(4.17KB数据换算共18条指令
每条指令间隔地址计算:240/2=120=0x78(1个变量地址=2字节,每条指令起始地址加0x78)

4.17KB数据包18条指令起始地址如下:
0x8000 0x8078
0x80F0 0x8168
0x81E0 0x8258
0x82D0 0x8348
0x83C0 0x8438
0x84B0 0x8528
0x85A0 0x8618
0x8690 0x8708
0x8780 0x87F8

附件图片32.icl指令如下(选用一张纯色图,数据量会较小,数据部分相同可复制):

0000h-00efh(240字节,240=00f0h,下个地址从00f0h开始,UE中15行数据为240字节):
5A A5 F3 82 80 00 44 47 55 53 5F 33 FB 2900 00 10 A8 04 00 00 00 00 00 00 14 01 E0 01 E0 02 72 00 00 0E 20 FF D8 FF E000 10 4A 46 49 46 00 01 01 01 00 60 00 60 00 00 FF DB 00 43 00 03 02 02 03 0202 03 03 03 03 04 03 03 04 05 08 05 05 04 04 05 0A 07 07 06 08 0C 0A 0C 0C 0B0A 0B 0B 0D 0E 12 10 0D 0E 11 0E 0B 0B 10 16 10 11 13 14 15 15 15 0C 0F 17 18 1614 18 12 14 15 14 FF DB 00 43 01 03 04 04 05 04 05 09 05 05 09 14 0D 0B 0D 1414 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 1414 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 FF C0 00 11 0801 E0 01 E0 03 01 22 00 02 11 01 03 11 01 FF C4 00 1F 00 00 01 05 01 01 01 0101 01 00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B

第2条
00f0h-01dfh(240*2=480字节,480=01e0h,下个地址从01e0h开始):
5A A5 F3 82 80 78 FF C4 00 B5 10 00 02 0103 03 02 04 03 05 05 04 04 00 00 01 7D 01 02 03 00 04 11 05 12 21 31 41 06 1351 61 07 22 71 14 32 81 91 A1 08 23 42 B1 C1 15 52 D1 F0 24 33 62 72 82 09 0A16 17 18 19 1A 25 26 27 28 29 2A 34 35 36 37 38 39 3A 43 44 45 46 47 48 49 4A53 54 55 56 57 58 59 5A 63 64 65 66 67 68 69 6A 73 74 75 76 77 78 79 7A 83 84 8586 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9 AA B2 B3 B4B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9 DA E1 E2 E3E4 E5 E6 E7 E8 E9 EA F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FF C4 00 1F 01 00 03 01 01 0101 01 01 01 01 01 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B FF C4 00B5 11 00 02 01 02 04 04 03 04 07 05 04 04 00 01 02 77 00 01 02

第3条
01e0h-02cfh(240*3=720字节,720=02d0h,下个地址从02d0h开始):
5A A5 F3 82 80 F0 03 11 04 05 21 31 06 1241 51 07 61 71 13 22 32 81 08 14 42 91 A1 B1 C1 09 23 33 52 F0 15 62 72 D1 0A16 24 34 E1 25 F1 17 18 19 1A 26 27 28 29 2A 35 36 37 38 39 3A 43 44 45 46 4748 49 4A 53 54 55 56 57 58 59 5A 63 64 65 66 67 68 69 6A 73 74 75 76 77 78 797A 82 83 84 85 86 87 88 89 8A 92 93 94 95 96 97 98 99 9A A2 A3 A4 A5 A6 A7 A8 A9AA B2 B3 B4 B5 B6 B7 B8 B9 BA C2 C3 C4 C5 C6 C7 C8 C9 CA D2 D3 D4 D5 D6 D7 D8 D9DA E2 E3 E4 E5 E6 E7 E8 E9 EA F2 F3 F4 F5 F6 F7 F8 F9 FA FF DA 00 0F 03 01 0002 11 03 11 00 3F 00 00 00 00 B1 45 14 57 F5 D9 F8 50 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第4条
02d0h-03bfh(240*4=960字节,960=03c0h,下个地址从03c0h开始):
5A A5 F3 82 81 68 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第5条
03c0h-04afh(240*5=1200字节,1200=04b0h,下个地址从04b0h开始):
5A A5 F3 82 81 E0 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第6条
04b0h-059fh(240*6=1440字节,1440=05a0h,下个地址从05a0h开始):
5A A5 F3 82 82 58 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第7条
05a0h-068fh(240*7=1680字节,1680=0690h,下个地址从0690h开始):
5A A5 F3 82 82 D0 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第8条
0690h-077fh(240*8=1920字节,1920=0780h,下个地址从0780h开始):
5A A5 F3 82 83 48 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第9条
0780h-086fh(240*9=2160字节,2160=0870h,下个地址从0870h开始)
5A A5 F3 82 83 C0 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第10条
0870h-095fh(240*10=2400字节,2400=0960h,下个地址从0960h开始)
5A A5 F3 82 84 38 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第11条
0960h-0a4fh(240*11=2640字节,2640=0a50h,下个地址从0a50h开始)
5A A5 F3 82 84 B0 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第12条
0a50h-0b3f(240*12=2880字节,2880=0b40h,下个地址从0b40h开始)
5A A5 F3 82 85 28 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第13条
0b40h-0c2fh(13*240=3120字节,3120=0c30h,下个地址从0c30h开始)
5A A5 F3 82 85 A0 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第14条
0c30h-0d1fh(14*240=3360字节,3360=0d20h,下个地址从0d20开始)
5A A5 F3 82 86 18 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第15条
0d20h-0e0fh(15*240=3600字节,3600=0e10h,下个地址从0e10h开始)
5A A5 F3 82 86 90 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第16条
0e10h-0effh(16*240=3840字节,3840=0f00h,下个地址从0f00h开始)
5A A5 F3 82 87 08 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第17条
0f00h-0fefh(17*240=4080字节,4080=0ff0h,下个地址从0ff0h开始)
5A A5 F3 82 87 80 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00

第18条
0ff0h-10dfh18*240=4320字节,4320=10e0h,下个地址从10e0h开始)最后一条只有182字节,数据长度一定要正确。
5A A5 B9 82 87 F8 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 0051 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 5145 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 1400 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 45 14 00 51 4514 00 51 45 14 00 51 45 14 00 51 45 14 01 FF D9

三.将32.icl数据写入16MB Flash
根据0xAA指令定义和第一部分计算的第一个数据包起始0x0100地址,将上方数据变量空间(RAM)0x8000-0x8853地址的暂存数据写入到Flash。

D11:0x5A=启动一次外部存储器操作, CPU 操作完清零。
D10:操作模式。0x02,写 32Kbytes 数据块到外部 SPI NOR FLASH。
D9:D8:32Kbytes 存储器块地址,0x0000-0x07FF,对应整个 SPI NOR 存储器。
D7:D6:更新数据保存在数据变量空间的首地址必须是偶数
D5:D0:未定义,写 0x00。

5A A5 0F 82 00AA 5A 02 01 00 80 00 00 14 00 00 00 00

写入状态读取(是否写完做判断):
5A A5 04 83 00 AA 01(读取写入状态)  5A A5 06 83 00 AA 01 5A 02  (返回5A02说明还在写入)
5A A5 04 83 00 AA 01(读取写入状态)  5A A5 06 83 00 AA 01 00 02  (返回0002说明写入完成)

写入完成,复位指令等同掉电上电一次,写入完成可以复位一次)
5A A5 07 82 00 04 55 AA 5A A5

四.注意事项
1.更新黑屏:
(1)数据分包错误,可参考这个链接:http://inforum.dwin.com.cn:20080/forum.php?mod=viewthread&tid=243
(2)数据更新位置不对,比如14.bin文件更新到32.icl,会把图片数据清空导致黑屏:
5A A5 0F 82 00 AA 5A 02 01 00 80 00 00 14 00 00 00 00(比如RAM写的都是14文件数据,写入时写到32号位置,会清除掉Flash 的图片数据)。
5A A5 0F 82 00 AA 5A 02 00 70 80 00 0014 00 00 00 00

2.更新花屏

(1)图像一部分显示花屏:最后一条指令数据长度检查是否为0xF3,如数据不足240字节则需修改数据长度或者用00补齐240字节。
(2)数据内容部分需要正确。

五.视频链接
https://www.bilibili.com/video/BV1Lo4y1Y7mE/?share_source=copy_web&vd_source=d92404e3c71c2242785616ae6c55dd40

六.友情链接

(1)UE数据复制:http://inforum.dwin.com.cn:20080/forum.php?mod=viewthread&tid=3680
(2)0xAA 32.icl更新(理解0xAA指令、256KB、32KB数据块):http://inforum.dwin.com.cn:20080/forum.php?mod=viewthread&tid=7553
(3)0xAA 14.bin更新(理解数据指令划分):http://inforum.dwin.com.cn:20080/forum.php?mod=viewthread&tid=7561
(4)0xAA 多个32KB数据包:http://inforum.dwin.com.cn:20080/forum.php?mod=viewthread&tid=243

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2024-11-23 01:10 , Processed in 0.074312 second(s), 31 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表