Fix STM32L15X vector definitions; Fix STM32L-Discovery LED controls. The NSH configuration is now fully functional on the STM32L-Discovery board.

This commit is contained in:
Gregory Nutt
2013-05-21 11:25:30 -06:00
parent d77d2a3325
commit dc09b4cd27
4 changed files with 58 additions and 48 deletions
+41 -34
View File
@@ -518,50 +518,57 @@ CONFIGURATION
0xa000:0000 (CS0). 0xa000:0000 (CS0).
6. This configuration has been used for verifying the touchscreen on 6. This configuration has been used for verifying the touchscreen on
on the 4.3" LCD module by modifying the configuration in the on the 4.3" LCD module.
following ways:
Drivers: a) As of this writing, this touchscreen is still not function.
CONFIG_INPUT=y : Enable support for input devices Rommel Marcelo has tracked this problem done to noise on the
CONFIG_INPUT_ADS7843E=y : Enable support for the XPT2048 PENIRQ interrupt. There are so many false interrupts that
CONFIG_ADS7843E_SPIDEV=1 : Use SSP1 for communication the NuttX interrupt-driven touchscreen driver cannot be used.
CONFIG_SPI=y : Enable SPI support
CONFIG_SPI_EXCHANGE=n : exchange() method is not supported
System Type: b) You can enable the touchscreen by modifying the configuration
CONFIG_GPIO_IRQ=y : GPIO interrupt support in the following ways:
CONFIG_LPC17_SSP1=y : Enable support for SSP1
Applicaton Configuration: Drivers:
CONFIG_EXAMPLES_TOUCHSCREEN=y : Enable the touchscreen built-int test CONFIG_INPUT=y : Enable support for input devices
CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y CONFIG_INPUT_ADS7843E=y : Enable support for the XPT2048
CONFIG_ADS7843E_SPIDEV=1 : Use SSP1 for communication
CONFIG_SPI=y : Enable SPI support
CONFIG_SPI_EXCHANGE=n : exchange() method is not supported
Defaults should be okay for related touchscreen settings. System Type:
CONFIG_GPIO_IRQ=y : GPIO interrupt support
CONFIG_LPC17_SSP1=y : Enable support for SSP1
You will also have to disable SD card support to use this test. The Applicaton Configuration:
SD card detect (CD) signal is on P0[13]. This signal is shared. It CONFIG_EXAMPLES_TOUCHSCREEN=y : Enable the touchscreen built-int test
is also used for MOSI1 and USB_UP_LED. The CD pin may be disconnected. CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
There is a jumper on board that enables the CD pin. OR, you can simply
remove the SD module so that it does not drive the CD pin.
Drivers: Defaults should be okay for related touchscreen settings.
CONFIG_MMCSD=n : No MMC/SD driver support
System Type: c) You will also have to disable SD card support to use this test. The
CONFIG_LPC17_GPDMA=n : No DMA SD card detect (CD) signal is on P0[13]. This signal is shared. It
CONFIG_LPC17_SDCARD=n : No SD card driver is also used for MOSI1 and USB_UP_LED. The CD pin may be disconnected.
CONFIG_SDIO_DMA=n : No SD card DMA There is a jumper on board that enables the CD pin. OR, you can simply
CONFIG_ARCH_DMA=n remove the SD module so that it does not drive the CD pin.
File Systems: Drivers:
CONFIG_FS_FAT=n : No FAT file system support CONFIG_MMCSD=n : No MMC/SD driver support
For touchscreen debug output: System Type:
CONFIG_LPC17_GPDMA=n : No DMA
CONFIG_LPC17_SDCARD=n : No SD card driver
CONFIG_SDIO_DMA=n : No SD card DMA
CONFIG_ARCH_DMA=n
Build Setup: File Systems:
CONFIG_DEBUG=y CONFIG_FS_FAT=n : No FAT file system support
CONFIG_DEBUG_VERBOSE=y
CONFIG_DEBUG_INPUT=y For touchscreen debug output:
Build Setup:
CONFIG_DEBUG=y
CONFIG_DEBUG_VERBOSE=y
CONFIG_DEBUG_INPUT=y
7. The button test (apps/examples/buttons) can be built-in by adding 7. The button test (apps/examples/buttons) can be built-in by adding
the following options. See apps/examples/README.txt for further the following options. See apps/examples/README.txt for further
+2 -2
View File
@@ -15,8 +15,8 @@ Both boards feature:
- LCD (24 segments, 4 commons), - LCD (24 segments, 4 commons),
- LEDs, - LEDs,
- Pushbuttons, - Pushbuttons,
- A linear touch sensor, and - A linear touch sensor, and
- four touchkeys. - Four touchkeys.
Contents Contents
======== ========
+9 -9
View File
@@ -195,7 +195,7 @@
* STM32L-Discovery. The following definitions describe how NuttX controls the LEDs: * STM32L-Discovery. The following definitions describe how NuttX controls the LEDs:
* *
* SYMBOL Meaning LED state * SYMBOL Meaning LED state
* LED3 LED4 * LED1 LED2
* ------------------- ----------------------- -------- -------- * ------------------- ----------------------- -------- --------
* LED_STARTED NuttX has been started OFF OFF * LED_STARTED NuttX has been started OFF OFF
* LED_HEAPALLOCATE Heap has been allocated OFF OFF * LED_HEAPALLOCATE Heap has been allocated OFF OFF
@@ -253,25 +253,25 @@
#if !defined(CONFIG_STM32_LCD) #if !defined(CONFIG_STM32_LCD)
/* Select PA9 and PA10 if the LCD is not enabled */ /* Select PA9 and PA10 if the LCD is not enabled */
# define GPIO_USART1_RX GPIO_USART1_RX_1 # define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */
# define GPIO_USART1_TX GPIO_USART1_TX_1 # define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */
/* This there are no other options for USART1 on this part */ /* This there are no other options for USART1 on this part */
# define GPIO_USART2_RX GPIO_USART2_RX_1 # define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */
# define GPIO_USART2_TX GPIO_USART2_TX_1 # define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */
/* Arbirtrarily select PB10 and PB11 */ /* Arbirtrarily select PB10 and PB11 */
# define GPIO_USART3_RX GPIO_USART3_RX_1 # define GPIO_USART3_RX GPIO_USART3_RX_1 /* PB11 */
# define GPIO_USART3_TX GPIO_USART3_TX_1 # define GPIO_USART3_TX GPIO_USART3_TX_1 /* PB10 */
#elif !defined(CONFIG_ARCH_LEDS) #elif !defined(CONFIG_ARCH_LEDS)
/* Select PB6 and PB7 if the LEDs are not enabled */ /* Select PB6 and PB7 if the LEDs are not enabled */
# define GPIO_USART1_RX GPIO_USART1_RX_2 # define GPIO_USART1_RX GPIO_USART1_RX_2 /* PB7 */
# define GPIO_USART1_TX GPIO_USART1_TX_2 # define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */
#endif #endif
+6 -3
View File
@@ -60,7 +60,7 @@
* controls the LEDs: * controls the LEDs:
* *
* SYMBOL Meaning LED state * SYMBOL Meaning LED state
* LED3 LED4 * LED1 LED2
* ------------------- ----------------------- -------- -------- * ------------------- ----------------------- -------- --------
* LED_STARTED NuttX has been started OFF OFF * LED_STARTED NuttX has been started OFF OFF
* LED_HEAPALLOCATE Heap has been allocated OFF OFF * LED_HEAPALLOCATE Heap has been allocated OFF OFF
@@ -146,8 +146,11 @@ void up_ledon(int led)
void up_ledoff(int led) void up_ledoff(int led)
{ {
stm32_gpiowrite(GPIO_LED1, false); if (led != 2)
stm32_gpiowrite(GPIO_LED2, false); {
stm32_gpiowrite(GPIO_LED1, false);
stm32_gpiowrite(GPIO_LED2, false);
}
} }
#endif /* CONFIG_ARCH_LEDS */ #endif /* CONFIG_ARCH_LEDS */