git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3067 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-10-31 18:03:48 +00:00
parent d3dbe55c2b
commit 5da57dab15
1 changed files with 13 additions and 0 deletions

View File

@ -48,6 +48,7 @@
#include "chip.h" #include "chip.h"
#include "at32uc3_internal.h" #include "at32uc3_internal.h"
#include "at32uc3_pm.h"
#include "at32uc3_rtc.h" #include "at32uc3_rtc.h"
/**************************************************************************** /****************************************************************************
@ -160,6 +161,18 @@ int up_timerisr(int irq, uint32_t *regs)
void up_timerinit(void) void up_timerinit(void)
{ {
uint32_t regval; uint32_t regval;
/* Enable clocking: "The clock for the RTC bus interface (CLK_RTC) is generated
* by the Power Manager. This clock is enabled at reset, and can be disabled
* in the Power Manager. It is recommended to disable the RTC before disabling
* the clock, to avoid freezing the RTC in an undefined state.
*/
#if 0
regval = getreg32(AVR32_PM_PBAMASK);
regval |= PM_PBAMASK_PMRTCEIC;
putreg32(regval, AVR32_PM_PBAMASK);
#endif
/* Configure the RTC. Source == 32KHz OSC32 */ /* Configure the RTC. Source == 32KHz OSC32 */