您好,欢迎来到61ic! | [登录] [注册] 忘记密码 | 设为首页 帮助
 . 网站首页 . 业界新闻 . 设计中心 . 移动技术 . TI专栏 . ADI专栏 . FPGA专栏 . 代码工厂 . 官方商城 . 
 . 活动专区 . 新品快递 . 解决方案 . 前沿科技 . TI资源 . ADI资源 . FPGA资源 . 下载中心 . 产品展示 . 
加入收藏
付款方式
联系我们
您现在的位置: 61IC电子在线 >> TI专栏 >> TI C6000 >> TMS320C674x DSP >> 正文
  evmc6748_bootloader研究           ★★★ 【字体:
evmc6748_bootloader研究
作者:forest_w…    文章来源:forest_world    点击数:    更新时间:2014-10-17    

evmc6748_bootloader研究

/* Configures PLL andDDR controller*/

void BL_PLATFORM_Config(void)

{

/* Unlock kickregisters (necessary on C6748) */

0x01C14038

    HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_KICK0R) =SYSCFG_KICK0R_UNLOCK;

0x01C1403C

   HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_KICK1R) = SYSCFG_KICK1R_UNLOCK;


0x01C14170

   HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_SUSPSRC) &=

SYSCFG_SUSPSRC_I2C0SRC |

SYSCFG_SUSPSRC_UART2SRC |

SYSCFG_SUSPSRC_SPI1SRC|

SYSCFG_SUSPSRC_TIMER64P_0SRC;

……

}


 


/** \brief Baseaddress of DEV memory mapped registers                        */

#define  SOC_SYSCFG_0_REGS        (0x01C14000)

#define  SYSCFG0_KICK0R          (0x38)

/* Unlock/Lock codefor KICK0 */

#define  SYSCFG_KICK0R_UNLOCK     (0x83E70B13u)

 


#define SYSCFG0_KICK1R      (0x3C)

/* Unlock/Lock codefor KICK1 */

#define  SYSCFG_KICK1R_UNLOCK    (0x95A4F1E0u)

 

#define SYSCFG0_SUSPSRC     (0x170)

 

 

 

#defineSYSCFG_SUSPSRC_I2C0SRC        (0x00010000u)

#defineSYSCFG_SUSPSRC_UART2SRC       (0x00100000u)

#defineSYSCFG_SUSPSRC_SPI1SRC        (0x00400000u)

#defineSYSCFG_SUSPSRC_TIMER64P_0SRC (0x08000000u)

 

TMS320C6748 DSP System

 

10.5.4 Kick Registers(KICK0R-KICK1R)

TheSYSCFG module has a protection mechanism to prevent any spurious writes fromchanging any of the modules memory-mapped registers. At power-on reset, none of  the SYSCFG module registersare writeable (they are readable). To allow writing to the registers in themodule, it is required to“unlock” the registers by writing to two memory-mapped registers in the SYSCFGmodule, Kick0 and Kick1, with exact data values. Once these values arewritten, then all the registers in the SYSCFG module that are writeable can bewritten to. See Section 10.2.2 for the exact key values and sequence of steps. Writing any other data value toeither of these kick registers will cause the memory mapped registers to be “locked”again and block out any write accesses to registers in the SYSCFGmodule.


// Macros for hardwareaccess, both direct and via the bit-band region.

//************************************************************

#define  HWREG(x)                                                          (*(   (volatile unsigned  int *)(x)  ))


 

3.1 BootModes

This devicesupports a variety of boot modes through an  internal DSP ROM bootloader. This device does notsupport dedicated hardware boot modes; therefore, all boot modes utilize the internal DSP ROM. The input states of theBOOT pins are sampled and latched into the BOOTCFG register, which ispart of the system configuration (SYSCFG) module, when device reset is deasserted.Boot mode selection is determined by the values of the BOOT pins.

See Usingthe TMS320C6748/C6746/C6742 Bootloader (SPRAAT2) for more details on the ROM Boot

Loader.

Thefollowing boot modes are supported:

• NAND Flashboot

– 8-bit NAND

– 16-bit NAND(supported on ROM revisions after d800k002 -- see the bootloader documents

mentioned above to determine the ROM revision)

• NOR Flashboot

– NOR Directboot (8-bit or 16-bit)

– NOR Legacy boot(8-bit or 16-bit)

– NOR AIS boot(8-bit or 16-bit)

• HPI Boot

• I2C0/I2C1Boot

– EEPROM(Master Mode)

– ExternalHost (Slave Mode)

• SPI0/SPI1Boot

– Serial Flash(Master Mode)

– SERIALEEPROM (Master Mode)

– ExternalHost (Slave Mode)

• UART0/UART1/UART2Boot

– ExternalHost

• MMC/SD0 Boot

 

TMS320C674x/OMAP-L1xProcessor Real-Time Clock (RTC)User's Guide


/*

 * \brief This function is used to initializeand configure NAND.

*/

void  BL_PLATFORM_NANDSetup(void)

{

    /* Pin mux and clock setting */

    EMIFAClkConfig();

    NANDPinMuxSetup();

}

/**

 * \brief  This function enables the EMIF modules and clocks on the SoC.

*/

void  EMIFAClkConfig(void)

{

    /* Power on the EMIFA */

    PSCModuleControl(SOC_PSC_0_REGS, HW_PSC_EMIFA, PSC_POWERDOMAIN_ALWAYS_ON,

                        PSC_MDCTL_NEXT_ENABLE);   

}

/**

 * \brief   This function sets therequested module in the required state

* \param    baseAdd         Memory address ofthe PSC instance used.

 * \param    moduleId        The module numberof the module to be commanded.

 * \param    powerDomain     The power domainof the module to be commanded.

 * \param    flags           This contains theflags that is a logical OR of the commands that can be given to a module.

* \return                    0 in case of successfultransition, -1 otherwise.         

 */

 

int  PSCModuleControl(unsigned int baseAdd, unsigned int moduleId,

                         unsignedint powerDomain, unsigned int flags)

{

文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章: 没有了
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    没有相关文章
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    站长:61 湘ICP备13001086号-2