New STM32 board needs more time for HSE ready
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4086 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
6883c4c7e5
commit
7b86861be5
@ -40,9 +40,11 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
#include <arch/board/board.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
@ -57,7 +59,12 @@
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define HSERDY_TIMEOUT 256
|
||||
/* Allow up to 100 milliseconds for the high speed clock to become ready.
|
||||
* that is a very long delay, but if the clock does not become ready we are
|
||||
* hosed anyway.
|
||||
*/
|
||||
|
||||
#define HSERDY_TIMEOUT (100 * CONFIG_BOARD_LOOPSPERMSEC)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -375,14 +382,13 @@ static inline void rcc_enableapb2(void)
|
||||
putreg32(regval, STM32_RCC_APB2ENR);
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)
|
||||
|
||||
/* Called to change to new clock based on settings in board.h
|
||||
*
|
||||
* NOTE: This logic would need to be extended if you need to select low-
|
||||
* power clocking modes!
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
|
||||
static inline void stm32_stdclockconfig(void)
|
||||
{
|
||||
uint32_t regval;
|
||||
@ -409,6 +415,11 @@ static inline void stm32_stdclockconfig(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for a timeout. If this timeout occurs, then we are hosed. We
|
||||
* have no real back-up plan, although the following logic makes it look
|
||||
* as though we do.
|
||||
*/
|
||||
|
||||
if (timeout > 0)
|
||||
{
|
||||
/* Enable FLASH prefetch buffer and 2 wait states */
|
||||
|
@ -9,3 +9,5 @@ ft2232_device_desc "Olimex OpenOCD JTAG"
|
||||
ft2232_layout olimex-jtag
|
||||
ft2232_vid_pid 0x15ba 0x0003
|
||||
|
||||
#jtag_khz 600
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user