diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-09-12 14:07:13 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-09-12 14:07:13 +0000 |
commit | 1b7dad5a765bc86ee194f72b7a75d76b93e87943 (patch) | |
tree | 9fb204b8c6c0c4ecc6bcfcf80b3c6d18d5fc82f7 /nuttx/configs | |
parent | 675f37494ad7f096e0b4c42189fe224c54e4fdb1 (diff) | |
download | px4-firmware-1b7dad5a765bc86ee194f72b7a75d76b93e87943.tar.gz px4-firmware-1b7dad5a765bc86ee194f72b7a75d76b93e87943.tar.bz2 px4-firmware-1b7dad5a765bc86ee194f72b7a75d76b93e87943.zip |
Misc STM32 wildfire and ENC28J60 driver updates
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5133 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/fire-stm32v2/README.txt | 14 | ||||
-rw-r--r-- | nuttx/configs/fire-stm32v2/include/board.h | 2 | ||||
-rw-r--r-- | nuttx/configs/fire-stm32v2/nsh/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/fire-stm32v2/src/fire-internal.h | 8 | ||||
-rw-r--r-- | nuttx/configs/fire-stm32v2/src/up_spi.c | 4 |
5 files changed, 24 insertions, 6 deletions
diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index 694e319da..02485f812 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -764,3 +764,17 @@ Where <subdir> is one of the following: Configure the NuttShell (nsh) located at examples/nsh. The nsh configuration contains support for some built-in applications that can be enabled by making some additional minor change to the configuration file. + + NOTE: This configuration uses to the mconf configuration tool to control + the configuration. See the section entitled "NuttX Configuration Tool" + in the top-level README.txt file. + + STATUS: The board port is basically functional. Not all features have been + verified. The ENC28J60 network is not yet functional. Networking is + enabled by default in this configuration for testing purposes. To use this + configuration, the network must currently be disabled. To do this using + the mconf configuration tool: + + > make menuconfig + + Then de-select "Networking Support" -> "Networking Support" diff --git a/nuttx/configs/fire-stm32v2/include/board.h b/nuttx/configs/fire-stm32v2/include/board.h index 36f09e7a8..9a5d309ab 100644 --- a/nuttx/configs/fire-stm32v2/include/board.h +++ b/nuttx/configs/fire-stm32v2/include/board.h @@ -2,7 +2,7 @@ * configs/fire-stm32v2/include/board.h * include/arch/board/board.h * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index fda34debe..1a849ad36 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -344,7 +344,7 @@ CONFIG_NETDEVICES=y # CONFIG_NET_DM90x0 is not set CONFIG_ENC28J60=y CONFIG_ENC28J60_NINTERFACES=1 -CONFIG_ENC28J60_SPIMODE=2 +CONFIG_ENC28J60_SPIMODE=0 CONFIG_ENC28J60_FREQUENCY=20000000 # CONFIG_ENC28J60_STATS is not set # CONFIG_ENC28J60_HALFDUPPLEX is not set diff --git a/nuttx/configs/fire-stm32v2/src/fire-internal.h b/nuttx/configs/fire-stm32v2/src/fire-internal.h index ee3c3486f..f51bd0ef9 100644 --- a/nuttx/configs/fire-stm32v2/src/fire-internal.h +++ b/nuttx/configs/fire-stm32v2/src/fire-internal.h @@ -192,7 +192,7 @@ */ #ifndef CONFIG_ENC28J60 -# define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ +# define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) #endif @@ -214,11 +214,15 @@ # warning "TFT LCD and ENCJ2860 shared PE1" #endif +/* CS and Reset are active low. Initial states are not selected and not in + * reset (driver does a soft reset). + */ + #ifdef CONFIG_ENC28J60 # define GPIO_ENC28J60_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) # define GPIO_ENC28J60_RESET (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ - GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN1) + GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN1) # define GPIO_ENC28J60_INTR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ GPIO_EXTI|GPIO_PORTE|GPIO_PIN5) #endif diff --git a/nuttx/configs/fire-stm32v2/src/up_spi.c b/nuttx/configs/fire-stm32v2/src/up_spi.c index 329274b7f..b2ef301b6 100644 --- a/nuttx/configs/fire-stm32v2/src/up_spi.c +++ b/nuttx/configs/fire-stm32v2/src/up_spi.c @@ -163,11 +163,11 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if 0 /* Need to study this */ - if (devid == SPIDEV_FLASH) + if (devid == SPIDEV_LCD) { /* Set the GPIO low to select and high to de-select */ - stm32_gpiowrite(GPIO_FLASH_CS, !selected); + stm32_gpiowrite(GPIO_LCD_CS, !selected); } else #endif |