//////////////////////////////////////////////////////////////////////////////// int main(void) { static Word16 SMSET_FLG; /* Setup Interrupt Vector */ CSL_CPU_REGS->IVPH = (UWord16)(((UWord32)(&VECSTART)) >> 8); CSL_CPU_REGS->IVPD = (UWord16)(((UWord32)(&VECSTART)) >> 8); /* Software reset for stack mode */ if(SMSET_FLG != 1234) { SMSET_FLG = 1234; asm(" RESET"); } /* Initialization of DSP */ INIT_DSP(); /* Initialization of DMA buffer */ init_dma_buf(); /* Initialization of Internal Memory */ WRAP_INIT_IMEM(); init_glob_var(); etc... } void INIT_DSP(void) { /***** PLL Configuration *****/ Set_PLL(); /***** System Register Configuration *****/ Set_System(); /***** EMIF Configuration ******/ Set_EMIF(); /***** DMA Configuration *****/ Set_DMA(); etc... } /***** PLL Configuration *****/ void Set_PLL(void) { CSL_Status status; status = PLL_init(&pll_obj, CSL_PLL_INST_0); csl_err.err_PLL.err_PLL_init = status; pll_handle = (PLL_Handle)(&pll_obj); status = PLL_config(pll_handle, &pll_config); csl_err.err_PLL.err_PLL_config = status; status = PLL_enable(pll_handle); csl_err.err_PLL.err_PLL_enable = status; } ////////////////////////////////////////////////////////////////////////////////