wince6下,怎么才能使S3C6410运行到667的频率呢,改怎么配置,在“S3C6410_SEC_V1\OAL\INC\soc_cfg.h”中需要修改哪些?
当我调整到666时,直接编译不通,在“dvs.h”跳出错误。没有“#define TARGET_ARM_CLK CLK_667MHz”,我自己定义了一个,且在“s3c6410.h”中也添加了,正在编译!
- #define SYNCMODE (TRUE)
- //------------------------------------------------------------------------------
- // Define : PRESET_CLOCK
- //
- // Use Predefined CLOCK SETTING.
- //------------------------------------------------------------------------------
- #define PRESET_CLOCK (TRUE)
- //------------------------------------------------------------------------------
- // CPU Revision (S3C6410 has EVT0, EVT1)
- //------------------------------------------------------------------------------
- #define EVT0 (36410100)
- #define EVT1 (36410101)
- #define CPU_REVISION (EVT1)
- //------------------------------------------------------------------------------
- // Predefined System Clock setting selection
- // Here are samples for clock setting that already tested.
- // For S3C410, ARM 533Mhz, SystemBus 133Mhz is recommended.
- // This values is only used on Driver written in C
- //------------------------------------------------------------------------------
- #if PRESET_CLOCK
- #define CLK_25MHz 25000000
- #define CLK_50MHz 50000000
- #define CLK_33_25MHz 33250000
- #define CLK_66_5MHz 66500000
- #define CLK_96MHz 96000000
- #define CLK_100MHz 100000000
- #define CLK_133MHz 133000000
- #define CLK_1333MHz 133333333
- #define CLK_133_2MHz 133200000
- #define CLK_150MHz 150000000
- #define CLK_200MHz 200000000
- #define CLK_233MHz 233000000
- #define CLK_266MHz 266000000
- #define CLK_266_4MHz 266400000
- #define CLK_300MHz 300000000
- #define CLK_400MHz 400000000
- #define CLK_450MHz 450000000
- #define CLK_532MHz 532000000
- #define CLK_600MHz 600000000
- #define CLK_634MHz 634000000
- #define CLK_1332MHz 1332000000
- #define CLK_666MHz 666000000
- #define CLK_667MHz 667000000
- #define CLK_798MHz 798000000
- #define CLK_800MHz 800000000
- #define CLK_900MHz 900000000
- // Change This Definition to choose BSP Clock !!! (and "s3c6410.inc")
- //#define TARGET_ARM_CLK CLK_66_5MHz //< Sync 66.5:66.5:66.5 HCLKx2=266
- //#define TARGET_ARM_CLK CLK_133MHz //< Sync 133:133:66.5 HCLKx2=266
- //#define TARGET_ARM_CLK CLK_266MHz //< Sync 266:133:66.5 HCLKx2=266
- //#define TARGET_ARM_CLK CLK_400MHz //< Async 400:100:50 HCLKx2=200
- //#define TARGET_ARM_CLK CLK_450MHz //< Sync 450:150:37.5 HCLKx2=300
- #define TARGET_ARM_CLK CLK_532MHz //< Sync 532:133:66.5 HCLKx2=266, Async is same
- //#define TARGET_ARM_CLK CLK_600MHz //< Sync 600:150:75 HCLKx2=300
- //#define TARGET_ARM_CLK CLK_666MHz //< Sync 666:133.2:66.6 HCLKx2=266.4, Async 666:133:66.5 HCLKx2=266
- //#define TARGET_ARM_CLK CLK_798MHz //< Sync 798:133:66.5 HCLKx2=266
- //#define TARGET_ARM_CLK CLK_800MHz //< Sync 800:133.33:33.33 HCLKx2=266.66, ASync 800:133:66.5 HCLKx2=266
- //#define TARGET_ARM_CLK CLK_900MHz //< Sync 900:150:75, HCLKx2=300
- /// MPLL Setting
- #if (TARGET_ARM_CLK == CLK_400MHz)
- #define MPLL_CLK (CLK_200MHz)
- #else // 532, 634, 666, 800, 900, 133, 266, 66.5
- #define MPLL_CLK (CLK_266MHz)
- #endif
- #define MPLL_DIV 2
- #define S3C6410_DoutMPLL (MPLL_CLK/MPLL_DIV) // 100 Mhz or 133Mhz
- #if (TARGET_ARM_CLK == CLK_666MHz && SYNCMODE) || (TARGET_ARM_CLK == CLK_450MHz) || (TARGET_ARM_CLK == CLK_266MHz)
- #define APLL_CLK (TARGET_ARM_CLK*2)
- #elif (TARGET_ARM_CLK == CLK_133MHz)
- #define APLL_CLK (TARGET_ARM_CLK*4)
- #elif (TARGET_ARM_CLK == CLK_66_5MHz)
- #define APLL_CLK (TARGET_ARM_CLK*8)
- #else
- #define APLL_CLK (TARGET_ARM_CLK)
- #endif
- #if (TARGET_ARM_CLK == CLK_450MHz) || (TARGET_ARM_CLK == CLK_666MHz) || (TARGET_ARM_CLK == CLK_266MHz)
- #define APLL_DIV 2
- #elif (TARGET_ARM_CLK == CLK_133MHz)
- #define APLL_DIV 4
- #elif (TARGET_ARM_CLK == CLK_66_5MHz)
- #define APLL_DIV 8
- #else
- #define APLL_DIV 1
- #endif
- #define HCLK_DIV 2
- #if (TARGET_ARM_CLK == CLK_66_5MHz)
- #define PCLK_DIV 2
- #else
- #define PCLK_DIV 4
- #endif
- /// APLL and A:H:P CLK configuration
- #if (SYNCMODE)
- #if (TARGET_ARM_CLK == CLK_666MHz) && (CPU_REVISION == EVT1)
- #define HCLKx2_DIV 5 // sync
- #elif (TARGET_ARM_CLK == CLK_532MHz) || (TARGET_ARM_CLK == CLK_600MHz) || (TARGET_ARM_CLK == CLK_266MHz) || (TARGET_ARM_CLK == CLK_133MHz)
- #define HCLKx2_DIV 2 // sync
- #elif (TARGET_ARM_CLK == CLK_798MHz) || (TARGET_ARM_CLK == CLK_900MHz) || (TARGET_ARM_CLK == CLK_450MHz) || (TARGET_ARM_CLK == CLK_800MHz)
- #define HCLKx2_DIV 3 // sync
- #elif (TARGET_ARM_CLK == CLK_66_5MHz)
- #define HCLKx2_DIV 4 // sync
- #endif
- #else // 400Mhz, 532Mhz, 666Mhz
- #define HCLKx2_DIV 1 // Async
- #endif
- #define S3C6410_ACLK (APLL_CLK/APLL_DIV)
- #if (SYNCMODE)
- #define S3C6410_HCLKx2 (APLL_CLK/HCLKx2_DIV)
- #else
- #define S3C6410_HCLKx2 (MPLL_CLK/HCLKx2_DIV)
- #endif
- #define S3C6410_HCLK (S3C6410_HCLKx2/HCLK_DIV)
- #define S3C6410_PCLK (S3C6410_HCLKx2/PCLK_DIV)
- #else // PRESET_CLOCK = FALSE
- #define APLLVALUE (((S3C6410_SYSCON_REG*)(S3C6410_BASE_REG_PA_SYSCON))->APLL_CON)
- #define MPLLVALUE (((S3C6410_SYSCON_REG*)(S3C6410_BASE_REG_PA_SYSCON))->MPLL_CON)
- #define CLKDIV (((S3C6410_SYSCON_REG*)(S3C6410_BASE_REG_PA_SYSCON))->CLKD_IV0)
- #endif // PRESET_CLOCK
- //------------------------------------------------------------------------------
- // SMDK6410 EPLL Output Frequency
- //------------------------------------------------------------------------------
- //#define S3C6410_ECLK (CLK_96MHz) // 96 MHz for USB Host, SD/HSMMC..
- #define S3C6410_ECLK (84666667) // 84,666,667 Hz for IIS Sampling Rate 44.1 KHz (384fs)
- //#define S3C6410_ECLK (92160000) // 92,160,000 Hz for IIS Sampling Rate 48 KHz (384fs)
要修改PLL的配置,bootlaoder,OAL都要修改。
spec上说的是需要1.2V电压的,具体软件需要怎么配置,不太懂,学习。
bootlaoder,OAL都要修改吧,你可以参考其它是怎么实现的?
有没有bsp_cfg.h这个文件:
里面定义:
#if (CPU_NAME == S3C6410)
#define CLK_667MHz 667000000
#define CLK_800MHz 800000000 // Just for the Test, Remove when release
#define CLK_1066MHz 1066000000 // Just for the Test, Remove when release
#endif
...
#elif (S3C6410_APLL_CLK == CLK_667MHz) // ARM:HCLK:PCLK = 667:133:33.25 (Async Mode)
#if (CPU_NAME == S3C6410)
#define APLL_CLK (S3C6410_APLL_CLK)
#define MPLL_CLK (CLK_266MHz)
#define APLL_DIV 1
#define MPLL_DIV 2
#define HCLKx2_DIV 1 // Async
#define HCLK_DIV 2
#define PCLK_DIV 8
#define S3C6410_ACLK (APLL_CLK/APLL_DIV) // 667 MHz
#define S3C6410_DoutMPLL (MPLL_CLK/MPLL_DIV) // 133 MHz
#define S3C6410_HCLKx2 (MPLL_CLK/HCLKx2_DIV) // 266 MHz
#define S3C6410_HCLK (S3C6410_HCLKx2/HCLK_DIV) // 133 MHz
#define S3C6410_PCLK (S3C6410_HCLKx2/PCLK_DIV) // 33.25 MHz
好像还需要更改s3c6410.inc文件中的内容吧
是滴,要一致嘛,不知道还有没有其他的相关文件,很头疼的!
引用: 引用 12 楼 lh806732 的回复:
从532MHz->666MHz需要修改s3c6410.inc和soc_cfg.h文件,其他不需要修改。除非你的BSP有问题。
只有更改到666的时候才需要修改s3c6410.inc吗,但是我查看了一下,这个inc里面使用的是533.
是否可以不用修改,想再次确认一下,等会儿编译试试。
当6410运行在667的时候,使用什么才能看到这个呢。或者是需要怎么写个软件
谢谢
编译是能正常编译通过,但是少些上去之后不能正常运行,串口输出是乱码。并且一直停在开机画面上,不能进入系统,开机画面的滚动条任然在滚动。
我没有重新烧写bootloader。
667跑起来了
不过不知道是不是真的运行在667了,只是启动时串口调试输出为667了
需要更改s3c6410.inc文件,要重新编译和重新烧写bootloader 。
这个地方调试输出显示ARMCLK已经是667了,难道是假像?
有没有什么办法验证
谢谢
手册中有计算时钟的公式,你计算一下就行了。。。。。。。。。
把PLL和分频寄存器值打印出来。。。。。
印象中,修改俩个头文件就行了。。。。。。。。
比较简单的。。。。。。。。。。