Nor Flash烧写过程
uboot -----> SDRAM -----> Nor Flash
因此我们要设置CPU、SDRM地址、Nor Falsh地址
初始化代码
/*********************************************************************
*
* SEGGER J-Link ARM Setup File - Generated by J-Flash ARM V4.08l
*
* Syntax:
*
* SetJTAGSpeed(Speed); : Sets the JTAG speed [kHz], (0 = Auto, 0xFFFF = Adaptive)
* Delay(Delay); : Waits a given time [msec]
* DisableMMU(); : Disables the MMU
* DisableChecks(); : Disables mode check after read operations
* EnableChecks(); : Enables mode check after read operations
* Go(); : Starts the core
* Halt(); : Halts the core
*
* Reset(Delay); : Resets the target (normal)
* ResetWP(); : Resets the target (using watchpoint)
* ResetDBGRQ(); : Resets the target (using DBGRQ)
* ResetBP0(Delay); : Resets the target (using breakpoint @ addr 0)
* ResetADI(); : Resets the target (using ADI software reset)
*
* Read8 (Addr); : Reads a 8/16/32 bit value,
* Read16(Addr); : Addr = address to read (as hex value)
* Read32(Addr); :
*
* Verify8 (Addr, Data); : Verifies a 8/16/32 bit value,
* Verify16(Addr, Data); : Addr = address to verify (as hex value)
* Verify32(Addr, Data); : Data = data to verify (as hex value)
*
* Write8 (Addr, Data); : Writes a 8/16/32 bit value,
* Write16(Addr, Data); : Addr = address to write (as hex value)
* Write32(Addr, Data); : Data = data to write (as hex value)
*
* WriteVerify8 (Addr, Data); : Writes and verifies a 8/16/32 bit value,
* WriteVerify16(Addr, Data); : Addr = address to write (as hex value)
* WriteVerify32(Addr, Data); : Data = data to write (as hex value)
*
* WriteRegister(Reg, Data); : Writes a register
* WriteJTAG_IR(Cmd); : Writes the JTAG instruction register
* WriteJTAG_DR(nBits, Data); : Writes the JTAG data register
*
* VarAND(Data); : VAR = VAR AND Data
* VarOR (Data); : VAR = VAR OR Data
* VarXOR(Data); : VAR = VAR XOR Data
* VarBEQ(Index); : Execute branch
*
* VarWrite8 (Addr); : Writes the value of VAR as 8/16/32 bit value,
* VarWrite16(Addr); : Addr = address to write (as hex value)
* VarWrite32(Addr); :
*
**********************************************************************
*/
SetJTAGSpeed(5);
Halt();
DisableMMU();
Write32(0x53000000, 0x00000000); // pWTCON,看门狗定时器
Write32(0x4A000008, 0xFFFFFFFF); // INTMSK,中断屏蔽寄存器
Write32(0x4A00001C, 0x000007FF); // INTSUBMSK
Write32(0x56000050, 0x000055AA); // rGPFCON
Write32(0x4C000014, 0x00000007); // CLKDIVN
Write32(0x4C000000, 0x00FFFFFF); // LOCKTIME
Write32(0x4C000004, 0x00061012);
Write32(0x4C000008, 0x00040042); // UPLLCON
Write32(0x48000000, 0x22111120); // Bus width &wait
Write32(0x48000004, 0x00002F50); // Boot Rom control
Write32(0x48000008, 0x00000700); // Bank1 control
Write32(0x4800000C, 0x00000700); // Bank2 control
Write32(0x48000010, 0x00000700); // Bank3 control
Write32(0x48000014, 0x00000700); // Bank4 control
Write32(0x48000018, 0x0007FFFC); // Bank5 control
Write32(0x4800001C, 0x00018005); // Bank6 control
Write32(0x48000020, 0x00018005); // Bank7 control
Write32(0x48000024, 0x008E0459); // DRAM/SDRAM
Write32(0x48000028, 0x00000032); // Flexible bank size
Write32(0x4800002C, 0x00000030); // Modify register for sdram
Write32(0x48000030, 0x00000030); // Modify register for sdram
SetJTAGSpeed(4000);
本次烧写的是Superboot2440.bin,为了使用MiniTools...WIN7无法使用DNW的人伤不起!!!!
完成图展示:
上一篇:JLINK+ADS+mini2440配置///配置J-Link为mini2440烧写bootloader
下一篇:使用J-Link烧写一U-boot的烧写+裸板程序烧写(JZ2440-S3C2440)
推荐阅读最新更新时间:2024-10-29 00:12
设计资源 培训 开发板 精华推荐
- STM32F411RET
- LTC3633AIFE-2 1.8V/2.5V 4MHz 降压稳压器的典型应用电路
- 具有同步栅极驱动器的 RT8298A 6A、24V、600kHz 降压转换器的典型应用
- DC1889A,使用 LTM4624EY 微型模块稳压器的演示板,微型高性能、高效率降压稳压器
- AM1G-0515SZ 15V 1 瓦 DC-DC 转换器的典型应用
- 基于 AL8400Q 的 LED 串的高压操作 Tapping VCC 典型应用
- DER-442 - 30W 隔离反激式、1 - 10 V 模拟调光 LED 驱动器
- AM2F-1209SH52Z 9V 2 瓦 DC/DC 转换器的典型应用
- LT8330IS6 3V 至 6V 输入、24V 升压转换器的典型应用电路
- 使用 Analog Devices 的 LT1217 的参考设计