diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-23 23:42:06 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-23 23:42:06 +0000 |
commit | f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec (patch) | |
tree | e30bfe07f49c7ee65a6fa4938c78cd4b51c47f89 /nuttx/configs | |
parent | 1656c2b76f95f552837acdb44290ac1b32e3b58e (diff) | |
download | px4-nuttx-f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec.tar.gz px4-nuttx-f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec.tar.bz2 px4-nuttx-f2354e6bf2bf123f996fe741b1fcea0ea9c6a4ec.zip |
A few NuTiny-SDK-NUC120 fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5667 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/nutiny-nuc120/README.txt | 60 | ||||
-rw-r--r-- | nuttx/configs/nutiny-nuc120/include/board.h | 8 | ||||
-rw-r--r-- | nuttx/configs/nutiny-nuc120/ostest/defconfig | 22 |
3 files changed, 62 insertions, 28 deletions
diff --git a/nuttx/configs/nutiny-nuc120/README.txt b/nuttx/configs/nutiny-nuc120/README.txt index ac43cbb6b..69cf3c2e0 100644 --- a/nuttx/configs/nutiny-nuc120/README.txt +++ b/nuttx/configs/nutiny-nuc120/README.txt @@ -95,19 +95,39 @@ LEDs Serial Console ============== -To be provided +By default UART1 is used as the serial console on these boards. NUC120LE3AN +is provided as an LQFP48 package and, for this case, the UART1 RX signal +(RXD1) is on PB.4, pin 8, and the TX signal (TXD1) is on PB.5, pin 9. +These pins are available on the NuTiny-SDC-NUC120 JP5. + + NOTE: The TX vs RX terminology is confusing. On my RS-232 driver board, + I need to connect the NUC120 TXD0 pin to the driver boards RXD pin. How + confusing! + +UART0 is an alternative that can be selected by modifying the default +configuation. UART0 RX (RXD0) is on PB.0, pin 17, and the TX signal (TXD0) +is on PB.1, pin 18. These pins are available on the NuTiny-SDC-NUC120 JP1. + + NOTE: PB.0, pin 17, is also used to control the user LED on board (labeled + "IO"). CONFIG_ARCH_LED should not be selected if UART0 is used. + +The NUC120LE3AN does not support UART2. Debugging ========= The NuTiny-SDK-NUC120 includes a built-in NuLink debugger. Unfortunately, full debug support is available only with the Keil and IAR toolchains. -There is, however, a free program call call ICP (In-Circuit Programmer). -It can be used to burn programs into FLASH (aka APROM). +There is, however, a free program called ICP (In-Circuit Programmer). It +can be used to burn programs into FLASH (aka APROM). The ICP program can also be used to burn an ISP program into LDROM. The ISP (In-System Programmer) is available free from the Nuvton website. +Then NuttX build does not set the configuration words at 0x0030000-0x00300004. +You should uncheck the Config box when burning APROM or the previous contents +of the configuration words will be erased. + NuTiny-specific Configuration Options ===================================== @@ -179,7 +199,9 @@ NuTiny-specific Configuration Options the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until the delay actually is 100 seconds. - Individual subsystems can be enabled: + Individual subsystems can be enabled as follows. These settings are for + all of the NUC100/120 line and may not be available for the NUC120LE3AN + in particular: AHB --- @@ -226,13 +248,14 @@ NuTiny-specific Configuration Options NUC1XX specific device driver settings - CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn (n=0,1,2) for the - console and ttys0 (default is the USART0). + CONFIG_UARTn_SERIAL_CONSOLE - Selects the UARTn (n=0,1,2) for the + console and ttys0. CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received. - This specific the size of the receive buffer + This specific the size of the receive buffer for UARTn. CONFIG_UARTn_TXBUFSIZE - Characters are buffered before being sent. This specific the size of the transmit buffer - CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be + for UARTn. + CONFIG_UARTn_BAUD - The configure BAUD of UARTn, CONFIG_UARTn_BITS - The number of bits. Must be 5, 6, 7, or 8. CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity CONFIG_UARTn_2STOP - Two stop bits @@ -277,12 +300,17 @@ Where <subdir> is one of the following: CONFIG_WINDOWS_CYGWIN=y : Using Cygwin CONFIG_ARMV6M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows + 3. Serial Console. The serial console is on UART1 which is available + on JP5: + + UART1 RX signal (RXD1) is on PB.4, pin 8, and + UART1 TX signal (TXD1) is on PB.5, pin 9. + nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. The - Configuration enables the serial interfaces on UART0. Support for - builtin applications is enabled, but in the base configuration no - builtin applications are selected (see NOTES below). + Configuration enables the serial interfaces on UART1. Support for + builtin applications is disabled. NOTES: @@ -303,7 +331,13 @@ Where <subdir> is one of the following: CONFIG_WINDOWS_CYGWIN=y : Using Cygwin CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows - 3. This configuration includes USB Support (CDC/ACM device) + 3. Serial Console. The serial console is on UART1 which is available + on JP5: + + UART1 RX signal (RXD1) is on PB.4, pin 8, and + UART1 TX signal (TXD1) is on PB.5, pin 9. + + 4. This configuration includes USB Support (CDC/ACM device) CONFIG_STM32_USB=y : STM32 USB device support CONFIG_USBDEV=y : USB device support must be enabled @@ -311,7 +345,7 @@ Where <subdir> is one of the following: CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled CONFIG_NSH_ARCHINIT=y : To perform USB initialization - The CDC/ACM example is included as two NSH "built-in" commands.\ + The CDC/ACM example is included as two NSH "built-in" commands. CONFIG_EXAMPLES_CDCACM=y : Enable apps/examples/cdcacm diff --git a/nuttx/configs/nutiny-nuc120/include/board.h b/nuttx/configs/nutiny-nuc120/include/board.h index 14842db86..47b43c044 100644 --- a/nuttx/configs/nutiny-nuc120/include/board.h +++ b/nuttx/configs/nutiny-nuc120/include/board.h @@ -85,13 +85,13 @@ /* HCLK. FOUT is the HCLK source clock. */ -#define BOARD_HCLK_N 0 -#define BOARD_HCLK_FREQUENCY (BOARD_PLL_FOUT / (BOARD_HCLK_N + 1)) +#define BOARD_HCLK_N 1 +#define BOARD_HCLK_FREQUENCY (BOARD_PLL_FOUT / BOARD_HCLK_N) /* USB. FOUT is the source. The USB CLK must be 48MHz */ -#define BOARD_USB_N 0 -#define BOARD_USB_FREQUENCY (BOARD_PLL_FOUT / (BOARD_USB_N + 1)) +#define BOARD_USB_N 1 +#define BOARD_USB_FREQUENCY (BOARD_PLL_FOUT / BOARD_USB_N) /* LED definitions ******************************************************************/ /* The NuTiny has a single green LED that can be controlled from sofware. This LED diff --git a/nuttx/configs/nutiny-nuc120/ostest/defconfig b/nuttx/configs/nutiny-nuc120/ostest/defconfig index 1c068001d..81d3f3eec 100644 --- a/nuttx/configs/nutiny-nuc120/ostest/defconfig +++ b/nuttx/configs/nutiny-nuc120/ostest/defconfig @@ -156,8 +156,8 @@ CONFIG_ARCH_NUC_MEDIUMDENSITY=y # CONFIG_NUC_PWM5 is not set # CONFIG_NUC_PWM6 is not set # CONFIG_NUC_PWM7 is not set -CONFIG_NUC_UART0=y -# CONFIG_NUC_UART1 is not set +# CONFIG_NUC_UART0 is not set +CONFIG_NUC_UART1=y # CONFIG_NUC_USBD is not set # CONFIG_NUC_ACMP is not set # CONFIG_NUC_ADC is not set @@ -311,20 +311,20 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y +CONFIG_ARCH_HAVE_UART1=y CONFIG_MCU_SERIAL=y -CONFIG_UART0_SERIAL_CONSOLE=y +CONFIG_UART1_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set # -# UART0 Configuration +# UART1 Configuration # -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART0_BAUD=115200 -CONFIG_UART0_BITS=8 -CONFIG_UART0_PARITY=0 -CONFIG_UART0_2STOP=0 +CONFIG_UART1_RXBUFSIZE=256 +CONFIG_UART1_TXBUFSIZE=256 +CONFIG_UART1_BAUD=115200 +CONFIG_UART1_BITS=8 +CONFIG_UART1_PARITY=0 +CONFIG_UART1_2STOP=0 # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_WIRELESS is not set |