作者: FLandY email:flandy1982@sina.com
由于笔记本电脑无并口, 手头上正好又有ulink2,于是花了半天的时候研究如何使用ulink2烧写mini2440开发板上的nor flash.
烧写过程如下:
1. 按照原理图连接好了ulink2, (RTCK悬空), 芯片能够正常的探测到, nor flash能够正常擦除.
2. 使用H-JTAG软件包里的H-CONVERT小工具将vivi由bin文件转换成hex文件, 起始地址为0x00000000.
3. 在KEIL MDK3.0软件内增加初始化代码init.ini, 内容如下:(此初始化代码是参照友善mini2440开发板官方提供的H-JTAG初始化代码改写的, 应该是在烧写前初始化一些重要的寄存器之类, 没有仔细研究)
_WDWORD(0x53000000,0x00000000);
_WDWORD(0x4A000008,0xFFFFFFFF);
_WDWORD(0x4A00001C,0x000007FF);
_WDWORD(0x53000000,0x00000000);
_WDWORD(0x56000050,0x000055AA);
_WDWORD(0x4C000014,0x00000007);
_WDWORD(0x4C000000,0x00FFFFFF);
_WDWORD(0x4C000004,0x00061012);
_WDWORD(0x4C000008,0x00040042);
_WDWORD(0x48000000,0x22111120);
_WDWORD(0x48000004,0x00002F50);
_WDWORD(0x48000008,0x00000700);
_WDWORD(0x4800000C,0x00000700);
_WDWORD(0x48000010,0x00000700);
_WDWORD(0x48000014,0x00000700);
_WDWORD(0x48000018,0x0007FFFC);
_WDWORD(0x4800001C,0x00018005);
_WDWORD(0x48000020,0x00018005);
_WDWORD(0x48000024,0x008E0459);
_WDWORD(0x48000028,0x00000032);
_WDWORD(0x4800002C,0x00000030);
_WDWORD(0x48000030,0x00000030);
4. KEIL MDK3软件增加ROM flash算法: "SST39x160x flash", 烧写过程中无任何错误.
烧写过程如下:
1. 按照原理图连接好了ulink2, (RTCK悬空), 芯片能够正常的探测到, nor flash能够正常擦除.
2. 使用H-JTAG软件包里的H-CONVERT小工具将vivi由bin文件转换成hex文件, 起始地址为0x00000000.
3. 在KEIL MDK3.0软件内增加初始化代码init.ini, 内容如下:(此初始化代码是参照友善mini2440开发板官方提供的H-JTAG初始化代码改写的, 应该是在烧写前初始化一些重要的寄存器之类, 没有仔细研究)
_WDWORD(0x53000000,0x00000000);
_WDWORD(0x4A000008,0xFFFFFFFF);
_WDWORD(0x4A00001C,0x000007FF);
_WDWORD(0x53000000,0x00000000);
_WDWORD(0x56000050,0x000055AA);
_WDWORD(0x4C000014,0x00000007);
_WDWORD(0x4C000000,0x00FFFFFF);
_WDWORD(0x4C000004,0x00061012);
_WDWORD(0x4C000008,0x00040042);
_WDWORD(0x48000000,0x22111120);
_WDWORD(0x48000004,0x00002F50);
_WDWORD(0x48000008,0x00000700);
_WDWORD(0x4800000C,0x00000700);
_WDWORD(0x48000010,0x00000700);
_WDWORD(0x48000014,0x00000700);
_WDWORD(0x48000018,0x0007FFFC);
_WDWORD(0x4800001C,0x00018005);
_WDWORD(0x48000020,0x00018005);
_WDWORD(0x48000024,0x008E0459);
_WDWORD(0x48000028,0x00000032);
_WDWORD(0x4800002C,0x00000030);
_WDWORD(0x48000030,0x00000030);
4. KEIL MDK3软件增加ROM flash算法: "SST39x160x flash", 烧写过程中无任何错误.
附上烧写成功的截图: