编的程序如下 #include <stdio.h> #include <csl.h> #include <csl_pll.h> #include <csl_chip.h> Uint16 i = 0; Uint16 j = 0;
/* 通过定义宏来控制两个外围存储器映射的寄存器,从而实现对GPIO口的控制 */ #define GPIODIR (*(volatile ioport Uint16*)(0x3400)) #define GPIODATA (*(volatile ioport Uint16*)(0x3401)) void delay(void) { for(i=0;i<10000;i++) {;}; }
void main(void) { /* Initialize CSL library - This is REQUIRED !!! */ CSL_init();
/* PLL configuration structure used to set up PLL interface */ // 主频为300Mhz PLL_setFreq(1, 0xF, 0, 1, 3, 3, 0); /* Config GPIO7 in order to ignite led D5*/ GPIODIR = 0x80; // config the GPIO7 as output pin GPIODATA = 0x00; while(1) { delay(); GPIODATA = 0x80;/* 关闭指示灯D5 */ //CHIP_FSET(ST1_55,XF,0); delay(); GPIODATA = 0x00; delay(); } }
仿真时 Trouble Halt Target CPU: Error 0x00000024/-1153 Error during: Register,Execution,The memory at 0x00000000 continually indicated it was \'not ready\' All memory operations currenely in progress were aborted.In order to regain Control of the processor.This is considered a catastrophic event,but the debugger should still be able to access memory and CPU register.System state has been altered.It is strongly advised that theProcessor should be reset before resuming execution
怎么解决? 麻烦各位了
|