summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-10-31 15:56:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-10-31 15:56:47 +0000
commitd340df87111d2c9ba81ec5c9773d481896717c51 (patch)
treecc108921483fee650812c9e74b6cceccce7b7abd /nuttx
parent5592312904f37b7b08aa9e7be0bf19be4fc93d07 (diff)
downloadpx4-nuttx-d340df87111d2c9ba81ec5c9773d481896717c51.tar.gz
px4-nuttx-d340df87111d2c9ba81ec5c9773d481896717c51.tar.bz2
px4-nuttx-d340df87111d2c9ba81ec5c9773d481896717c51.zip
Fix heap allocation and RTC not-busy wait
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3065 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c2
-rw-r--r--nuttx/arch/avr/src/common/up_allocateheap.c7
-rwxr-xr-xnuttx/configs/avr32dev1/README.txt9
-rwxr-xr-xnuttx/configs/avr32dev1/ostest/defconfig2
4 files changed, 14 insertions, 6 deletions
diff --git a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c
index 7630f03d0..f8738d39e 100644
--- a/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c
+++ b/nuttx/arch/avr/src/at32uc3/at32uc3_timerisr.c
@@ -119,7 +119,7 @@
static void rtc_waitnotbusy(void)
{
- while ((getreg32(AVR32_RTC_CTRL) & RTC_CTRL_BUSY) == 0);
+ while ((getreg32(AVR32_RTC_CTRL) & RTC_CTRL_BUSY) != 0);
}
/****************************************************************************
diff --git a/nuttx/arch/avr/src/common/up_allocateheap.c b/nuttx/arch/avr/src/common/up_allocateheap.c
index 62be64338..675352d5e 100644
--- a/nuttx/arch/avr/src/common/up_allocateheap.c
+++ b/nuttx/arch/avr/src/common/up_allocateheap.c
@@ -68,10 +68,9 @@
* Name: up_allocate_heap
*
* Description:
- * The heap may be statically allocated by
- * defining CONFIG_HEAP_BASE and CONFIG_HEAP_SIZE. If these
- * are not defined, then this function will be called to
- * dynamically set aside the heap region.
+ * The heap may be statically allocated by defining CONFIG_HEAP_BASE and
+ * CONFIG_HEAP_SIZE. If these are not defined, then this function will be
+ * called to dynamically set aside the heap region.
*
****************************************************************************/
diff --git a/nuttx/configs/avr32dev1/README.txt b/nuttx/configs/avr32dev1/README.txt
index dfe21a20e..341a7a69f 100755
--- a/nuttx/configs/avr32dev1/README.txt
+++ b/nuttx/configs/avr32dev1/README.txt
@@ -19,6 +19,7 @@ Contents
- Link Address
- Entering the ISP
- BatchISP
+ * Reset
* AVR32DEV1 Configuration Options
* Configurations
@@ -279,6 +280,14 @@ AVR32 Bootloader
"For further details about BatchISP commands, launch batchisp -h or see the
help files installed with FLIP ..."
+Reset
+^^^^^
+
+ The AVR32DEV1 reset button is not useful for restarting the program. It
+ seems that, after the reset, the RTC is left is a bad state and is constantly
+ busy (this might be the fault of the bootloader???). There does not seem
+ to be any way around this except for power cycling the board.
+
AVR32DEV1 Configuration Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig
index 26dd3ff00..b67e7a307 100755
--- a/nuttx/configs/avr32dev1/ostest/defconfig
+++ b/nuttx/configs/avr32dev1/ostest/defconfig
@@ -82,7 +82,7 @@ CONFIG_ARCH_BOARD=avr32dev1
CONFIG_ARCH_BOARD_AVR32DEV1=y
CONFIG_BOARD_LOOPSPERMSEC=1140
CONFIG_DRAM_SIZE=(32*1024)
-CONFIG_DRAM_START=0x10000000
+CONFIG_DRAM_START=0x00000000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_NOINTC=y
CONFIG_ARCH_IRQPRIO=y