|
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng) 驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe |
想降低ATMEL 9200的工作時(shí)鐘頻率,求助程序修改問(wèn)題? |
作者:starmoon 欄目:ARM技術(shù) |
想把ARM9的時(shí)鐘頻率降低為30M,應(yīng)該修改LOADER文件吧。 (1)修改 INIT.C文件 #include "main.h" #define AT91C_BASE_SDRAM 0x20000000 #define AT91C_MASTER_CLOCK 48000000 //應(yīng)該把此地方改為30000000 #define AT91C_BAUD_RATE 115200 //根據(jù)波特率與主時(shí)鐘的關(guān)系,修改 (2)疑惑MAIN.C /*-----------------------------------------------------*/ /* Function NAME : AT91F_SetPLL() */ /* Object : Set the PLLA to 180MHz and MASTER Clock to 60MHZ */ //MASTER Clock 怎么被定義成的60MHZ ??? /*-------------------------------------------------*/ void AT91F_SetPLL(void) { volatile int tmp = 0; /* APMC Initialization for CRYSTAL */ AT91PS_PMC pApmc = (AT91PS_PMC)AT91C_BASE_PMC; AT91PS_CKGR pCkgr = (AT91PS_CKGR)AT91C_BASE_CKGR; pApmc->PMC_IDR = 0xFFFFFFFF; /* -Setup the PLL A */ pCkgr->CKGR_PLLAR = AT91C_PLLA_VALUE; while(!(pApmc->PMC_SR & AT91C_PMC_LOCKA) && (tmp++ < DELAY_MAIN_FREQ)); /* Write in the MCKR dirty VALUE concerning the clock selection CSS then overwrite it in a second sequence */ pApmc->PMC_MCKR = 0x203; /* Wait until the MASTER clock is established */ tmp = 0; while(!(pApmc->PMC_SR & AT91C_PMC_MCKRDY) && (tmp++ < DELAY_MAIN_FREQ)); /* - Commuting MASTER Clock from PLLB to PLLA/3 */ pApmc->PMC_MCKR = 0x202; /* Wait until the MASTER clock is established */ tmp = 0; while(!(pApmc->PMC_SR & AT91C_PMC_MCKRDY) && (tmp++ < DELAY_MAIN_FREQ)); /* Setup MEMC to SUPPORT all connected memories (CS0 = FLASH; CS1=SDRAM) */ AT91C_BASE_EBI->EBI_CSA = AT91C_EBI_CS1A; /* com set CS0 cs for FLASH */ AT91C_BASE_SMC2->SMC2_CSR[0] = 0x00003284; } * - 本貼最后修改時(shí)間:2006-7-26 14:28:32 修改者:starmoon |
2樓: | >>參與討論 |
作者: angelhj 于 2006/7/26 16:57:00 發(fā)布:
好好看看datasheet關(guān)于pll的部分。 |
3樓: | >>參與討論 |
作者: wangkj 于 2006/7/27 8:33:00 發(fā)布:
這東西都不會(huì)算,老板要你干啥? |
|
|
免費(fèi)注冊(cè)為維庫(kù)電子開(kāi)發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入 |
Copyright © 1998-2006 www.udpf.com.cn 浙ICP證030469號(hào) |