当前位置: 首页 > 工具软件 > Flash4j > 使用案例 >

jflash添加芯片_利用J-Link烧写SPI串行Flash存储器方法

景明诚
2023-12-01

J-Flash SPI是个单独的软件,如果你找不到,可能要升级到相对高一点的版本。我这是5.02的。项目采用默认的就行。

图1. 软件界面

打开要写入存储器的数据文件。File->Open data file (+O)

图2. 我的路由器是WR703N,4M改16M Flash

图3. 起始地址不用改

图4. 数据已备好

试着连接SPI存储器,软件会采用标准的读Flash ID过程尝试识别芯片型号。读到的三字节ID为: 0xEF 40 18(0xEF是华邦的Manufacturer ID,0x4018是W25Q128FV的Device ID)。J-Flash SPI支持的芯片列表:https://www.segger.com/jlink_supported_devices.html#SupportedSPIFlashes

图5. 除了正确识别出芯片外,软件还列出该芯片的各操作命令代码

自动烧写就好。Target->Auto()

图6. 先回读

图7. 烧写

图8. 完成

截图稍微简化了过程。

软件的Auto自动操作步骤从读取存储器原始内容开始,与准备烧写的内容进行比较,如果数据完全相同则直接结束。如果要烧写的区块原片为已擦除或者原片为空片则进入烧写过程,否则要对需要的区块进行擦除操作。烧写后再次读回校验,数据完全一致则烧写成功。

一次完整的烧写过程可能有以下提示:

Connecting ... - Connecting via USB to J-Link device 0

- VTarget = 4.258V - Read SPI Flash Id = 0xEF 40 18 00 00 00 00 00 00 00 00 00 00 00 00 00

- Found SPI Flash: Winbond W25Q128FVSIG - Connected successfully

Disconnecting ... - Disconnected

Auto programming target (16777216 bytes, 1 range) ... - Connecting ...

- Connected successfully - Reading affected sectors ...

- Target memory read successfully. (16777216 bytes, 1 range) - Erasing affected sectors ...

- Erase operation completed successfully - Programming target (0 bytes, 0 ranges) ...

- Target programmed successfully - Verifying target (0 bytes, 0 ranges) ...

- All loaded bytes verified OK! - Target erased, programmed and verified successfully - Completed after 158.982 sec

Erasing chip ... - Erasing 256 sectors, 1 range, 0x0 - 0xFFFFFF

- Erase operation completed successfully - Completed after 55.154 secAuto programming target (16777216 bytes, 1 range) ...

- Reading affected sectors ...    - Target memory read successfully. (16777216 bytes, 1 range)

- Erasing affected sectors ...    - Erase operation completed successfully

- Programming target (3803392 bytes, 8 ranges) ...    - Target programmed successfully

- Verifying target (3803392 bytes, 8 ranges) ...    - All loaded bytes verified OK!

- Target erased, programmed and verified successfully - Completed after 138.177 sec

利用J-Link烧写SPI串行Flash存储器(后续)

http://bbs.mydigit.cn/read.php?tid=2056681

 类似资料: