Add support for the TI PGA11x amplifier/multiplexer

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4977 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-07-25 18:41:10 +00:00
parent 36b6e42536
commit 3fb9f89915
3 changed files with 123 additions and 21 deletions

View File

@ -776,6 +776,7 @@ selected as follow:
Where <subdir> is one of the following:
ostest:
=======
This configuration directory, performs a simple OS test using
apps/examples/ostest. This configuration use UART1 which is
available on FUNC 4 and 5 on connector X3:
@ -799,6 +800,7 @@ Where <subdir> is one of the following:
the XC32 toolchain.
nsh:
====
This configuration directory holds configuration files tht can
be used to support the NuttShell (NSH). This configuration use
UART1 which is available on FUNC 4 and 5 on connector X3:
@ -806,6 +808,8 @@ Where <subdir> is one of the following:
CONFIG_PIC32MX_UART1=y : UART1 for serial console
CONFIG_UART1_SERIAL_CONSOLE=n
UART2
-----
If you are not using MPLAB to debug, you may switch to UART2
by following the instructions above for the ostest configuration.
@ -819,7 +823,17 @@ Where <subdir> is one of the following:
path to the toolchain in setenv.sh. See notes above with regard to
the XC32 toolchain.
PGA117 Support:
--------------
The Mirtoo's PGA117 amplifier/multipexer is not used by this configuration
but can be enabled by setting:
CONFIG_INPUT=y : Enable support for INPUT devices
CONFIG_SPI_OWNBUS=y : If the PGA117 is the only device on the bus
CONFIG_INPUT_PGA11X=y : Enable support for the PGA117
nxffs:
======
This is a configuration very similar to the nsh configuration. This
configure also provides the NuttShell (NSH). And this configuration use
UART1 which is available on FUNC 4 and 5 on connector X3 (as described
@ -867,29 +881,40 @@ Where <subdir> is one of the following:
CONFIG_NSH_DISABLE_TEST=y
CONFIG_NSH_DISABLE_WGET=y
When the system boots, you should have the NXFFS file system mounted
at /mnt/sst25.
When the system boots, you should have the NXFFS file system mounted
at /mnt/sst25.
NOTES: (1) It takes many seconds to boot the sytem using the NXFFS
file system because the entire FLASH must be verified on power up
(and longer the first time that NXFFS comes up and has to format the
entire FLASH). (2) FAT does not have these delays and this configuration
can be modified to use the (larger) FAT file system as described below.
But you will, or course, lose the wear-leveling feature if FAT is used.
NOTES: (1) It takes many seconds to boot the sytem using the NXFFS
file system because the entire FLASH must be verified on power up
(and longer the first time that NXFFS comes up and has to format the
entire FLASH). (2) FAT does not have these delays and this configuration
can be modified to use the (larger) FAT file system as described below.
But you will, or course, lose the wear-leveling feature if FAT is used.
fat:
There is no FAT configuration, but the nxffx configuration can be used
to support the FAT FS if the following changes are made to the NuttX
configuration file:
fat:
----
There is no FAT configuration, but the nxffx configuration can be used
to support the FAT FS if the following changes are made to the NuttX
configuration file:
CONFIG_FS_NXFFS=n
CONFIG_FS_FAT=y
CONFIG_NSH_DISABLE_MKFATFS=n
CONFIG_FS_NXFFS=n
CONFIG_FS_FAT=y
CONFIG_NSH_DISABLE_MKFATFS=n
In this configuration, the FAT file system will not be automatically
monounted. When NuttX boots to the NSH prompt, you will find the
SST5 block driver at /dev/mtdblock0. This can be formatted with a
FAT file system and mounted with these commands:
In this configuration, the FAT file system will not be automatically
monounted. When NuttX boots to the NSH prompt, you will find the
SST5 block driver at /dev/mtdblock0. This can be formatted with a
FAT file system and mounted with these commands:
nsh> mkfatfs /dev/mtdblock0
nsh> mount -t vfat /dev/mtdblock0 /mnt/sst25
PGA117 Support:
---------------
The Mirtoo's PGA117 amplifier/multipexer is not used by this configuration
but can be enabled by setting:
CONFIG_INPUT=y : Enable support for INPUT devices
CONFIG_SPI_OWNBUS=n : The PGA117 is *not* the only device on the bus
CONFIG_INPUT_PGA11X=y : Enable support for the PGA117
nsh> mkfatfs /dev/mtdblock0
nsh> mount -t vfat /dev/mtdblock0 /mnt/sst25

View File

@ -746,6 +746,43 @@ CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
CONFIG_USBMSC_VERSIONNO=0x0399
CONFIG_USBMSC_REMOVABLE=y
#
# PGA117 support
#
# Prerequisites:
# CONFIG_INPUT=y is needed to enable support for INPUT devices
#
# CONFIG_INPUT_PGA11X
# Enables support for the PGA11X driver (Needs CONFIG_INPUT)
# CONFIG_PGA11X_SPIFREQUENCY
# SPI frequency. Default 1MHz
# CONFIG_PGA11X_DAISYCHAIN
# Use two PGA116/7's in Daisy Chain commands.
# CONFIG_PGA11X_SPIMODE
# SPI Mode. The specification says that the device operates in Mode 0 or
# Mode 3. But sometimes you need to tinker with this to get things to
# work correctly. Default: Mode 0
# CONFIG_PGA11X_MULTIPLE
# Can be defined to support multiple PGA11X devices on board. Each
# device will require a customized SPI interface to distinguish them
# When SPI_SELECT is called with devid=SPIDEV_MUX.
#
# Other settings that effect the driver:
# CONFIG_SPI_OWNBUS -- If the PGA117 is the only device on the SPI
# bus, then this should be set to 'y'
# CONFIG_DEBUG_SPI -- With CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE,
# this will enable debug output from the PGA117 driver.
#
CONFIG_INPUT=n
CONFIG_SPI_OWNBUS=y
CONFIG_DEBUG_SPI=n
CONFIG_INPUT_PGA11X=n
#CONFIG_PGA11X_SPIFREQUENCY
CONFIG_PGA11X_DAISYCHAIN=n
CONFIG_PGA11X_SPIMODE=1
CONFIG_PGA11X_MULTIPLE=n
#
# Settings for examples/uip
#

View File

@ -746,6 +746,46 @@ CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
CONFIG_USBMSC_VERSIONNO=0x0399
CONFIG_USBMSC_REMOVABLE=y
#
# PGA117 support
#
# Prerequisites:
# CONFIG_INPUT=y is needed to enable support for INPUT devices
#
# CONFIG_INPUT_PGA11X
# Enables support for the PGA11X driver (Needs CONFIG_INPUT)
# CONFIG_PGA11X_SPIFREQUENCY
# SPI frequency. Default 1MHz
# CONFIG_PGA11X_DAISYCHAIN
# Use two PGA116/7's in Daisy Chain commands.
# CONFIG_PGA11X_SPIMODE
# SPI Mode. The specification says that the device operates in Mode 0 or
# Mode 3. But sometimes you need to tinker with this to get things to
# work correctly. Default: Mode 0
# CONFIG_PGA11X_MULTIPLE
# Can be defined to support multiple PGA11X devices on board. Each
# device will require a customized SPI interface to distinguish them
# When SPI_SELECT is called with devid=SPIDEV_MUX.
#
# Other settings that effect the driver:
# CONFIG_SPI_OWNBUS -- If the PGA117 is enabled, this must be set to 'n'
# because the PGA117 is *not* the only device on the SPI bus; the SPI
# bus is shared with the serial FLASH. If PGA117 is not enabled, then
# 'y' is the correct value because the serial FLASH is the only device
# on the SPI bus.
# CONFIG_DEBUG_SPI -- With CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE,
# this will enable debug output from the PGA117 driver.
#
CONFIG_INPUT=n
CONFIG_SPI_OWNBUS=y
CONFIG_DEBUG_SPI=n
CONFIG_INPUT_PGA11X=n
#CONFIG_PGA11X_SPIFREQUENCY
CONFIG_PGA11X_DAISYCHAIN=n
CONFIG_PGA11X_SPIMODE=1
CONFIG_PGA11X_MULTIPLE=n
#
# Settings for examples/uip
#