int main()
{
SetSysClock( CLK_SOURCE_PLL_60MHz );
GPIOA_ModeCfg(GPIO_Pin_All,GPIO_ModeIN_Floa
ting);
GPIOB_ModeCfg(GPIO_Pin_All,GPIO_ModeIN_Floating);
#ifdef DEBUG
GPIOA_SetBits( bTXD1 );
GPIOA_ModeCfg( bTXD1, GPIO_ModeOut_PP_5mA );
UART1_DefInit( );
GPIOB_ModeCfg( GPIO_Pin_15, GPIO_ModeOut_PP_5mA );
#endif
PRINT("start.n");
{
PRINT("%sn",VER_LIB);
}
PRINT("R8_GLOB_RESET_KEEP:%dn",R8_GLOB_RESET_KEEP);
if(R8_GLOB_RESET_KEEP == 0){
SYS_ResetKeepBuf(1);
GPIOB_SetBits( GPIO_Pin_15 );
}else{
SYS_ResetKeepBuf(0);
GPIOB_ResetBits( GPIO_Pin_15 );
}
/*CH57X_BLEInit( );
RF_RoleInit( );
rf_init();
while(1){
DelayMs( 200 );
RF_Tx( TX_DATA,TX_DATA_SIZE, 0x02, 0xFF );
}*/
PRINT( "shut down mode sleep n" );
RTC_TMRFunCfg(Period_4_S);
PWR_PeriphWakeUpCfg( ENABLE, RB_SLP_RTC_WAKE, Edge_ShortDelay );
DelayMs( 2 );
LowPower_Shutdown( 0 ); //全部断电,唤醒后复位
return 0;
}
R8_GLOB_RESET_KEEP无效一直是0