embeded/Cortex-M3 Ti2016. 4. 14. 13:51

아.. 이래서 시간이 초기화가 안된거였나..





unsigned long ulStatus;

unsigned long ulNVData[64];

//

// Need to enable the hibernation peripheral before using it.

//

SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);

//

// Enable clocking to the Hibernation module.

//

HibernateEnableExpClk(SysCtlClockGet());

//

// User-implemented delay here to allow crystal to power up and stabilize.

//

//

// Configure the clock source for Hibernation module, and enable the RTC

// feature. This configuration is for a 4.194304 MHz crystal.

//

HibernateClockSelect(HIBERNATE_CLOCK_SEL_DIV128);

HibernateRTCEnable();

//

// Set the RTC to 0, or an initial value. The RTC can be set once when the

// system is initialized after the cold-startup, and then left to run. Or

// it can be initialized before every hibernate.

//

HibernateRTCSet(0);

//

// Set the match 0 register for 30 seconds from now.

//

HibernateRTCMatch0Set(HibernateRTCGet() + 30);

//

// Clear any pending status.

//

ulStatus = HibernateIntStatus(0);

HibernateIntClear(ulStatus);

//

// Save the program state information. The state information will be

// stored in the ulNVData[] array. It is not necessary to save the full 64

// words of data, only as much as is actually needed by the program.

//

HibernateDataSet(ulNVData, 64);

//

// Configure to wake on RTC match.

//

HibernateWakeSet(HIBERNATE_WAKE_RTC);

//

// Request hibernation. The following call may return since it takes a

// finite amount of time for power to be removed.

//

HibernateRequest(); 


'embeded > Cortex-M3 Ti' 카테고리의 다른 글

keil uvision에서 colink-ex 연동하기  (0) 2016.09.02
ekc-lm3s811 를 ICDI로 사용하기  (0) 2016.08.27
cortex-m3 인터럽트 관련 조사  (0) 2016.02.18
uart tx interrupt  (0) 2015.12.18
coflash 구조 및 에러 메시지..  (0) 2015.12.11
Posted by 구차니