使用blinky_dc的例子可以断电后启动CPU2,但是用自己的程序就是不行,实在是找不到原因了,看过之前的帖子,还是找不到原因
CPU1部分初始化程序如下
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
InitSysCtrl();
#ifdef STANDALONE
#ifdef FLASH
// Send boot command to allow the CPU2 application to begin execution
IPCBootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH);
#else
// Send boot command to allow the CPU2 application to begin execution
IPCBootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_RAM);
#endif
#endif
#ifdef FLASH
InitFlash();
#endif
2 CPU2初始化程序如下
void main(void)
{
volatile int16 temp;
#ifdef FLASH
// Copy time critical code and Flash setup code to RAM
// The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
// symbols are created by the linker. Refer to the linker files.
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);
#endif
// Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the F28M3Xx_SysCtrl.c file.
InitSysCtrl();
// Only used if running from FLASH
// Note that the variable FLASH is defined by the compiler
#ifdef FLASH
// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
InitFlash(); // Call the flash wrapper init function
#endif //(FLASH)
// Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;
Eric Ma:
Eric:
CPU1 能不能跑起来先。
codestart.asm代码里面WD DISABLE set 1.
WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0
.ref _c_int00 .global code_start