?? omap_init.txt
字號:
/*************************************************************/
/*************************************************************/
1.系統初始化
系統初始化過程:
CLKRST_reset -->pll setfreq-->CLKRST_setupScalableMode-->DSPCLKRST_setup
a.CLKRST_reset (Uint16 typeRst );
Resets OMAP devices as specified.
arm宏。初始化時取值為GLOBAL。
參數取值:
GLOBAL: global reset (DSP,ARM,and peripherals are reset).
DSP: DSP is reset .
ARM: ARM is reset.
ARMPER: ARM peripherals reset.
軟件復位。執行完全局軟件復位后,arm核和其內部外設釋放,但arm外設、dsp、dsp外設
仍然處于復位狀態。
b.void PLL_setFreq( PLL_Handle hpll, Uint16 mul, Uint16 div)
arm函數。
參數:
hpll is the PLL device handle.
mul: 1 – 31 integer multiplier
div: integer divisor {1, 2, 4} when mul = 1 (bypass mode = default mode) and
{1, 2, 3, 4} when mul !=1 (lock mode) where mul should not be further
divisible by div.
初始化pll以產生需要的clkout。
c.void CLKRST_setupScalableMode(CLKRST_Scalable *scalable);
arm函數。
參數:
Scalable: Pointer to CLKRST_Scalable structure.
typedef struct{
Uint16 armDiv; //values{1,2,4,8}
Uint16 dspDiv; // values {1,2,4,8}
Uint16 dspmmuDiv; //values {1,2,4,8}
Uint16 tcDiv; //values {1,2,4,8}
Uint16 perDiv; //values {1,2,4,8}
Uint16 lcdDiv; //values {1,2,4,8}
Uint16 timx0; //values{0,1}
Uint16 dspEnable;
Uint16 perEnMask;
}CLKRST_SetupScale;
perEnMask can be one of more of the following values:
LBFREECK:used to generate local bus external output clock,
so that even when LB_CK clock is stopped this clock
can still provide external system with a clock
synchronized to LB_CK.
GPIOCK:mpu gpio clk
DMACKREQ:system dma clk request
TIMCK:arm timer clk
APICK:arm port interface clk
LBCK:local bus clk
LCDCK:lcd clk
PERCK:arm peripheral clk
XORPCK:OS Timer and CLKIN reference peripheral clock
WDTCK:Watchdog Timer clock
將arm時鐘設置為synchronous scalable模式(arm和tc之間、dsp mmu與
tc之間使用fifo)。同時將arm外設從復位狀態變為使能狀態。同時,使dsp
的clock也使能。omap1510只能支持synchronous scalable和synchronous兩種
模式,后一種模式沒有fifo。
d.void DSPCLKRST_setup (DSPCLKRST_Setup *setup);
arm函數,設置dsp之clk。使dsp外設從復位態釋放。
參數:
Pointer to DSPCLKRST_Setup structure.
typedef struct{
Uint16 perDiv; //values{1,2,4,8}
Uint16 gpioDiv; //values{1,2,4,8}
Uint16 uartDiv; //values{4,8}
Uint16 gpiox0; //為0表示時鐘為clkin,為1表示時鐘為dpll1
Uint16 timx0;
Uint16 uartx0;
Uint16 perEnMask;
}DSPCLKRST_Setup;
perEnMask can be one or more of the following values:
DSP_TIMCK:DSP Timer clock
DSP_GPIOCK:DSP_GPIOCK
DSP_UARTCK:DSP_IDLECT2寄存器的bit3,TRM手冊上是”reserved“.
DSP_PERCK:DSP peripheral clock
DSP_XORPCK:external reference clock
DSP_WDTCK:Watchdog Timer clock
一旦選定clkin,則前面設置的3個關于dpll分頻比div就沒什么意義了。
e.
/*************************************************************/
/*************************************************************/
2.pin multiplex
需要配置的是:
a. ARM public外設:
USB host、USB client、uWIre、MPUIO、PWT、PWL、keyboard、LPG、HDQ
b. DSP public外設
MCBSP3
c. ARM&DSP shared 外設
GPIO,UART1~3
不需要multiplex配置的是:
a. ARM
McBsp2,I2C,Camera,32k timer,MMC/SD,RTC
b. DSP
McBsp1,MCSI1,MCSI2
L2中斷設置中斷服務程序時不用”interrupt“關鍵字,那么,L1是否用?
/*************************************************************/
/*************************************************************/
3. DSP BOOT
/*************************************************************/
/*************************************************************/
/*************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -