真是服了三星了,手册把DDRCLK 里面一个图示里面HCLK*2的字眼弄得很小,是图片来的,无法查看,刚才放大图片才看见,郁闷。也就是说DDRCLK 是等于HCLK*2 的了?!---------------------三星你这个鸟蛋!
没想到都是忽悠的,2416 的内存频率依然是来自HCLK 设置即可。手册page 672 如下:
The AHB and APB clocks are en/disabled by HCLKCON register. All reserved bits have 1 value at initial state.
HCLKCON Bit Description Initial Value
RESERVED [31:21] - 0x7FF
2D [20] Enable HCLK into 2D 1
DRAMC [19] Enable HCLK into DRAM controller 1
SSMC [18] Enable HCLK into the SSMC block 1
RESERVED [17] - 1
HSMMC1 [16] Enable HCLK into the HSMMC1 1
HSMMC0 [15] Enable HCLK into the HSMMC0 1
RESERVED [14] - 1
IROM [13] Enable HCLK into the IROM 1
USBDEV [12] Enable HCLK into the USB device 1
USBHOST [11] Enable HCLK into the USB HOST 1
RESERVED [10] - 1
DISPCON [9] Enable HCLK into the display controller 1
RESERVED [8:6] - 0x3
DMA0~5 [7:0] Enable HCLK into DMA channel 0~5 0x3F
-------------------------------------------------------------又发现一个有错误的地方!
在2416 的SD irom启动的代码里面有
DVSON SETA 0
HCLKVAL SETA 133
Startup_MPLL EQU800000000
Startup_Mdiv EQU 240
Startup_Pdiv EQU 3
Startup_Sdiv EQU 2
Startup_ARMCLKdiv EQU0 ; 0 : ARMCLK= MPLL/1
——看如下MPLL计算公式
The output frequencies of MPLL can be calculated using the following equations:
FOUT = (m x FIN) / (p x 2S
) (should be 40~1600MHz)
Fvco = (m x FIN) / p (should be 800~1600MHz)
where, m = MDIV, p = PDIV, s = SDIV, Fin = 10~30Mhz
这个Startup_MPLL=FOUT = (m x FIN) / (p x 2S)=240*12 /(3*2*2)=240M 不可能是 Startup_MPLLEQU 800000000 !!!
好蛋疼。难怪有Startup_ARMCLKdiv EQU0 ; 0 : ARMCLK= MPLL/1 了,开始我还真以为 2416 ARMCLK 跑了 800M呢。嘿嘿。
现在回来再检查一下HCLK 的问题。希望可以找到一些问题,把一些硬件无法启动以及无法下载NK.bin 的问题解决掉。
原文出处:http://blog.csdn.net/gooogleman/article/details/6735959