TI中文支持网
TI专业的中文技术问题搜集分享网站

C6455的PLL初始化问题

想在bootloader中加入初始化PLL,请问有没有C6455的PLL初始化的.asm汇编代码可以参考?

Shine:

可以参考c6713 secondary bootloader配置寄存器的方法。
www.ti.com/…/spra999a.pdf

Tony Tang:

user5896786想在bootloader中加入初始化PLL,请问有没有C6455的PLL初始化的.asm汇编代码可以参考?

类似的,无非就是对寄存器地址写值。你可以自己照着画一个。下面是一个类似芯片的代码。参考一下。这是放在.c里的,所以加了asm().

/* ============================================================================ * Copyright (c) Texas Instruments Inc 2008 * * Use of this software is controlled by the terms and conditions found * in the license agreement under which this software has been supplied. * =========================================================================== *//*for TI_EVMCFGHPI_ENA_PU .equ 0x00000001otherwiseCFGHPI_ENA_PU .equ 0x00000011*//* for CU1PLL_M_PU .equ 0x0000000A for CUSTOMER2PLL_M_PU .equ 0x0000000C otherwisePLL_M_PU .equ 0x00000015 *//*for CU1EMIF_SDTIMR_PU .equ 0x31114610EMIF_SDCR_PU .equ 0x00000721EMIF_A1CR_PU .equ 0x08344229for CU2EMIF_SDTIMR_PU .equ 0x31114610EMIF_SDCR_PU .equ 0x00000720EMIF_A1CR_PU .equ 0x08344229otherwiseEMIF_SDTIMR_PU .equ 0x31114610EMIF_SDCR_PU .equ 0x00000721EMIF_A1CR_PU .equ 0x04102105*/asm(" .global _EMIF_SDTIMR_CU,_EMIF_SDCR_CU,_EMIF_A1CR_CU "); asm(" .global _CFGHPI_ENA_CU,_PLL_M_CU "); asm(" .global _target_id,_target_var,_rt_version "); asm(" .option D,T ");asm(" .length 102 ");asm(" .width 140 ");asm("TI_VAR_PU .equ 0x00000001 ");//asm("TI_VAR_PU .equ 0x00000002 ");asm("TI_EVM_PU .equ 0x00000001 ");//asm("TI_EVM_PU .equ 0x00000005 ");asm("PLL_RST_TO .equ 0x00000400 ");asm("PLL_RST_RELEASE_TO .equ 0x00010000 ");asm(" ");asm("CFGHPI_ENA_PU .equ 0x00000001 ");//asm("CFGHPI_ENA_PU .equ 0x00000011 ");asm("PLL_M_PU .equ 0x00000015 ");//asm("PLL_M_PU .equ 0x0000000a ");asm(" ");asm("EMIF_SDSRETR_PU .equ 0x00000006 ");asm("EMIF_SDRCR_PU .equ 0x0000061A ");asm("EMIF_SDTIMR_PU .equ 0x31114610 ");asm("EMIF_SDCR_PU .equ 0x00000721 ");asm("EMIF_A1CR_PU .equ 0x04102105 ");//asm("EMIF_A1CR_PU .equ 0x0834422a ");asm(" ");asm("CFGPIN1_NHCS .equ 0x00000020 ");asm(" ");asm("TRANSFER_MAGIC_16 .equ 0x01010101 ");asm("TRANSFER_REQUEST .equ 0x02020202 ");asm("TRANSFER_DONE .equ 0x03030303 ");asm("DIV1 .equ 0x00000000 ");asm("DIV2 .equ 0x00000001 ");asm("DIV3 .equ 0x00000002 ");asm(" ");asm("DEVICE_CONFIG_REG_START .equ 0x40000000 ");asm("UHPI_REG_START .equ 0x43000000 ");asm("PLL_REG_START .equ 0x41000000 ");asm("EMIF_REG_START .equ 0xF0000000 ");asm(" ");asm("EMIF_SDCR .equ 0x00000008 ");asm("EMIF_SDRCR .equ 0x0000000c ");asm("EMIF_A1CR .equ 0x00000010 ");asm("EMIF_SDTIMR .equ 0x00000020 ");asm("EMIF_SDSRETR .equ 0x0000003c ");asm(" ");asm("PLL_CSR .equ 0x41000100 ");asm("PLL_M .equ 0x41000110 ");asm("PLL_DIV0 .equ 0x41000114 ");asm("PLL_DIV1 .equ 0x41000118 ");asm("PLL_DIV2 .equ 0x4100011C ");asm("PLL_DIV3 .equ 0x41000120 ");asm("PLL_CMD .equ 0x41000138 ");asm(" ");asm("CSR_PLLEN .equ 0x00000001 ");asm("CSR_PLLPWRDN .equ 0x00000010 ");asm("CSR_OSCPWRDN .equ 0x00000004 ");asm("CSR_PLLRST .equ 0x00000008 ");asm("CSR_PLLPWRDN .equ 0x00000010 ");asm("CSR_PLLSTABLE .equ 0x00000040 ");asm("DIV_ENABLE .equ 0x00008000 ");asm("CMD_GOSET .equ 0x00000001 ");asm(" ");asm("CFGPIN1 .equ 0x40000004 ");asm("CFGHPI .equ 0x40000008 ");asm(" .sect .boot_load "); asm(" .global _BOOT2 "); asm(" .global ___binit__ "); asm("_BOOT2_HANDSHAKE: .word TRANSFER_MAGIC_16 "); asm("_BOOT2: "); asm(" MVKL PLL_CSR,A1 "); asm(" MVKH PLL_CSR,A1 "); asm(" LDW *A1,A3 "); asm(" MVKL PLL_RST_TO,B0 "); asm(" MVKH PLL_RST_TO,B0 "); asm(" MVKL ~(CSR_PLLPWRDN | CSR_PLLEN),B1 "); asm(" MVKH ~(CSR_PLLPWRDN | CSR_PLLEN),B1 "); asm(" AND A3,B1,A3 "); asm(" MVKL CSR_PLLRST,B1 ");asm(" MVKH CSR_PLLRST,B1 ");asm(" OR A3,B1,A3 ");asm(" STW A3,*A1 ");asm("PLLDELAY: ");asm(" [B0] B PLLDELAY ");asm(" SUB B0,1,B0 ");asm(" NOP 5 ");asm(" ");asm(" MVKL DIV_ENABLE+0,B1 "); asm(" MVKH DIV_ENABLE+0,B1 "); asm(" MVKL PLL_DIV0,A0 ");asm(" MVKH PLL_DIV0,A0 ");asm(" STW B1,*A0 ");asm(" MVKL _PLL_M_CU,B1 ");asm(" MVKH _PLL_M_CU,B1 ");asm(" LDW *B1,B2 ");asm(" MVKL PLL_M,A0 ");asm(" MVKH PLL_M,A0 ");asm(" NOP 2 ");asm(" STW B2,*A0 ");asm(" ");asm(" LDW *A1,A2 ");asm(" MVKL PLL_CMD,A0 ");asm(" MVKH PLL_CMD,A0 ");asm(" STW B1,*A0 ");asm(" MVKL ~CSR_PLLRST,B1 ");asm(" MVKH ~CSR_PLLRST,B1 ");asm(" AND B1,A2,B1 ");asm(" STW B1,*A1 ");asm(" MVKL PLL_RST_RELEASE_TO,B0 ");asm(" MVKH PLL_RST_RELEASE_TO,B0 ");asm("RESETDELAY: ");asm(" [B0] B RESETDELAY ");asm(" SUB B0,1,B0 ");asm(" NOP 5 ");asm(" ");asm(" MVKL CSR_PLLEN,B2 ");asm(" MVKH CSR_PLLEN,B2 ");asm(" OR B2,B1,B1 ");asm(" STW B1,*A1 ");asm(" ");asm(" MVKL EMIF_REG_START,A0 ");asm(" MVKH EMIF_REG_START,A0 ");asm(" MVKL _EMIF_SDTIMR_CU,B0 ");asm(" MVKH _EMIF_SDTIMR_CU,B0 ");asm(" LDW *B0,B1 ");asm(" NOP 4 ");asm(" STW B1,*+A0[EMIF_SDTIMR>>2] ");asm(" MVKL EMIF_SDSRETR_PU,B0 ");asm(" MVKH EMIF_SDSRETR_PU,B0 ");asm(" STW B0,*+A0[EMIF_SDSRETR>>2] ");asm(" MVKL EMIF_SDRCR_PU,B0 ");asm(" MVKH EMIF_SDRCR_PU,B0 ");asm(" STW B0,*+A0[EMIF_SDRCR>>2] ");asm(" MVKL _EMIF_SDCR_CU,B0 ");asm(" MVKH _EMIF_SDCR_CU,B0 ");asm(" LDW *B0,B1 ");asm(" NOP 4 ");asm(" STW B1,*+A0[EMIF_SDCR>>2] ");asm(" MVKL _EMIF_A1CR_CU,B0 ");asm(" MVKH _EMIF_A1CR_CU,B0 ");asm(" LDW *B0,B1 ");asm(" NOP 4 ");asm(" STW B1,*+A0[EMIF_A1CR>>2] ");asm(" ");asm(" MVKL CFGPIN1,A4 ");asm(" MVKH CFGPIN1,A4 ");asm(" MVKL CFGPIN1_NHCS, B3 ");asm(" MVKH CFGPIN1_NHCS, B3 ");

user5896786:

回复 Shine:

感谢回复!

user5896786:

回复 Tony Tang:

非常感谢,我认真研究一下

赞(0)
未经允许不得转载:TI中文支持网 » C6455的PLL初始化问题
分享到: 更多 (0)