summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/src/at32uc3
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-11-02 12:32:32 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-11-02 12:32:32 +0000
commit57db2ed227b4e5102e72ed30337c9fbcea62fcf3 (patch)
treeeab670c31c2e2f4a54622632b7ee7af4a6b1740f /nuttx/arch/avr/src/at32uc3
parente1fc7cc6703067fa89811d71e8aa9a00482c631b (diff)
downloadpx4-nuttx-57db2ed227b4e5102e72ed30337c9fbcea62fcf3.tar.gz
px4-nuttx-57db2ed227b4e5102e72ed30337c9fbcea62fcf3.tar.bz2
px4-nuttx-57db2ed227b4e5102e72ed30337c9fbcea62fcf3.zip
Need to wait not busy in another place
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3070 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/src/at32uc3')
-rw-r--r--nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c
index d876e1067..655b312e7 100644
--- a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c
+++ b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c
@@ -203,7 +203,7 @@ void up_timerinit(void)
putreg32(regval, AVR32_PM_PBAMASK);
#endif
- /* Configure the RTC. Source == 32KHz OSC32 */
+ /* Configure the RTC. Source == 32KHz OSC32 or RC OSC */
rtc_waitnotbusy();
#ifdef AVR32_CLOCK_OSC32
@@ -217,8 +217,9 @@ void up_timerinit(void)
/* Set the counter value to zero and the TOP value to AVR32_TOP (see above) */
rtc_waitnotbusy();
- putreg32(0, AVR32_RTC_VAL);
putreg32(AV32_TOP, AVR32_RTC_TOP);
+ rtc_waitnotbusy();
+ putreg32(0, AVR32_RTC_VAL);
/* Attach the timer interrupt vector */