int main() 还有我这样配置 芯片上电eeprom读取对吗?有影响吗
{
unsigned int i;
unsigned int j;
/* Initialize at begining */
/* Initialize all register setting*/
delay_ms(10);
SYS_Init();
// SYS_UnlockReg();
SYS_LockReg();
EADC_Init();
PGA_Init();
GPIO_Init();
ECAP_Init();
Timer0_Init();
Timer1_Init();
EPWM_Init();
USCI_UART_Open(USCI1, 9600);
RXD_set();
Motor_Start();
u8_StopMotor_Flag=1;
SYS_UnlockReg();
FMC_Open();
first_set_Flag=FMC_Read(first_base);
if(first_set_Flag==0x19)
{
set_xiansudu=FMC_Read(sudu_base);
}
FMC_Close();
WDT_Open(WDT_TIMEOUT_2POW14, 0, TRUE, FALSE);
SYS_LockReg();
set_para();//设置参数
Motor_Start();
get_shijichangdu(666666);
TM1668_Init(size[mishu[0]],size[mishu[1]],size[mishu[2]],size[mishu[3]],size[mishu[4]],size[mishu[5]],0x01);//显示实际长度
NVIC_Configuration(); |