diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-18 13:22:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-18 13:22:36 +0000 |
commit | fe368e772ce7195b9f751b78febc236527797fb5 (patch) | |
tree | 61aae4ce1f919d103611010ba615ec8952c85768 /nuttx/arch/avr/src/at90usb/at90usb_lowinit.c | |
parent | 8c6ebe6f07cb81ab197850c2af4c75fb50e5f1cb (diff) | |
download | px4-nuttx-fe368e772ce7195b9f751b78febc236527797fb5.tar.gz px4-nuttx-fe368e772ce7195b9f751b78febc236527797fb5.tar.bz2 px4-nuttx-fe368e772ce7195b9f751b78febc236527797fb5.zip |
Add logic to measure AVR stack usage
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3722 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/src/at90usb/at90usb_lowinit.c')
-rw-r--r-- | nuttx/arch/avr/src/at90usb/at90usb_lowinit.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/arch/avr/src/at90usb/at90usb_lowinit.c b/nuttx/arch/avr/src/at90usb/at90usb_lowinit.c index e446fcf13..f7a1b921e 100644 --- a/nuttx/arch/avr/src/at90usb/at90usb_lowinit.c +++ b/nuttx/arch/avr/src/at90usb/at90usb_lowinit.c @@ -101,9 +101,7 @@ static inline void up_wdtinit(void) { -#ifndef CONFIG_AVR_WDT - wdt_disable(); -#else +#ifdef CONFIG_AVR_WDT wdt_enable(WDTO_VALUE); #endif } @@ -124,14 +122,18 @@ static inline void up_wdtinit(void) void up_lowinit(void) { - /* Initialize the watchdog timer */ + /* Disable the watchdog timer */ - up_wdtinit(); + wdt_disable(); /* Set the system clock divider to 1 */ clock_prescale_set(clock_div_1); + /* Initialize the watchdog timer */ + + up_wdtinit(); + /* Initialize a console (probably a serial console) */ up_consoleinit(); |