Olimex STM32 P407: Update clocking using STM3250G; Verify GPIOs.

This commit is contained in:
Gregory Nutt 2016-12-21 10:45:36 -06:00
parent 41eda13c9f
commit f8f2c00415
17 changed files with 139 additions and 65 deletions

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
<p>Last Updated: December 4, 2016</p>
<p>Last Updated: December 21, 2016</p>
</td>
</tr>
</table>
@ -177,6 +177,8 @@ nuttx/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/olimex-stm32-p107/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- olimex-stm32-p207/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/olimex-stm32-p207/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- olimex-stm32-p407/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/olimex-stm32-p407/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- olimex-strp711/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/olimex-strp711/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- open1788/

View File

@ -1393,6 +1393,8 @@ nuttx/
| | `- README.txt
| |- olimex-stm32-p207/
| | `- README.txt
| |- olimex-stm32-p407/
| | `- README.txt
| |- olimex-strp711/
| | `- README.txt
| |- open1788/

View File

@ -542,6 +542,17 @@ config ARCH_BOARD_OLIMEX_STM32P207
toolchain under Linux or Cygwin. See the http://www.olimex.com for
further information. This board features the STMicro STM32F207ZE MCU
config ARCH_BOARD_OLIMEX_STM32P407
bool "Olimex STM32 P407 board"
depends on ARCH_CHIP_STM32F407ZG
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help---
This port uses the Olimex STM32 P407 board and a GNU arm-nuttx-elf
toolchain under Linux or Cygwin. See the http://www.olimex.com for
further information. This board features the STMicro STM32F407ZG MCU
config ARCH_BOARD_OLIMEXINO_STM32
bool "Olimexino STM32 board"
depends on ARCH_CHIP_STM32F103RB
@ -1402,6 +1413,7 @@ config ARCH_BOARD
default "olimex-stm32-e407" if ARCH_BOARD_OLIMEX_STM32E407
default "olimex-stm32-p107" if ARCH_BOARD_OLIMEX_STM32P107
default "olimex-stm32-p207" if ARCH_BOARD_OLIMEX_STM32P207
default "olimex-stm32-p407" if ARCH_BOARD_OLIMEX_STM32P407
default "olimex-strp711" if ARCH_BOARD_OLIMEX_STRP711
default "olimexino-stm32" if ARCH_BOARD_OLIMEXINO_STM32
default "open1788" if ARCH_BOARD_OPEN1788
@ -1677,6 +1689,9 @@ endif
if ARCH_BOARD_OLIMEX_STM32P207
source "configs/olimex-stm32-p207/Kconfig"
endif
if ARCH_BOARD_OLIMEX_STM32P407
source "configs/olimex-stm32-p407/Kconfig"
endif
if ARCH_BOARD_OLIMEX_STRP711
source "configs/olimex-strp711/Kconfig"
endif

View File

@ -460,6 +460,11 @@ configs/olimex-stm32-p207
toolchain under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p207.html
for further information. Contributed by Martin Lederhilger.
configs/olimex-stm32-p407
This port uses the Olimex STM32-P407 board (STM32F407ZG) and a GNU arm-nuttx-elf
toolchain under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p407.html
for further information.
configs/olimexino-stm32
This port uses the Olimexino STM32 board (STM32F103RBT6) and a GNU arm-nuttx-elf
toolchain* under Linux or Cygwin. See the http://www.olimex.com for further\

View File

@ -71,35 +71,34 @@
*
* PLL source is HSE
* PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN
* = (25,000,000 / 25) * 240
* = 240,000,000
* = (25,000,000 / 25) * 336
* = 336,000,000
* SYSCLK = PLL_VCO / PLLP
* = 240,000,000 / 2 = 120,000,000
* = 336,000,000 / 2 = 168,000,000
* USB OTG FS, SDIO and RNG Clock
* = PLL_VCO / PLLQ
* = 240,000,000 / 5 = 48,000,000
* = 48,000,000
*/
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(25)
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(240)
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(336)
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(5)
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(7)
#define STM32_SYSCLK_FREQUENCY 120000000ul
#define STM32_SYSCLK_FREQUENCY 168000000ul
/* AHB clock (HCLK) is SYSCLK (120MHz) */
/* AHB clock (HCLK) is SYSCLK (168MHz) */
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */
#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */
/* APB1 clock (PCLK1) is HCLK/4 (30MHz) */
/* APB1 clock (PCLK1) is HCLK/4 (42MHz) */
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd4 /* PCLK1 = HCLK / 4 */
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/4)
/* Timers driven from APB1 will be twice PCLK1 (60Mhz)*/
/* Timers driven from APB1 will be twice PCLK1 */
#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY)
@ -111,12 +110,12 @@
#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY)
/* APB2 clock (PCLK2) is HCLK/2 (60MHz) */
/* APB2 clock (PCLK2) is HCLK/2 (84MHz) */
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2)
/* Timers driven from APB2 will be twice PCLK2 (120Mhz)*/
/* Timers driven from APB2 will be twice PCLK2 */
#define STM32_APB2_TIM1_CLKIN (2*STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM8_CLKIN (2*STM32_PCLK2_FREQUENCY)
@ -138,6 +137,36 @@
#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY
#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY
/* SDIO dividers. Note that slower clocking is required when DMA is disabled
* in order to avoid RX overrun/TX underrun errors due to delayed responses
* to service FIFOs in interrupt driven mode. These values have not been
* tuned!!!
*
* SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(118+2)=400 KHz
*/
#define SDIO_INIT_CLKDIV (118 << SDIO_CLKCR_CLKDIV_SHIFT)
/* DMA ON: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(1+2)=16 MHz
* DMA OFF: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(2+2)=12 MHz
*/
#ifdef CONFIG_SDIO_DMA
# define SDIO_MMCXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT)
#else
# define SDIO_MMCXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT)
#endif
/* DMA ON: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(1+2)=16 MHz
* DMA OFF: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(2+2)=12 MHz
*/
#ifdef CONFIG_SDIO_DMA
# define SDIO_SDXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT)
#else
# define SDIO_SDXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT)
#endif
/* LED definitions ******************************************************************/
/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any
* way. The following definitions are used to access individual LEDs.
@ -254,7 +283,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif

View File

@ -106,8 +106,8 @@ CONFIG_ARCH_CHIP_STM32=y
# CONFIG_ARCH_ARM926EJS is not set
# CONFIG_ARCH_ARM920T is not set
# CONFIG_ARCH_CORTEXM0 is not set
CONFIG_ARCH_CORTEXM3=y
# CONFIG_ARCH_CORTEXM4 is not set
# CONFIG_ARCH_CORTEXM3 is not set
CONFIG_ARCH_CORTEXM4=y
# CONFIG_ARCH_CORTEXM7 is not set
# CONFIG_ARCH_CORTEXA5 is not set
# CONFIG_ARCH_CORTEXA8 is not set
@ -126,8 +126,9 @@ CONFIG_ARM_TOOLCHAIN_GNU=y
CONFIG_ARCH_HAVE_CMNVECTOR=y
# CONFIG_ARMV7M_CMNVECTOR is not set
# CONFIG_ARMV7M_LAZYFPU is not set
# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_FPU=y
# CONFIG_ARCH_HAVE_DPFPU is not set
CONFIG_ARCH_FPU=y
# CONFIG_ARCH_HAVE_TRUSTZONE is not set
CONFIG_ARM_HAVE_MPU_UNIFIED=y
# CONFIG_ARM_MPU is not set
@ -303,14 +304,14 @@ CONFIG_STM32_FLASH_CONFIG_DEFAULT=y
# CONFIG_STM32_HIGHDENSITY is not set
# CONFIG_STM32_MEDIUMDENSITY is not set
# CONFIG_STM32_LOWDENSITY is not set
# CONFIG_STM32_STM32F20XX is not set`
# CONFIG_STM32_STM32F20XX is not set
# CONFIG_STM32_STM32F205 is not set
# CONFIG_STM32_STM32F207 is not set
# CONFIG_STM32_STM32F30XX is not set
# CONFIG_STM32_STM32F302 is not set
# CONFIG_STM32_STM32F303 is not set
# CONFIG_STM32_STM32F37XX is not set
CONFIG_STM32_STM32F40XX
CONFIG_STM32_STM32F40XX=y
# CONFIG_STM32_STM32F401 is not set
# CONFIG_STM32_STM32F411 is not set
# CONFIG_STM32_STM32F405 is not set
@ -324,7 +325,7 @@ CONFIG_STM32_STM32F407=y
#
# STM32 Peripheral Support
#
# CONFIG_STM32_HAVE_CCM is not set
CONFIG_STM32_HAVE_CCM=y
# CONFIG_STM32_HAVE_USBDEV is not set
CONFIG_STM32_HAVE_OTGFS=y
CONFIG_STM32_HAVE_FSMC=y
@ -336,7 +337,7 @@ CONFIG_STM32_HAVE_USART6=y
# CONFIG_STM32_HAVE_UART7 is not set
# CONFIG_STM32_HAVE_UART8 is not set
CONFIG_STM32_HAVE_TIM1=y
# CONFIG_STM32_HAVE_TIM2 is not set
CONFIG_STM32_HAVE_TIM2=y
CONFIG_STM32_HAVE_TIM3=y
CONFIG_STM32_HAVE_TIM4=y
CONFIG_STM32_HAVE_TIM5=y
@ -386,6 +387,7 @@ CONFIG_STM32_ADC1=y
# CONFIG_STM32_BKPSRAM is not set
CONFIG_STM32_CAN1=y
# CONFIG_STM32_CAN2 is not set
# CONFIG_STM32_CCMDATARAM is not set
# CONFIG_STM32_CRC is not set
# CONFIG_STM32_CRYP is not set
# CONFIG_STM32_DMA1 is not set
@ -445,6 +447,7 @@ CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
# CONFIG_STM32_FORCEPOWER is not set
# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set
# CONFIG_STM32_CCMEXCLUDE is not set
#
# Timer Configuration
@ -458,6 +461,7 @@ CONFIG_HAVE_ADC1_TIMER=y
CONFIG_STM32_ADC1_SAMPLE_FREQUENCY=100
CONFIG_STM32_ADC1_TIMTRIG=0
# CONFIG_STM32_TIM1_CAP is not set
# CONFIG_STM32_TIM2_CAP is not set
# CONFIG_STM32_TIM3_CAP is not set
# CONFIG_STM32_TIM4_CAP is not set
# CONFIG_STM32_TIM5_CAP is not set
@ -603,6 +607,8 @@ CONFIG_RAM_SIZE=114688
#
# Board Selection
#
# CONFIG_ARCH_BOARD_OLIMEX_STM32H407 is not set
# CONFIG_ARCH_BOARD_OLIMEX_STM32E407 is not set
CONFIG_ARCH_BOARD_OLIMEX_STM32P407=y
# CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="olimex-stm32-p407"
@ -659,6 +665,7 @@ CONFIG_PREALLOC_TIMERS=4
#
# Tasks and Scheduling
#
# CONFIG_SPINLOCK is not set
# CONFIG_INIT_NONE is not set
CONFIG_INIT_ENTRYPOINT=y
# CONFIG_INIT_FILEPATH is not set
@ -675,6 +682,8 @@ CONFIG_SCHED_WAITPID=y
#
# CONFIG_MUTEX_TYPES is not set
CONFIG_NPTHREAD_KEYS=4
# CONFIG_PTHREAD_CLEANUP is not set
# CONFIG_CANCELLATION_POINTS is not set
#
# Performance Monitoring
@ -831,7 +840,6 @@ CONFIG_NETDEVICES=y
# CONFIG_NET_DM90x0 is not set
# CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set
@ -1150,6 +1158,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
CONFIG_ARCH_HAVE_TLS=y
# CONFIG_TLS is not set
# CONFIG_LIBC_IPv6_ADDRCONV is not set
CONFIG_LIBC_NETDB=y
CONFIG_NETDB_DNSCLIENT=y
CONFIG_NETDB_DNSCLIENT_ENTRIES=8
@ -1388,6 +1397,7 @@ CONFIG_NSH_MMCSDMINOR=0
# Configure Command Options
#
# CONFIG_NSH_CMDOPT_DF_H is not set
# CONFIG_NSH_CMDOPT_DD_STATS is not set
CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_CMDOPT_HEXDUMP=y
CONFIG_NSH_FILEIOSIZE=512

View File

@ -47,15 +47,20 @@ if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
# This is the Cygwin path to the location where I installed the RIDE
# toolchain under windows. You will also have to edit this if you install
# the RIDE toolchain in any other location
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin"
# This is the Cygwin path to the location where I installed the CodeSourcery
# toolchain under windows. You will also have to edit this if you install
# the CodeSourcery toolchain in any other location
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors"
# You can this free toolchain here https://launchpad.net/gcc-arm-embedded
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin"
# This is the path to the location where I installed the devkitARM toolchain
# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin"
# These are the Cygwin paths to the locations where I installed the Atollic
# toolchain under windows. You will also have to edit this if you install
@ -67,7 +72,7 @@ fi
# This is the Cygwin path to the location where I build the buildroot
# toolchain.
export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
# Add the path to the toolchain to the PATH varialble
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"

View File

@ -1,6 +1,11 @@
/****************************************************************************
* configs/olimex-stm32-p107/src/olimex-stm32-p407.h
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Derives from a file of a similar name for the Olimex STM32 P207:
*
* Copyright (C) 2013 Max Holtzberg. All rights reserved.
* Author: Max Holtzberg <mholtzberg@uvc-ingenieure.de>
*
@ -85,20 +90,20 @@
/* Olimex-STM32-P407 GPIOs **************************************************/
/* LEDs */
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN6)
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN7)
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN8)
#define GPIO_LED4 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN9)
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN6)
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN7)
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN8)
#define GPIO_LED4 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN9)
/* BUTTONS -- NOTE that all have EXTI interrupts configured */
#define MIN_IRQBUTTON BUTTON_TAMPER
#define MAX_IRQBUTTON BUTTON_CENTER
#define NUM_IRQBUTTONS 7
#define MIN_IRQBUTTON BUTTON_TAMPER
#define MAX_IRQBUTTON BUTTON_CENTER
#define NUM_IRQBUTTONS 7
#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13)
#define GPIO_BTN_WKUP (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0)
@ -115,14 +120,14 @@
* PB10 OTG_FS_Overcurrent
*/
#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN9)
#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN2)
#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN9)
#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN2)
#ifdef CONFIG_USBHOST
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN10)
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN10)
#else
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN10)
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN10)
#endif
#ifndef __ASSEMBLY__
@ -132,20 +137,20 @@
************************************************************************************/
/************************************************************************************
* Name: stm32_usbinitialize
* Name: stm32_usb_configure
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup USB-related
* Called from stm32_boardinitialize very early in inialization to setup USB-related
* GPIO pins for the STM32F4Discovery board.
*
************************************************************************************/
#ifdef CONFIG_STM32_OTGFS
void weak_function stm32_usbinitialize(void);
void weak_function stm32_usb_configure(void);
#endif
/************************************************************************************
* Name: stm32_usbhost_initialize
* Name: stm32_usbhost_setup
*
* Description:
* Called at application startup time to initialize the USB host functionality.
@ -155,7 +160,7 @@ void weak_function stm32_usbinitialize(void);
************************************************************************************/
#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBHOST)
int stm32_usbhost_initialize(void);
int stm32_usbhost_setup(void);
#endif
/************************************************************************************

View File

@ -1,7 +1,7 @@
/************************************************************************************
* configs/olimex-stm32-p407/src/stm32_adc.c
*
* Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -40,7 +40,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdinit.h>
#include <stdint.h>
#include <nuttx/board.h>

View File

@ -1,7 +1,7 @@
/****************************************************************************
* configs/olimex-stm32-p407/src/stm32_autoleds.c
*
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -64,15 +64,15 @@
void stm32_boardinitialize(void)
{
/* Initialize USB if the 1) OTG FS controller is in the configuration and 2)
* disabled, and 3) the weak function stm32_usbinitialize() has been brought
* disabled, and 3) the weak function stm32_usb_configure() has been brought
* into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also
* selected.
*/
#ifdef CONFIG_STM32_OTGFS
if (stm32_usbinitialize)
if (stm32_usb_configure)
{
stm32_usbinitialize();
stm32_usb_configure();
}
#endif

View File

@ -111,11 +111,11 @@ int stm32_bringup(void)
#endif
#ifdef HAVE_USBHOST
/* Initialize USB host operation. stm32_usbhost_initialize() starts a thread
/* Initialize USB host operation. stm32_usbhost_setup() starts a thread
* will monitor for USB connection and disconnection events.
*/
ret = stm32_usbhost_initialize();
ret = stm32_usbhost_setup();
if (ret != OK)
{
syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret);

View File

@ -1,7 +1,7 @@
/****************************************************************************
* configs/olimex-stm32-p407/src/stm32_buttons.c
*
* Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/************************************************************************************
* configs/olimex-stm32-p407/src/stm32_can.c
*
* Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/************************************************************************************
* configs/olimex-stm32-p407/src/stm32_usb.c
*
* Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -134,15 +134,15 @@ static int usbhost_waiter(int argc, char *argv[])
************************************************************************************/
/************************************************************************************
* Name: stm32_usbinitialize
* Name: stm32_usbdev_setup
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup USB-related
* Called from stm32_usbdev_setup very early in inialization to setup USB-related
* GPIO pins for the STM32F4Discovery board.
*
************************************************************************************/
void stm32_usbinitialize(void)
void stm32_usbdev_setup(void)
{
/* The OTG FS has an internal soft pull-up. No GPIO configuration is required */
@ -156,7 +156,7 @@ void stm32_usbinitialize(void)
}
/***********************************************************************************
* Name: stm32_usbhost_initialize
* Name: stm32_usbhost_setup
*
* Description:
* Called at application startup time to initialize the USB host functionality.
@ -166,7 +166,7 @@ void stm32_usbinitialize(void)
***********************************************************************************/
#ifdef CONFIG_USBHOST
int stm32_usbhost_initialize(void)
int stm32_usbhost_setup(void)
{
int pid;
#if defined(CONFIG_USBHOST_HUB) || defined(CONFIG_USBHOST_MSC) || defined(CONFIG_USBHOST_CDCACM)

View File

@ -1,7 +1,7 @@
/****************************************************************************
* configs/olimex-stm32-p407/src/stm32_userleds.c
*
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without