From b52a1d3fdeea4d592feb57f0deabe0c5f012e729 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 May 2013 11:25:30 -0600 Subject: Fix STM32L15X vector definitions; Fix STM32L-Discovery LED controls. The NSH configuration is now fully functional on the STM32L-Discovery board. --- nuttx/configs/open1788/README.txt | 79 ++++++++++++---------- nuttx/configs/stm32ldiscovery/README.txt | 4 +- nuttx/configs/stm32ldiscovery/include/board.h | 18 ++--- nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c | 9 ++- 4 files changed, 60 insertions(+), 50 deletions(-) (limited to 'nuttx/configs') diff --git a/nuttx/configs/open1788/README.txt b/nuttx/configs/open1788/README.txt index d10931224..6f79ab34d 100644 --- a/nuttx/configs/open1788/README.txt +++ b/nuttx/configs/open1788/README.txt @@ -518,50 +518,57 @@ CONFIGURATION 0xa000:0000 (CS0). 6. This configuration has been used for verifying the touchscreen on - on the 4.3" LCD module by modifying the configuration in the - following ways: - - Drivers: - CONFIG_INPUT=y : Enable support for input devices - 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 - - System Type: - CONFIG_GPIO_IRQ=y : GPIO interrupt support - CONFIG_LPC17_SSP1=y : Enable support for SSP1 + on the 4.3" LCD module. + + a) As of this writing, this touchscreen is still not function. + Rommel Marcelo has tracked this problem done to noise on the + PENIRQ interrupt. There are so many false interrupts that + the NuttX interrupt-driven touchscreen driver cannot be used. + + b) You can enable the touchscreen by modifying the configuration + in the following ways: + + Drivers: + CONFIG_INPUT=y : Enable support for input devices + 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 + + System Type: + CONFIG_GPIO_IRQ=y : GPIO interrupt support + CONFIG_LPC17_SSP1=y : Enable support for SSP1 - Applicaton Configuration: - CONFIG_EXAMPLES_TOUCHSCREEN=y : Enable the touchscreen built-int test - CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y + Applicaton Configuration: + CONFIG_EXAMPLES_TOUCHSCREEN=y : Enable the touchscreen built-int test + CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y - Defaults should be okay for related touchscreen settings. + Defaults should be okay for related touchscreen settings. - You will also have to disable SD card support to use this test. The - SD card detect (CD) signal is on P0[13]. This signal is shared. It - is also used for MOSI1 and USB_UP_LED. The CD pin may be disconnected. - 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. + c) You will also have to disable SD card support to use this test. The + SD card detect (CD) signal is on P0[13]. This signal is shared. It + is also used for MOSI1 and USB_UP_LED. The CD pin may be disconnected. + 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: - CONFIG_MMCSD=n : No MMC/SD driver support + Drivers: + CONFIG_MMCSD=n : No MMC/SD driver support - 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 + 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 - File Systems: - CONFIG_FS_FAT=n : No FAT file system support + File Systems: + CONFIG_FS_FAT=n : No FAT file system support - For touchscreen debug output: + For touchscreen debug output: - Build Setup: - CONFIG_DEBUG=y - CONFIG_DEBUG_VERBOSE=y - CONFIG_DEBUG_INPUT=y + 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 the following options. See apps/examples/README.txt for further diff --git a/nuttx/configs/stm32ldiscovery/README.txt b/nuttx/configs/stm32ldiscovery/README.txt index 860e220b1..55d95dfb7 100644 --- a/nuttx/configs/stm32ldiscovery/README.txt +++ b/nuttx/configs/stm32ldiscovery/README.txt @@ -15,8 +15,8 @@ Both boards feature: - LCD (24 segments, 4 commons), - LEDs, - Pushbuttons, - - A linear touch sensor, and - - four touchkeys. + - A linear touch sensor, and + - Four touchkeys. Contents ======== diff --git a/nuttx/configs/stm32ldiscovery/include/board.h b/nuttx/configs/stm32ldiscovery/include/board.h index 83edb182c..23132c38b 100644 --- a/nuttx/configs/stm32ldiscovery/include/board.h +++ b/nuttx/configs/stm32ldiscovery/include/board.h @@ -195,7 +195,7 @@ * STM32L-Discovery. The following definitions describe how NuttX controls the LEDs: * * SYMBOL Meaning LED state - * LED3 LED4 + * LED1 LED2 * ------------------- ----------------------- -------- -------- * LED_STARTED NuttX has been started OFF OFF * LED_HEAPALLOCATE Heap has been allocated OFF OFF @@ -253,25 +253,25 @@ #if !defined(CONFIG_STM32_LCD) /* Select PA9 and PA10 if the LCD is not enabled */ -# define GPIO_USART1_RX GPIO_USART1_RX_1 -# define GPIO_USART1_TX GPIO_USART1_TX_1 +# define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */ +# define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */ /* This there are no other options for USART1 on this part */ -# define GPIO_USART2_RX GPIO_USART2_RX_1 -# define GPIO_USART2_TX GPIO_USART2_TX_1 +# define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */ +# define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */ /* Arbirtrarily select PB10 and PB11 */ -# define GPIO_USART3_RX GPIO_USART3_RX_1 -# define GPIO_USART3_TX GPIO_USART3_TX_1 +# define GPIO_USART3_RX GPIO_USART3_RX_1 /* PB11 */ +# define GPIO_USART3_TX GPIO_USART3_TX_1 /* PB10 */ #elif !defined(CONFIG_ARCH_LEDS) /* Select PB6 and PB7 if the LEDs are not enabled */ -# define GPIO_USART1_RX GPIO_USART1_RX_2 -# define GPIO_USART1_TX GPIO_USART1_TX_2 +# define GPIO_USART1_RX GPIO_USART1_RX_2 /* PB7 */ +# define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */ #endif diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c index 5a113eabc..b03a61266 100644 --- a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c +++ b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c @@ -60,7 +60,7 @@ * controls the LEDs: * * SYMBOL Meaning LED state - * LED3 LED4 + * LED1 LED2 * ------------------- ----------------------- -------- -------- * LED_STARTED NuttX has been started OFF OFF * LED_HEAPALLOCATE Heap has been allocated OFF OFF @@ -146,8 +146,11 @@ void up_ledon(int led) void up_ledoff(int led) { - stm32_gpiowrite(GPIO_LED1, false); - stm32_gpiowrite(GPIO_LED2, false); + if (led != 2) + { + stm32_gpiowrite(GPIO_LED1, false); + stm32_gpiowrite(GPIO_LED2, false); + } } #endif /* CONFIG_ARCH_LEDS */ -- cgit v1.2.3