Fix some issues with LPC17xx UART2 and 3 configurations
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3498 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
c80fb6cbcf
commit
2f94570288
@ -324,7 +324,7 @@ void lpc17_lowsetup(void)
|
||||
putreg32(regval, LPC17_SYSCON_PCLKSEL0);
|
||||
|
||||
regval = getreg32(LPC17_SYSCON_PCLKSEL1);
|
||||
regval &= ~(SYSCON_PCLKSEL1_UART2_MASK|SYSCON_PCLKSEL1_UART3_SHIFT);
|
||||
regval &= ~(SYSCON_PCLKSEL1_UART2_MASK|SYSCON_PCLKSEL1_UART3_MASK);
|
||||
#if defined(CONFIG_UART2_SERIAL_CONSOLE)
|
||||
regval |= (CONSOLE_CCLKDIV << SYSCON_PCLKSEL1_UART2_SHIFT);
|
||||
#elif defined(CONFIG_UART3_SERIAL_CONSOLE)
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
#define BOARD_XTAL_FREQUENCY (12000000) /* XTAL oscillator frequency */
|
||||
#define BOARD_OSCCLK_FREQUENCY BOARD_XTAL_FREQUENCY /* Main oscillator frequency */
|
||||
#define BOARD_RTCCLK_FREQUENCY (32000) /* RTC oscillator frequency */
|
||||
#define BOARD_RTCCLK_FREQUENCY (32768) /* RTC oscillator frequency */
|
||||
#define BOARD_INTRCOSC_FREQUENCY (4000000) /* Internal RC oscillator frequency */
|
||||
|
||||
/* This is the clock setup we configure for:
|
||||
|
@ -52,7 +52,7 @@
|
||||
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
|
||||
# CONFIG_DRAM_START - The start address of DRAM (physical)
|
||||
# CONFIG_DRAM_END - Last address+1 of installed RAM
|
||||
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
|
||||
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
|
||||
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
|
||||
# stack. If defined, this symbol is the size of the interrupt
|
||||
# stack in bytes. If not defined, the user task stacks will be
|
||||
@ -64,7 +64,7 @@
|
||||
# CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
|
||||
# cause a 100 second delay during boot-up. This 100 second delay
|
||||
# serves no purpose other than it allows you to calibrate
|
||||
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
|
||||
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
|
||||
# the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until
|
||||
# the delay actually is 100 seconds.
|
||||
# CONFIG_ARCH_DMA - Support DMA initialization
|
||||
@ -104,6 +104,7 @@ CONFIG_LPC17_CODEREDL=y
|
||||
#
|
||||
# Individual subsystems can be enabled:
|
||||
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
|
||||
#
|
||||
CONFIG_LPC17_ETHERNET=y
|
||||
CONFIG_LPC17_USBHOST=n
|
||||
CONFIG_LPC17_USBOTG=n
|
||||
@ -462,6 +463,7 @@ CONFIG_PREALLOC_TIMERS=4
|
||||
# CONFIG_FS_FAT - Enable FAT filesystem support
|
||||
# CONFIG_FAT_SECTORSIZE - Max supported sector size
|
||||
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
|
||||
#
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_ROMFS=n
|
||||
|
||||
@ -742,9 +744,23 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
|
||||
|
||||
#
|
||||
# Settings for examples/nettest
|
||||
#
|
||||
# CONFIG_EXAMPLE_NETTEST_SERVER - The target board can act
|
||||
# as either the client side or server side of the test
|
||||
# CONFIG_EXAMPLE_NETTEST_PERFORMANCE - If set, then the
|
||||
# client side simply receives messages forever, allowing
|
||||
# measurement of throughput
|
||||
# CONFIG_EXAMPLE_NETTEST_NOMAC - Set if the hardware has
|
||||
# no MAC address; one will be assigned
|
||||
# CONFIG_EXAMPLE_NETTEST_IPADDR - Target board IP address
|
||||
# CONFIG_EXAMPLE_NETTEST_DRIPADDR - Default router address
|
||||
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
|
||||
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
|
||||
# client side of the test (may be target or host)
|
||||
#
|
||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
||||
CONFIG_EXAMPLE_NETTEST_IPADDR=(10<<24|0<<16|0<<8|2)
|
||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10<<24|0<<16|0<<8|1)
|
||||
CONFIG_EXAMPLE_NETTEST_NETMASK=(255<<24|255<<16|255<<8|0)
|
||||
@ -847,6 +863,56 @@ CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
|
||||
|
||||
#
|
||||
# Settings for examples/usbstorage
|
||||
#
|
||||
# CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# Defines the number of logical units (LUNs) exported by the USB storage
|
||||
# driver. Each LUN corresponds to one exported block driver (or partition
|
||||
# of a block driver). May be 1, 2, or 3. Default is 1.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
|
||||
# The minor device number of the block driver for the first LUN. For
|
||||
# example, N in /dev/mmcsdN. Used for registering the block driver. Default
|
||||
# is zero.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVPATH1
|
||||
# The full path to the registered block driver. Default is "/dev/mmcsd0"
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
|
||||
# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# is 2 or 3. No defaults.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
|
||||
# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# is 3. No defaults.
|
||||
#
|
||||
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
|
||||
# the example code will also manage the USB trace output. The amount of trace output
|
||||
# can be controlled using:
|
||||
#
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
|
||||
# Show initialization events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
|
||||
# Show class driver events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
|
||||
# Show data transfer events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
|
||||
# Show controller events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
|
||||
# Show interrupt-related events.
|
||||
#
|
||||
CONFIG_EXAMPLES_USBSTRG_NLUNS=1
|
||||
CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
|
||||
CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
|
||||
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
|
@ -50,7 +50,10 @@ export TOOLCHAIN_BIN="/usr/local/LPCXpresso/tools/bin"
|
||||
# This the Cygwin path to the LPCXpresso 3.6 install location under Windows
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/nxp/lpcxpresso_3.6/Tools/bin"
|
||||
|
||||
# This is the path to the LPCXpression tool subdirectory
|
||||
export LPCTOOL_DIR="${WD}/configs/lpcxpresso-lpc1768/tools"
|
||||
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
|
@ -52,7 +52,7 @@
|
||||
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
|
||||
# CONFIG_DRAM_START - The start address of DRAM (physical)
|
||||
# CONFIG_DRAM_END - Last address+1 of installed RAM
|
||||
# CONFIG_ARCH_IRQPRIO - The ST32F103Z supports interrupt prioritization
|
||||
# CONFIG_ARCH_IRQPRIO - The LPC17xx supports interrupt prioritization
|
||||
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
|
||||
# stack. If defined, this symbol is the size of the interrupt
|
||||
# stack in bytes. If not defined, the user task stacks will be
|
||||
@ -64,7 +64,7 @@
|
||||
# CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
|
||||
# cause a 100 second delay during boot-up. This 100 second delay
|
||||
# serves no purpose other than it allows you to calibrate
|
||||
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
|
||||
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
|
||||
# the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until
|
||||
# the delay actually is 100 seconds.
|
||||
# CONFIG_ARCH_DMA - Support DMA initialization
|
||||
@ -104,6 +104,7 @@ CONFIG_LPC17_CODEREDL=y
|
||||
#
|
||||
# Individual subsystems can be enabled:
|
||||
# (MAINOSC, PLL0, PLL1 and FLASH are controlled in board.h)
|
||||
#
|
||||
CONFIG_LPC17_ETHERNET=n
|
||||
CONFIG_LPC17_USBHOST=n
|
||||
CONFIG_LPC17_USBOTG=n
|
||||
@ -455,6 +456,7 @@ CONFIG_PREALLOC_TIMERS=4
|
||||
# CONFIG_FS_FAT - Enable FAT filesystem support
|
||||
# CONFIG_FAT_SECTORSIZE - Max supported sector size
|
||||
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
|
||||
#
|
||||
CONFIG_FS_FAT=n
|
||||
CONFIG_FS_ROMFS=n
|
||||
|
||||
@ -685,9 +687,24 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
|
||||
|
||||
#
|
||||
# Settings for examples/nettest
|
||||
#
|
||||
#
|
||||
# CONFIG_EXAMPLE_NETTEST_SERVER - The target board can act
|
||||
# as either the client side or server side of the test
|
||||
# CONFIG_EXAMPLE_NETTEST_PERFORMANCE - If set, then the
|
||||
# client side simply receives messages forever, allowing
|
||||
# measurement of throughput
|
||||
# CONFIG_EXAMPLE_NETTEST_NOMAC - Set if the hardware has
|
||||
# no MAC address; one will be assigned
|
||||
# CONFIG_EXAMPLE_NETTEST_IPADDR - Target board IP address
|
||||
# CONFIG_EXAMPLE_NETTEST_DRIPADDR - Default router address
|
||||
# CONFIG_EXAMPLE_NETTEST_NETMASK - Network mask
|
||||
# CONFIG_EXAMPLE_NETTEST_CLIENTIP - IP address of the
|
||||
# client side of the test (may be target or host)
|
||||
#
|
||||
CONFIG_EXAMPLE_NETTEST_SERVER=n
|
||||
CONFIG_EXAMPLE_NETTEST_PERFORMANCE=n
|
||||
CONFIG_EXAMPLE_NETTEST_NOMAC=n
|
||||
CONFIG_EXAMPLE_NETTEST_NOMAC=y
|
||||
CONFIG_EXAMPLE_NETTEST_IPADDR=(10<<24|0<<16|0<<8|2)
|
||||
CONFIG_EXAMPLE_NETTEST_DRIPADDR=(10<<24|0<<16|0<<8|1)
|
||||
CONFIG_EXAMPLE_NETTEST_NETMASK=(255<<24|255<<16|255<<8|0)
|
||||
@ -790,6 +807,56 @@ CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
|
||||
|
||||
#
|
||||
# Settings for examples/usbstorage
|
||||
#
|
||||
# CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# Defines the number of logical units (LUNs) exported by the USB storage
|
||||
# driver. Each LUN corresponds to one exported block driver (or partition
|
||||
# of a block driver). May be 1, 2, or 3. Default is 1.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
|
||||
# The minor device number of the block driver for the first LUN. For
|
||||
# example, N in /dev/mmcsdN. Used for registering the block driver. Default
|
||||
# is zero.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVPATH1
|
||||
# The full path to the registered block driver. Default is "/dev/mmcsd0"
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
|
||||
# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# is 2 or 3. No defaults.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
|
||||
# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# is 3. No defaults.
|
||||
#
|
||||
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
|
||||
# the example code will also manage the USB trace output. The amount of trace output
|
||||
# can be controlled using:
|
||||
#
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
|
||||
# Show initialization events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
|
||||
# Show class driver events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
|
||||
# Show data transfer events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
|
||||
# Show controller events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
|
||||
# Show interrupt-related events.
|
||||
#
|
||||
CONFIG_EXAMPLES_USBSTRG_NLUNS=1
|
||||
CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
|
||||
CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
|
||||
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
|
@ -50,7 +50,10 @@ export TOOLCHAIN_BIN="/usr/local/LPCXpresso/tools/bin"
|
||||
# This the Cygwin path to the LPCXpresso 3.6 install location under Windows
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/nxp/lpcxpresso_3.6/Tools/bin"
|
||||
|
||||
# This is the path to the LPCXpression tool subdirectory
|
||||
export LPCTOOL_DIR="${WD}/configs/lpcxpresso-lpc1768/tools"
|
||||
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
|
@ -35,14 +35,19 @@
|
||||
####################################################################################
|
||||
|
||||
USAGE="$0 <nuttx-path>"
|
||||
echo "Assumptions:"
|
||||
|
||||
echo "############################################################################"
|
||||
echo "# Assumptions:"
|
||||
echo "#"
|
||||
echo "# - Windows 7"
|
||||
echo "# - LPCXpresso 3.6 installed at /cygdrive/c/nxp/lpcxpresso_3.6"
|
||||
echo "# - AXF image built with Code Red"
|
||||
echo "# - LPC1768"
|
||||
echo "#"
|
||||
echo "# You will need to edit this is any of the above are false"
|
||||
echo "#"
|
||||
echo "############################################################################"
|
||||
echo ""
|
||||
echo " - Windows 7"
|
||||
echo " - LPCXpresso 4.6 installed at /cygdrive/c/nxp/lpcxpresso_3.6"
|
||||
echo " - AXF image built with Code Red"
|
||||
echo " - LPC17xx"
|
||||
echo ""
|
||||
echo "You will need to edit this is any of the above are false"
|
||||
|
||||
# This is the default install location for binaries on Windows (note that this
|
||||
# path could change with the Code Red version number)
|
||||
@ -121,6 +126,21 @@ cd ${BINDIR} || \
|
||||
./${BOOTLPC} ${BOOTLPC_ARG} || \
|
||||
{ echo "'${BOOTLPC} ${BOOTLPC_ARG}' Failed"; }
|
||||
|
||||
echo ""
|
||||
echo "Wait a bit"
|
||||
echo "5..."
|
||||
sleep 1
|
||||
echo "4..."
|
||||
sleep 1
|
||||
echo "3..."
|
||||
sleep 1
|
||||
echo "2..."
|
||||
sleep 1
|
||||
echo "1..."
|
||||
sleep 1
|
||||
echo "0..."
|
||||
echo ""
|
||||
|
||||
# Then program the FLASH
|
||||
|
||||
./${FLASHUTIL} ${WIRE} -p${TARGET} -flash-load-exec="${NUTTXPATH}"
|
||||
|
@ -64,7 +64,7 @@
|
||||
# CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
|
||||
# cause a 100 second delay during boot-up. This 100 second delay
|
||||
# serves no purpose other than it allows you to calibrate
|
||||
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
|
||||
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
|
||||
# the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until
|
||||
# the delay actually is 100 seconds.
|
||||
# CONFIG_ARCH_DMA - Support DMA initialization
|
||||
@ -685,6 +685,7 @@ CONFIG_EXAMPLE_UIP_DHCPC=n
|
||||
|
||||
#
|
||||
# Settings for examples/nettest
|
||||
#
|
||||
# CONFIG_EXAMPLE_NETTEST_SERVER - The target board can act
|
||||
# as either the client side or server side of the test
|
||||
# CONFIG_EXAMPLE_NETTEST_PERFORMANCE - If set, then the
|
||||
|
Loading…
Reference in New Issue
Block a user