From 460aa61b1bd830809068ec2df29302575c126926 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 30 Jun 2014 08:25:16 -0600 Subject: [PATCH] SAM4S Xplained Pro: Correct description of LEDs and usage. From Kosma Moczek --- configs/sam4s-xplained-pro/README.txt | 53 ++++++++++--------- configs/sam4s-xplained-pro/include/board.h | 4 +- .../src/sam4s-xplained-pro.h | 43 +++++++-------- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/configs/sam4s-xplained-pro/README.txt b/configs/sam4s-xplained-pro/README.txt index 1f367c806b..2a873b546e 100644 --- a/configs/sam4s-xplained-pro/README.txt +++ b/configs/sam4s-xplained-pro/README.txt @@ -14,7 +14,7 @@ README - IS66WV51216DBLL ISSI SRAM 8Mb 512K x 16 55ns PSRAM 2.5v-3.6v - Four Atmel QTouch buttons - External voltage input - - Four LEDs, two controllable from software + - Two LEDs, one controllable from software - Xplained expansion headers - Footprint for external serial Flash (not fitted) @@ -288,37 +288,40 @@ Buttons and LEDs LEDs ---- - - There are four LEDs on board the SAM4X Xplained board, two of these can be +======================= + There is one LED on board the SAM4S Xplained board Pro that can be controlled by software in the SAM4S: - LED GPIO - ---------------- ----- - D9 Yellow LED PC10 - D10 Yellow LED PC17 + LED GPIO + ---------------- ----- + LED0 Yellow LED PC23 - Both can be illuminated by driving the GPIO output to ground (low). + It can be illuminated by driving the GPIO output to ground (low). - These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is + If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on + board the SAM4S Xplained Pro, otherwise it can controlled by the user + with functions defined into boards file src/sam_userleds.c. + + The user LED is not used by the board port unless CONFIG_ARCH_LEDS is defined. In that case, the usage by the board port is defined in - include/board.h and src/sam_leds.c. The LEDs are used to encode OS-related - events as follows: + include/board.h and src/sam_leds.c. The LEDs are used to encode OS- + related events as follows: - SYMBOL Meaning LED state - D9 D10 - ------------------- ----------------------- -------- -------- - LED_STARTED NuttX has been started OFF OFF - LED_HEAPALLOCATE Heap has been allocated OFF OFF - LED_IRQSENABLED Interrupts enabled OFF OFF - LED_STACKCREATED Idle stack created ON OFF - LED_INIRQ In an interrupt No change - LED_SIGNAL In a signal handler No change - LED_ASSERTION An assertion failed No change - LED_PANIC The system has crashed OFF Blinking - LED_IDLE MCU is is sleep mode Not used + SYMBOL Meaning LED state + LED0 + ------------------- ----------------------- ----------- + LED_STARTED NuttX has been started OFF + LED_HEAPALLOCATE Heap has been allocated OFF + LED_IRQSENABLED Interrupts enabled OFF + LED_STACKCREATED Idle stack created ON + LED_INIRQ In an interrupt No change + LED_SIGNAL In a signal handler No change + LED_ASSERTION An assertion failed No change + LED_PANIC The system has crashed OFF + LED_IDLE MCU is is sleep mode Not used - Thus if D9 is statically on, NuttX has successfully booted and is, - apparently, running normmally. If D10 is flashing at approximately + Thus if LED0 is statically on, NuttX has successfully booted and is, + apparently, running normally. If LED0 is flashing at approximately 2Hz, then a fatal error has been detected and the system has halted. Serial Consoles diff --git a/configs/sam4s-xplained-pro/include/board.h b/configs/sam4s-xplained-pro/include/board.h index deb332b811..13ebfd37d1 100644 --- a/configs/sam4s-xplained-pro/include/board.h +++ b/configs/sam4s-xplained-pro/include/board.h @@ -197,7 +197,7 @@ * * LED GPIO * ---------------- ----- - * D301 Yellow LED PC10 + * D301 Yellow LED PC23 * * Both can be illuminated by driving the GPIO output to ground (low). */ @@ -233,7 +233,7 @@ #define LED_D301_ON false /* GPIO low for ON */ /* Thus if D301 is statically on, NuttX has successfully booted and is, - * apparently, running normmally. + * apparently, running normally. */ /* Button definitions ***************************************************************/ diff --git a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h index 88aaae719a..d3bc98b7a4 100644 --- a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h +++ b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h @@ -110,37 +110,34 @@ # undef HAVE_USBMONITOR #endif -/* There are four LEDs on board the SAM4S Xplained board, two of these can be +/* There is one LED on board the SAM4S Xplained board Pro that can be * controlled by software in the SAM4S: * * LED GPIO * ---------------- ----- - * D9 Yellow LED PC10 - * D10 Yellow LED PC17 + * LED0 Yellow LED PC23 * - * Both can be illuminated by driving the GPIO output to ground (low). + * It can be illuminated by driving the GPIO output to ground (low). * - * These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is - * defined. In that case, the usage by the board port is defined in - * include/board.h and src/up_leds.c. The LEDs are used to encode OS-related - * events as follows: + * If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on + * board the SAM4S Xplained Pro, otherwise it can controlled by the user + * with functions defined into boards file src/sam_userleds.c. * - * SYMBOL Meaning LED state - * D9 D10 - * ------------------- ----------------------- -------- -------- - * LED_STARTED NuttX has been started OFF OFF - * LED_HEAPALLOCATE Heap has been allocated OFF OFF - * LED_IRQSENABLED Interrupts enabled OFF OFF - * LED_STACKCREATED Idle stack created ON OFF - * LED_INIRQ In an interrupt No change - * LED_SIGNAL In a signal handler No change - * LED_ASSERTION An assertion failed No change - * LED_PANIC The system has crashed OFF Blinking - * LED_IDLE MCU is is sleep mode Not used + * The following definitions describe how NuttX + * controls the LEDs: * - * Thus if D9 is statically on, NuttX has successfully booted and is, - * apparently, running normally. If D10 is flashing at approximately - * 2Hz, then a fatal error has been detected and the system has halted. + * SYMBOL Meaning LED state + * LED0 + * ------------------- ----------------------- ----------- + * LED_STARTED NuttX has been started OFF + * LED_HEAPALLOCATE Heap has been allocated OFF + * LED_IRQSENABLED Interrupts enabled OFF + * LED_STACKCREATED Idle stack created ON + * LED_INIRQ In an interrupt No change + * LED_SIGNAL In a signal handler No change + * LED_ASSERTION An assertion failed No change + * LED_PANIC The system has crashed OFF + * LED_IDLE MCU is is sleep mode Not used */ #define GPIO_D301 (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \