本人在做DM3730裸机开发,现在的问题是Cortex-A8启动进入U-BOOT环境后,不知道如何让DSP运行。
我现在的流程是这样的:
1:DSP用ccs5.3编译一个LED灯程序(使用hello模板),按照https://blog.csdn.net/shichaog/article/details/45079037
2:u-boot环境下按照CCS里面GEL文件的方法初始化DSP
/* IVA DPLL does not produce a valid clock status when ForceActive (IVA) is applied */ /* Enable DSP-ss functional clock (set bit 0) CM_FCLKEN_IVA2 */ (*(int*)0x48004000) |= 0x1; /* Enable IVA2 DPLL (low power mode bybass -> 5) CM_CLKEN_PLL_IVA2 */ (*(int*)0x48004004) = (1<<4) | (5<<0); /* Enable DSP-ss functional clock (set bit 0) CM_FCLKEN_IVA2 */ (*(int*)0x48004000) |= 0x1; /* IVA clk is bypassed CORE clock/2 CM_CLKSEL1_PLL_IVA2 */ (*(int*)0x48004040) = (2<<19); /* Enable IVA2 DPLL (low power mode bybass -> 5) CM_CLKEN_PLL_IVA2 */ (*(int*)0x48004004) = (1<<4) | (5<<0); /* Release DSPMMU reset (clear bit 1) -> RM_RSTCTRL_IVA2 */ (*(int*)0x48306050) &= ~(1 << 1); /* Set DSP boot mode to WaitInDeadLoop -> CONTROL_IVA2_BOOTMODE */ (*(int*)0x48002404) = 2; /* Release DSP from reset (clear bit 0) -> RM_RSTCTRL_IVA2 */ (*(int*)0x48306050) &= ~(1 << 0);
3:将CCS生成的bin文件放在SD卡,通过ARM搬运到内存里面的固定地址(0x82c20000)
unsigned char *DSP_BOOT = (unsigned char(*)[6044])CFG_LOADADDR;
f_read(&file[DSP],(unsigned char*)DSP_BOOT,size,&br);//读取bin到DSP_BOOT缓存//
然后将该地址写入CONTROL_IVA2_BOOTADDR寄存器。
步骤2,3顺序调换也不行,请问2步骤初始化DSP之后会在CONTROL_IVA2_BOOTADDR存储的地址执行第一条指令?还是DSP初始化有问题?
里面
Chris Meng:
你好,
把下面这行代码在你设置完bootaddr后运行,试试?
/* Release DSP from reset (clear bit 0) -> RM_RSTCTRL_IVA2 */
(*(int*)0x48306050) &= ~(1 << 0);
fjinkunff finkunf:
回复 Chris Meng:
你好Chris Meng,谢谢你的回答,我尝试了一下还是启动不了,我用CCS运行DSP之后读取IVA2_BOOTADDR值为0,DM3730Technical Reference Manual 是这样说明的:
我将CONTROL_IVA2_BOOTMODE设置为0,DSP应该从CONTROL_IVA2_BOOTADDR储存的地址执行,CCS生成的bin文件可以放在此处地址让DSP直接运行吗?