Merge remote-tracking branch 'origin/master' into bas24

This commit is contained in:
Gregory Nutt
2014-11-04 11:57:16 -06:00
9 changed files with 10837 additions and 469 deletions
+36 -7
View File
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: October 30, 2014</p>
<p>Last Updated: November 3, 2014</p>
</td>
</tr>
</table>
@@ -1394,7 +1394,7 @@
<li>Silicon Laboratories, Inc.
<ul>
<li><a href="#efm32g">EFM32 Gecko</a> <small>(ARM Cortex-M3)</small></li>
<li><a href="#emf32gg">EFM32 Giant Gecko</a> <small>(ARM Cortex-M3)</small></li>
<li><a href="#efm32gg">EFM32 Giant Gecko</a> <small>(ARM Cortex-M3)</small></li>
</ul>
</li>
<li>STMicroelectronics
@@ -2353,13 +2353,42 @@ nsh>
<p>
<a name="efm32gg"><b>SiLabs EFM32 Giant Gecko</b>.</a>
This is a port for the Silicon Laboratories' EFM32 <i>Giant Gecko</i> family.
This board features the EFM32GG990F1024 MCU with 1 MB flash and 128 kB RAM.
</p>
<ul>
<p>
Board support is available for the following:
</p>
<ol>
<li>
<p>
<b>SiLabs EFM32 Giant Gecko Starter Kit t (EFM32GG-STK3700)</b>.
The Gecko Starter Kit features:
<p>
<ul>
<li>EFM32GG990F1024 MCU with 1 MB flash and 128 kB RAM
<li>32.768 kHz crystal (LXFO) and 48 MHz crystal (HXFO)
<li>32 MB NAND flash
<li>Advanced Energy Monitoring
<li>Touch slider
<li>8x20 LCD
<li>2 user LEDs
<li>2 user buttons
<li>USB interface for Host/Device/OTG
<li>Ambient light sensor and inductive-capacitive metal sensor
<li>EFM32 OPAMP footprint
<li>20 pin expansion header
<li>Breakout pads for easy access to I/O pins
<li>Power sources (USB and CR2032 battery)
<li>Backup Capacitor for RTC mode
<li>Integrated Segger J-Link USB debugger/emulator
</ul>
<p>
<b>STATUS</b>.
At this time there are no board support packages for the <i>Giant Gecko</i> in the NuttX source tree (there are ports to proprietary <i>Giant Gecko</i> hardware, howevever).
</p>
</ul>
As of this writing, the basic board support is available for the <i>Giant Gecko</i> in the NuttX source tree.
A basic configuration is available for the NuttShell (NSH).
Testing is on hold, however, pending the arrival of hardware.
</p>
</li>
</ol>
</td>
</tr>
<tr>
+45
View File
@@ -73,6 +73,7 @@ config EFM32_EFM32GG
select EFM32_HAVE_UART0
select EFM32_HAVE_UART1
select EFM32_HAVE_LEUART1
select EFM32_HAVE_OTGFS
menu "EFM32 Peripheral Support"
@@ -95,6 +96,10 @@ config EFM32_HAVE_LEUART1
bool
default n
config EFM32_HAVE_OTGFS
bool
default n
# When there are multiple instances of a device, these "hidden" settings
# will automatically be selected and will represent the 'OR' of the
# instances selected.
@@ -164,6 +169,11 @@ config EFM32_LEUART1
select ARCH_HAVE_OTHER_UART
select EFM32_LEUART
config EFM32_OTGFS
bool "USB Full-Speed OTG"
default n
depends on EFM32_HAVE_OTGFS && EXPERIMENTAL
endmenu # EFM32 Peripheral Support
config EFM32_GPIO_IRQ
@@ -382,4 +392,39 @@ endif # EFM32_SPI_DMA
endmenu # SPI Configuration
endif # EFM32_USART_ISSPI
menu "USB FS Host Configuration"
depends on USBHOST && EFM32_OTGFS
config EFM32_OTGFS_RXFIFO_SIZE
int "Rx Packet Size"
default 128
---help---
Size of the RX FIFO in 32-bit words. Default 128 (512 bytes)
config EFM32_OTGFS_NPTXFIFO_SIZE
int "Non-periodic Tx FIFO Size"
default 96
---help---
Size of the non-periodic Tx FIFO in 32-bit words. Default 96 (384 bytes)
config EFM32_OTGFS_PTXFIFO_SIZE
int "Periodic Tx FIFO size"
default 128
---help---
Size of the periodic Tx FIFO in 32-bit words. Default 96 (384 bytes)
config EFM32_OTGFS_DESCSIZE
int "Descriptor Size"
default 128
---help---
Maximum size to allocate for descriptor memory descriptor. Default: 128
config EFM32_OTGFS_SOFINTR
bool "Enable SOF interrupts"
default n
---help---
Enable SOF interrupts. Why would you ever want to do that?
endmenu
endif # ARCH_CHIP_EFM32
+9
View File
@@ -126,3 +126,12 @@ endif
ifeq ($(CONFIG_EFM32_DMA),y)
CHIP_CSRCS += efm32_dma.c
endif
ifeq ($(CONFIG_EFM32_OTGFS),y)
ifeq ($(CONFIG_USBDEV),y)
CHIP_CSRCS += efm32_usbdev.c
endif
ifeq ($(CONFIG_USBHOST),y)
CHIP_CSRCS += efm32_usbhost.c
endif
endif
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -82,7 +82,7 @@
* Perform IDLE state power management.
*
* REVISIT: These power management hooks were taken with no modification
* from the STM32 implementation and need review against EFM32 reduced
* from the EFM32 implementation and need review against EFM32 reduced
* power modes.
*
****************************************************************************/
+6 -6
View File
@@ -79,8 +79,8 @@ extern "C"
* Enter STOP mode.
*
* REVISIT: This power management interface was taken with no modification
* from the STM32 implementation and needs to be reviewed against EFM32
* reduced power modes. Comments here apply to the STM32!
* from the EFM32 implementation and needs to be reviewed against EFM32
* reduced power modes. Comments here apply to the EFM32!
*
* Input Parameters:
* lpds - true: To further reduce power consumption in Stop mode, put the
@@ -104,8 +104,8 @@ int efm32_pmstop(bool lpds);
* Enter STANDBY mode.
*
* REVISIT: This power management interface was taken with no modification
* from the STM32 implementation and needs to be reviewed against EFM32
* reduced power modes. Comments here apply to the STM32!
* from the EFM32 implementation and needs to be reviewed against EFM32
* reduced power modes. Comments here apply to the EFM32!
*
* Input Parameters:
* None
@@ -127,8 +127,8 @@ int efm32_pmstandby(void);
* Enter SLEEP mode.
*
* REVISIT: This power management interface was taken with no modification
* from the STM32 implementation and needs to be reviewed against EFM32
* reduced power modes. Comments here apply to the STM32!
* from the EFM32 implementation and needs to be reviewed against EFM32
* reduced power modes. Comments here apply to the EFM32!
*
* Input Parameters:
* sleeponexit - true: SLEEPONEXIT bit is set when the WFI instruction is
+126
View File
@@ -0,0 +1,126 @@
/************************************************************************************
* arch/arm/src/efm32/efm32_usb.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
#ifndef __ARCH_ARM_SRC_EFM32_EFM32_OTGFS_H
#define __ARCH_ARM_SRC_EFM32_EFM32_OTGFS_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include "chip/efm32_usb.h"
#if defined(CONFIG_EFM32_OTGFS)
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Configuration ********************************************************************/
#ifndef CONFIG_OTGFS_PRI
# define CONFIG_OTGFS_PRI NVIC_SYSH_PRIORITY_DEFAULT
#endif
/************************************************************************************
* Public Functions
************************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/*******************************************************************************
* Name: efm32_otgfshost_initialize
*
* Description:
* Initialize USB host device controller hardware.
*
* Input Parameters:
* controller -- If the device supports more than USB host controller, then
* this identifies which controller is being initializeed. Normally, this
* is just zero.
*
* Returned Value:
* And instance of the USB host interface. The controlling task should
* use this interface to (1) call the wait() method to wait for a device
* to be connected, and (2) call the enumerate() method to bind the device
* to a class driver.
*
* Assumptions:
* - This function should called in the initialization sequence in order
* to initialize the USB device functionality.
* - Class drivers should be initialized prior to calling this function.
* Otherwise, there is a race condition if the device is already connected.
*
*******************************************************************************/
#ifdef CONFIG_USBHOST
struct usbhost_connection_s;
FAR struct usbhost_connection_s *efm32_otgfshost_initialize(int controller);
#endif
/************************************************************************************
* Name: efm32_usbsuspend
*
* Description:
* Board logic must provide the efm32_usbsuspend logic if the OTG FS device driver
* is used. This function is called whenever the USB enters or leaves suspend
* mode. This is an opportunity for the board logic to shutdown clocks, power,
* etc. while the USB is suspended.
*
************************************************************************************/
void efm32_usbsuspend(FAR struct usbdev_s *dev, bool resume);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_EFM32_OTGFS */
#endif /* __ARCH_ARM_SRC_EFM32_EFM32_OTGFS_H */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff