你好!这里是风筝的博客,欢迎和我一起交流。
如果本篇博客对您有帮助,或许可以在下方评论给我留个言。
a.进入汇编函数lowlevel_init(路径:board\samsung\smdk2440\lowlevel_init.S)的lowlevel_init代码段,找到:
SMRDATA:
.word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28))
.word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC))
.word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC))
.word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC))
.word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC))
.word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC))
.word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC))
.word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN))
.word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN))
.word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT)
.word 0x32
.word 0x30
.word 0x30
修改为:
SMRDATA:
.long 0x22011110//BWSCON
.long 0x00000700//BANKCON0
.long 0x00000700//BANKCON1
.long 0x00000700//BANKCON2
.long 0x00000700//BANKCON3
.long 0x00000700//BANKCON4
.long 0x00000700//BANKCON5
.long 0x00018005//BANKCON6
.long 0x00018005//BANKCON7
.long 0x008C04F4// REFRESH
.long 0x000000B1//BANKSIZE
.long 0x00000030//MRSRB6
.long 0x00000030//MRSRB7
b.如果此时把uboot.bin烧写到Nor Flash上,启动开发板,是能看到串口有反应了:
U-Boot 2016.11 (May 03 2017 - 20:24:36 +0800)
CPUID: 32440001
FCLK: 400 MHz
HCLK: 100 MHz
PCLK: 50 MHz
DRAM: 64 MiB
WARNING: Caches not enabled
Flash: 0 Bytes
NAND: 0 MiB
*** Warning - bad CRC , using default environment
In: serial
Out: serial
Err: serial
Net: CS8900-0
Error: CS8900-0 address not set.
SMDK2440 #