开发板:SEED-DVS8168
仿真器:SEED-XDS560v2
CCS:Version: 6.1.0.00104
53 /* Main PLL */ 54 #define MAIN_N56 55 #define MAIN_P0x1 56 57 /* DSP -> 1000 MHz*/ 58 #define MAIN_INTFREQ10xC 59 #define MAIN_FRACFREQ10x189374 60 #define MAIN_MDIV10x1 61 62 /* ARM -> 987 MHz*/ 63 #ifdef ARM_PLL_987 64 #define MAIN_INTFREQ20xC 65 #define MAIN_FRACFREQ20x400000 66 #endif 67 #ifdef ARM_PLL_1200 68 #define MAIN_INTFREQ20xA 69 #define MAIN_FRACFREQ20x147AE1 70 #endi
根据上面的宏定义在evm816x.gel中修改如下:
/* ------------------------------------------------------------------------ * ** * Setup_MainPLL()* ** * ------------------------------------------------------------------------ */ Setup_MainPLL() {GEL_TextOut("\tMain PLL Init is in Progress, Please wait ..... \n","Output",1,1,1);/* mainPLL( MAIN_N, MAIN_P, MAIN_INTFREQ1, MAIN_FRACFREQ1, MAIN_MDIV1,MAIN_INTFREQ2, MAIN_FRACFREQ2, MAIN_MDIV2,MAIN_INTFREQ3, MAIN_FRACFREQ3, MAIN_MDIV3,MAIN_INTFREQ4, MAIN_FRACFREQ4, MAIN_MDIV4,MAIN_INTFREQ5, MAIN_FRACFREQ5, MAIN_MDIV5,MAIN_MDIV6, MAIN_MDIV7)*//* mainPLL(64, 0x1, 0x8, 0x800000, 0x2, */ // 800 MHz GEM mainPLL(64, 0x1, 0xC, 0x189374, 0x1,// 1000 MHz GEM0xE, 0x0, 0x1,// 987 MHz A8, SGX derives from this0x8, 0xAAAAB0, 0x3,// 530 MHz IVA0x9, 0x55554F, 0x3,// 493 MHz L30x9, 0x374BC6, 0xC,// 125 MHz CPGMAC0x48, 0x4);// 24 MHz USB, 432 MHz for Audio PLLGEL_TextOut("\tMain PLL Init is Done ..... \n","Output",1,1,1); }
GEL文件做上述修改,由800 MHz GEM到1000 MHz GEM。
使用下面代码测试发现:
#include <xdc/std.h> #include <xdc/runtime/System.h> #include <xdc/runtime/Timestamp.h> #include <xdc/runtime/Types.h> /* ======== main ======== */ Int main(Int argc, String argv[]){Types_FreqHz freq;Timestamp_getFreq(&freq);System_printf("freq = {0x%x : 0x%x}\n", freq.hi, freq.lo);System_printf("time = 0x%x\n", Timestamp_get32());System_printf("time = 0x%x\n", Timestamp_get32());return (0); }
freq = {0x0 : 0x2faf0800}
0x2faf0800换算成十进制:800000000
DSP主频修改为1000 MHz失败。
请问,是否还有其它地方需要设置?我是在DM8168的DSP端单独开发。
Ternence_Hsu:
你好,
你试一下 Utils_setCpuFrequency(dspFreq*1000*1000);
cang_rong:
回复 Ternence_Hsu:
Utils_setCpuFrequency(SYSTEM_DSP_FREQ) informs sysbios of the operating frequency of the core. This info is required by the OS so that all ms ticks and sleeps are calibrated correctly. This funtion does _not_ set the actual core frequency.Frequency should be set in uboot by changing clocks_ti816x.h as you have already done
Ternence_Hsu:
回复 cang_rong:
你可以在clocks_ti816x.h中修改,
也可以通过Utils_setCpuFrequency设置
cang_rong:
回复 Ternence_Hsu:
谢谢啊!