diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-10-31 18:03:48 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-10-31 18:03:48 +0000 |
commit | fc3b607dbf64112c22e64a6230c0c8043f7031f1 (patch) | |
tree | 6974675e2ce0c703e669f758a9b23fe12c26cbbf /nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c | |
parent | d4f68df6c899491fe189a1761cb247cbcc3b45da (diff) | |
download | px4-nuttx-fc3b607dbf64112c22e64a6230c0c8043f7031f1.tar.gz px4-nuttx-fc3b607dbf64112c22e64a6230c0c8043f7031f1.tar.bz2 px4-nuttx-fc3b607dbf64112c22e64a6230c0c8043f7031f1.zip |
comments
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3067 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c')
-rw-r--r-- | nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c index f8738d39e..9e1b2747b 100644 --- a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c +++ b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c @@ -48,6 +48,7 @@ #include "chip.h" #include "at32uc3_internal.h" +#include "at32uc3_pm.h" #include "at32uc3_rtc.h" /**************************************************************************** @@ -160,6 +161,18 @@ int up_timerisr(int irq, uint32_t *regs) void up_timerinit(void) { 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 */ |