Changeset 7db6953 in rtems


Ignore:
Timestamp:
Sep 21, 2014, 6:07:41 PM (5 years ago)
Author:
Tomasz Gregorek <tomasz.gregorek@…>
Branches:
4.11, master
Children:
56ed56a6
Parents:
9a8b2984
git-author:
Tomasz Gregorek <tomasz.gregorek@…> (09/21/14 18:07:41)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/02/14 05:54:52)
Message:

bsp/stm32f4XXXX: System clock configuration

Added simple math to caclulate register values for the PLL
and for the prescalers. It will try to keep 48MHz for the USB OTG FS.
Also it will set latency on the Flash memory for the high speeds.

Limitations:
It is assumed that 1MHz resolution is enough.
Best fits for the clocks are achieved with multiplies of 42MHz.
Even though APB1, APB2 and AHB are calculated user is still required
to provide correct values for the bsp configuration for the:
STM32F4_PCLK1
STM32F4_PCLK2
STM32F4_HCLK (= system clock)
as those are used for the peripheral clocking calculations.

Location:
c/src/lib/libbsp/arm/stm32f4
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/stm32f4/Makefile.am

    r9a8b2984 r7db6953  
    5252include_bsp_HEADERS += include/stm32f4xxxx_gpio.h
    5353include_bsp_HEADERS += include/stm32f4xxxx_rcc.h
     54include_bsp_HEADERS += include/stm32f4xxxx_flash.h
    5455include_bsp_HEADERS += include/stm32_i2c.h
    5556include_bsp_HEADERS += include/i2c.h
  • c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h

    r9a8b2984 r7db6953  
    5353#include <bsp/stm32f4xxxx_rcc.h>
    5454#define STM32F4_RCC ((volatile stm32f4_rcc *) (STM32F4_BASE + 0x40023800))
     55
     56/** @} */
     57
     58/**
     59 * @name STM32F4XXXX FLASH
     60 * @{
     61 */
     62
     63#include <bsp/stm32f4xxxx_flash.h>
     64#define STM32F4_FLASH ((volatile stm32f4_flash *) (STM32F4_BASE + 0x40023C00))
    5565
    5666/** @} */
  • c/src/lib/libbsp/arm/stm32f4/include/stm32f4xxxx_rcc.h

    r9a8b2984 r7db6953  
    3232
    3333typedef struct {
    34         uint32_t cr;
    35         uint32_t pllcfgr;
    36         uint32_t cfgr;
    37         uint32_t cir;
    38         uint32_t ahbrstr [3];
    39         uint32_t reserved_1c;
    40         uint32_t apbrstr [2];
    41         uint32_t reserved_28 [2];
    42         uint32_t ahbenr [3];
    43         uint32_t reserved_3c;
    44         uint32_t apbenr [2];
    45         uint32_t reserved_48 [2];
    46         uint32_t ahblpenr [3];
    47         uint32_t reserved_5c;
    48         uint32_t apblpenr [2];
    49         uint32_t reserved_68 [2];
    50         uint32_t bdcr;
    51         uint32_t csr;
    52         uint32_t reserved_78 [2];
    53         uint32_t sscgr;
    54         uint32_t plli2scfgr;
     34  uint32_t cr;
     35  uint32_t pllcfgr;
     36  uint32_t cfgr;
     37  uint32_t cir;
     38  uint32_t ahbrstr[ 3 ];
     39  uint32_t reserved_1c;
     40  uint32_t apbrstr[ 2 ];
     41  uint32_t reserved_28[ 2 ];
     42  uint32_t ahbenr[ 3 ];
     43  uint32_t reserved_3c;
     44  uint32_t apbenr[ 2 ];
     45  uint32_t reserved_48[ 2 ];
     46  uint32_t ahblpenr[ 3 ];
     47  uint32_t reserved_5c;
     48  uint32_t apblpenr[ 2 ];
     49  uint32_t reserved_68[ 2 ];
     50  uint32_t bdcr;
     51  uint32_t csr;
     52  uint32_t reserved_78[ 2 ];
     53  uint32_t sscgr;
     54  uint32_t plli2scfgr;
    5555} stm32f4_rcc;
    5656
    5757/** @} */
    5858
     59#define RCC_CR_HSION BSP_BIT32( 0 )
     60#define RCC_CR_HSIRDY BSP_BIT32( 1 )
     61#define RCC_CR_HSITRIM( val ) BSP_FLD32( val, 3, 7 )
     62#define RCC_CR_HSITRIM_MSK BSP_MSK32( 3, 7 )
     63#define RCC_CR_HSICAL( val ) BSP_FLD32( val, 8, 15 )
     64#define RCC_CR_HSICAL_MSK BSP_MSK32( 8, 15 )
     65#define RCC_CR_HSEON BSP_BIT32( 16 )
     66#define RCC_CR_HSERDY BSP_BIT32( 17 )
     67#define RCC_CR_HSEBYP BSP_BIT32( 18 )
     68#define RCC_CR_CSSON BSP_BIT32( 19 )
     69#define RCC_CR_PLLON BSP_BIT32( 24 )
     70#define RCC_CR_PLLRDY BSP_BIT32( 25 )
     71#define RCC_CR_PLLI2SON BSP_BIT32( 26 )
     72#define RCC_CR_PLLI2SRDY BSP_BIT32( 27 )
     73
     74#define RCC_PLLCFGR_PLLM( val ) BSP_FLD32( val, 0, 5 )
     75#define RCC_PLLCFGR_PLLM_MSK BSP_MSK32( 0, 5 )
     76#define RCC_PLLCFGR_PLLN( val ) BSP_FLD32( val, 6, 14 )
     77#define RCC_PLLCFGR_PLLN_MSK BSP_MSK32( 6, 14 )
     78
     79#define RCC_PLLCFGR_PLLP 16
     80#define RCC_PLLCFGR_PLLP_MSK BSP_MSK32( 16, 17 )
     81#define RCC_PLLCFGR_PLLP_BY_2 0
     82#define RCC_PLLCFGR_PLLP_BY_4 BSP_FLD32( 1, 16, 17 )
     83#define RCC_PLLCFGR_PLLP_BY_6 BSP_FLD32( 2, 16, 17 )
     84#define RCC_PLLCFGR_PLLP_BY_8 BSP_FLD32( 3, 16, 17 )
     85
     86#define RCC_PLLCFGR_PLLSRC_HSE BSP_BIT32( 22 )
     87#define RCC_PLLCFGR_PLLSRC_HSI 0
     88
     89#define RCC_PLLCFGR_PLLQ( val ) BSP_FLD32( val, 24, 27 )
     90#define RCC_PLLCFGR_PLLQ_MSK BSP_MSK32( 24, 27 )
     91
     92#define RCC_CFGR_SW 0
     93#define RCC_CFGR_SW_MSK BSP_MSK32( 0, 1 )
     94#define RCC_CFGR_SW_HSI 0
     95#define RCC_CFGR_SW_HSE 1
     96#define RCC_CFGR_SW_PLL 2
     97
     98#define RCC_CFGR_SWS 2
     99#define RCC_CFGR_SWS_MSK BSP_MSK32( 2, 3 )
     100#define RCC_CFGR_SWS_HSI 0
     101#define RCC_CFGR_SWS_HSE BSP_FLD32( 1, 2, 3 )
     102#define RCC_CFGR_SWS_PLL BSP_FLD32( 2, 2, 3 )
     103
     104#define RCC_CFGR_HPRE 4
     105#define RCC_CFGR_HPRE_BY_1 0
     106#define RCC_CFGR_HPRE_BY_2 BSP_FLD32( 8, 4, 7 )
     107#define RCC_CFGR_HPRE_BY_4 BSP_FLD32( 9, 4, 7 )
     108#define RCC_CFGR_HPRE_BY_8 BSP_FLD32( 10, 4, 7 )
     109#define RCC_CFGR_HPRE_BY_16 BSP_FLD32( 11, 4, 7 )
     110#define RCC_CFGR_HPRE_BY_64 BSP_FLD32( 12, 4, 7 )
     111#define RCC_CFGR_HPRE_BY_128 BSP_FLD32( 13, 4, 7 )
     112#define RCC_CFGR_HPRE_BY_256 BSP_FLD32( 14, 4, 7 )
     113#define RCC_CFGR_HPRE_BY_512 BSP_FLD32( 15, 4, 7 )
     114
     115#define RCC_CFGR_PPRE1 10
     116#define RCC_CFGR_PPRE1_BY_1 0
     117#define RCC_CFGR_PPRE1_BY_2 BSP_FLD32( 4, 10, 12 )
     118#define RCC_CFGR_PPRE1_BY_4 BSP_FLD32( 5, 10, 12 )
     119#define RCC_CFGR_PPRE1_BY_8 BSP_FLD32( 6, 10, 12 )
     120#define RCC_CFGR_PPRE1_BY_16 BSP_FLD32( 7, 10, 12 )
     121
     122#define RCC_CFGR_PPRE2 13
     123#define RCC_CFGR_PPRE2 BSP_MSK32( 13, 15 )
     124#define RCC_CFGR_PPRE2_BY_1 0
     125#define RCC_CFGR_PPRE2_BY_2 BSP_FLD32( 4, 13, 15 )
     126#define RCC_CFGR_PPRE2_BY_4 BSP_FLD32( 5, 13, 15 )
     127#define RCC_CFGR_PPRE2_BY_8 BSP_FLD32( 6, 13, 15 )
     128#define RCC_CFGR_PPRE2_BY_16 BSP_FLD32( 7, 13, 15 )
     129
     130#define RCC_CFGR_RTCPRE( val ) BSP_FLD32( val, 16, 20 )
     131#define RCC_CFGR_RTCPRE_MSK BSP_MSK32( 16, 20 )
     132
     133#define RCC_CFGR_MCO1 21
     134#define RCC_CFGR_MCO1_MSK BSP_MSK32( 21, 22 )
     135#define RCC_CFGR_MCO1_HSI 0
     136#define RCC_CFGR_MCO1_LSE BSP_FLD32( 1, 21, 22 )
     137#define RCC_CFGR_MCO1_HSE BSP_FLD32( 2, 21, 22 )
     138#define RCC_CFGR_MCO1_PLL BSP_FLD32( 3, 21, 22 )
     139
     140#define RCC_CFGR_I2SSRC BSP_BIT32( 23 )
     141
     142#define RCC_CFGR_MCO1PRE 24
     143#define RCC_CFGR_MCO1PRE_MSK BSP_MSK32( 24, 26 )
     144#define RCC_CFGR_MCO1PRE_BY_1 0
     145#define RCC_CFGR_MCO1PRE_BY_2 BSP_FLD32( 4, 24, 26 )
     146#define RCC_CFGR_MCO1PRE_BY_3 BSP_FLD32( 5, 24, 26 )
     147#define RCC_CFGR_MCO1PRE_BY_4 BSP_FLD32( 6, 24, 26 )
     148#define RCC_CFGR_MCO1PRE_BY_5 BSP_FLD32( 7, 24, 26 )
     149
     150#define RCC_CFGR_MCO2PRE 27
     151#define RCC_CFGR_MCO2PRE_MSK BSP_MSK32( 27, 29 )
     152#define RCC_CFGR_MCO2PRE_BY_1 0
     153#define RCC_CFGR_MCO2PRE_BY_2 BSP_FLD32( 4, 27, 29 )
     154#define RCC_CFGR_MCO2PRE_BY_3 BSP_FLD32( 5, 27, 29 )
     155#define RCC_CFGR_MCO2PRE_BY_4 BSP_FLD32( 6, 27, 29 )
     156#define RCC_CFGR_MCO2PRE_BY_5 BSP_FLD32( 7, 27, 29 )
     157
     158#define RCC_CFGR_MCO2 30
     159#define RCC_CFGR_MCO2_MSK BSP_MSK32( 30, 31 )
     160#define RCC_CFGR_MCO2_SYSCLK 0
     161#define RCC_CFGR_MCO2_PLLI2S BSP_FLD32( 1, 30, 31 )
     162#define RCC_CFGR_MCO2_HSE BSP_FLD32( 2, 30, 31 )
     163#define RCC_CFGR_MCO2_PLL BSP_FLD32( 3, 30, 31 )
     164
    59165#endif /* LIBBSP_ARM_STM32F4_STM32F4XXXX_RCC_H */
  • c/src/lib/libbsp/arm/stm32f4/preinstall.am

    r9a8b2984 r7db6953  
    122122PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/stm32f4xxxx_rcc.h
    123123
     124$(PROJECT_INCLUDE)/bsp/stm32f4xxxx_flash.h: include/stm32f4xxxx_flash.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     125        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/stm32f4xxxx_flash.h
     126PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/stm32f4xxxx_flash.h
     127
    124128$(PROJECT_INCLUDE)/bsp/stm32_i2c.h: include/stm32_i2c.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    125129        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/stm32_i2c.h
  • c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c

    r9a8b2984 r7db6953  
    1818#include <bsp/bootcard.h>
    1919#include <bsp/irq-generic.h>
    20 
    21 void bsp_start(void)
     20#include <assert.h>
     21#include <bsp/stm32f4.h>
     22
     23#ifdef STM32F4_FAMILY_F4XXXX
     24
     25#include <bsp/stm32f4xxxx_rcc.h>
     26#include <bsp/stm32f4xxxx_flash.h>
     27
     28static rtems_status_code set_system_clk(
     29  uint32_t sys_clk,
     30  uint32_t hse_clk,
     31  uint32_t hse_flag
     32);
     33
     34static void init_main_osc( void )
    2235{
    23   stm32f4_gpio_set_config_array(&stm32f4_start_config_gpio [0]);
     36  volatile stm32f4_rcc *rcc = STM32F4_RCC;
     37  rtems_status_code     status;
     38
     39  /* Revert to reset values */
     40  rcc->cr |= RCC_CR_HSION;   /* turn on HSI */
     41
     42  while ( !( rcc->cr & RCC_CR_HSIRDY ) ) ;
     43
     44  rcc->cfgr &= 0x00000300; /* all prescalers to 0, clock source to HSI */
     45
     46  rcc->cr &= 0xF0F0FFFD;   /* turn off all clocks and PLL except HSI */
     47
     48  status = set_system_clk( STM32F4_SYSCLK / 1000000L,
     49    STM32F4_HSE_OSCILLATOR / 1000000L,
     50    1 );
     51
     52  assert( rtems_is_status_successful( status ) );
     53}
     54
     55/**
     56 * @brief Sets up clocks configuration.
     57 *
     58 * Set up clocks configuration to achieve desired system clock
     59 * as close as possible with simple math.
     60 *
     61 * Limitations:
     62 * It is assumed that 1MHz resolution is enough.
     63 * Best fits for the clocks are achieved with multiplies of 42MHz.
     64 * Even though APB1, APB2 and AHB are calculated user is still required
     65 * to provide correct values for the bsp configuration for the:
     66 * STM32F4_PCLK1
     67 * STM32F4_PCLK2
     68 * STM32F4_HCLK
     69 * as those are used for the peripheral clocking calculations.
     70 *
     71 * @param sys_clk Desired system clock in MHz.
     72 * @param hse_clk External clock speed in MHz.
     73 * @param hse_flag Flag determining which clock source to use, 1 for HSE,
     74 *                 0 for HSI.
     75 *
     76 * @retval RTEMS_SUCCESSFUL Configuration has been succesfully aplied for the
     77 *                          requested clock speed.
     78 * @retval RTEMS_TIMEOUT HSE clock didn't start or PLL didn't lock.
     79 * @retval RTEMS_INVALID_NUMBER Requested clock speed is out of range.
     80 */
     81static rtems_status_code set_system_clk(
     82  uint32_t sys_clk,
     83  uint32_t hse_clk,
     84  uint32_t hse_flag
     85)
     86{
     87  volatile stm32f4_rcc   *rcc = STM32F4_RCC;
     88  volatile stm32f4_flash *flash = STM32F4_FLASH;
     89  long                    timeout = 0;
     90
     91  int src_clk = 0;
     92
     93  uint32_t pll_m = 0;
     94  uint32_t pll_n = 0;
     95  uint32_t pll_p = 0;
     96  uint32_t pll_q = 0;
     97
     98  uint32_t ahbpre = 0;
     99  uint32_t apbpre1 = 0;
     100  uint32_t apbpre2 = 0;
     101
     102  if ( sys_clk == 16 && hse_clk != 16 ) {
     103    /* Revert to reset values */
     104    rcc->cr |= RCC_CR_HSION;   /* turn on HSI */
     105
     106    while ( !( rcc->cr & RCC_CR_HSIRDY ) ) ;
     107
     108    /* all prescalers to 0, clock source to HSI */
     109    rcc->cfgr &= 0x00000300 | RCC_CFGR_SW_HSI;
     110    rcc->cr &= 0xF0F0FFFD;   /* turn off all clocks and PLL except HSI */
     111    flash->acr = 0; /* slow clock so no cache, no prefetch, no latency */
     112
     113    return RTEMS_SUCCESSFUL;
     114  }
     115
     116  if ( sys_clk == hse_clk ) {
     117    /* Revert to reset values */
     118    rcc->cr |= RCC_CR_HSEON;   /* turn on HSE */
     119    timeout = 400;
     120
     121    while ( !( rcc->cr & RCC_CR_HSERDY ) && --timeout ) ;
     122
     123    assert( timeout != 0 );
     124
     125    if ( timeout == 0 ) {
     126      return RTEMS_TIMEOUT;
     127    }
     128
     129    /* all prescalers to 0, clock source to HSE */
     130    rcc->cfgr &= 0x00000300;
     131    rcc->cfgr |= RCC_CFGR_SW_HSE;
     132    /* turn off all clocks and PLL except HSE */
     133    rcc->cr &= 0xF0F0FFFC | RCC_CR_HSEON;
     134    flash->acr = 0; /* slow clock so no cache, no prefetch, no latency */
     135
     136    return RTEMS_SUCCESSFUL;
     137  }
     138
     139  /*
     140   * Lets use 1MHz input for PLL so we get higher VCO output
     141   * this way we get better value for the PLL_Q divader for the USB
     142   *
     143   * Though you might want to use 2MHz as per CPU specification:
     144   *
     145   * Caution:The software has to set these bits correctly to ensure
     146   * that the VCO input frequency ranges from 1 to 2 MHz.
     147   * It is recommended to select a frequency of 2 MHz to limit PLL jitter.
     148   */
     149
     150  if ( sys_clk > 180 ) {
     151    return RTEMS_INVALID_NUMBER;
     152  } else if ( sys_clk >= 96 ) {
     153    pll_n = sys_clk << 1;
     154    pll_p = RCC_PLLCFGR_PLLP_BY_2;
     155  } else if ( sys_clk >= 48 ) {
     156    pll_n = sys_clk << 2;
     157    pll_p = RCC_PLLCFGR_PLLP_BY_4;
     158  } else if ( sys_clk >= 24 ) {
     159    pll_n = sys_clk << 3;
     160    pll_p = RCC_PLLCFGR_PLLP_BY_8;
     161  } else {
     162    return RTEMS_INVALID_NUMBER;
     163  }
     164
     165  if ( hse_clk == 0 || hse_flag == 0 ) {
     166    src_clk = 16;
     167    hse_flag = 0;
     168  } else {
     169    src_clk = hse_clk;
     170  }
     171
     172  pll_m = src_clk; /* divide by the oscilator speed in MHz */
     173
     174  /* pll_q is a prescaler from VCO for the USB OTG FS, SDIO and RNG,
     175   * best if results in the 48MHz for the USB
     176   */
     177  pll_q = ( (long) ( src_clk * pll_n + src_clk * pll_n / 2 ) ) / pll_m / 48;
     178
     179  if ( pll_q < 2 ) {
     180    pll_q = 2;
     181  }
     182
     183  /* APB1 prescaler, APB1 clock must be < 42MHz */
     184  apbpre1 = ( sys_clk * 100 ) / 42;
     185
     186  if ( apbpre1 <= 100 ) {
     187    apbpre1 = RCC_CFGR_PPRE1_BY_1;
     188  } else if ( apbpre1 <= 200 ) {
     189    apbpre1 = RCC_CFGR_PPRE1_BY_2;
     190  } else if ( apbpre1 <= 400 ) {
     191    apbpre1 = RCC_CFGR_PPRE1_BY_4;
     192  } else if ( apbpre1 <= 800 ) {
     193    apbpre1 = RCC_CFGR_PPRE1_BY_8;
     194  } else if ( apbpre1 ) {
     195    apbpre1 = RCC_CFGR_PPRE1_BY_16;
     196  }
     197
     198  /* APB2 prescaler, APB2 clock must be < 84MHz */
     199  apbpre2 = ( sys_clk * 100 ) / 84;
     200
     201  if ( apbpre2 <= 100 ) {
     202    apbpre2 = RCC_CFGR_PPRE2_BY_1;
     203  } else if ( apbpre2 <= 200 ) {
     204    apbpre2 = RCC_CFGR_PPRE2_BY_2;
     205  } else if ( apbpre2 <= 400 ) {
     206    apbpre2 = RCC_CFGR_PPRE2_BY_4;
     207  } else if ( apbpre2 <= 800 ) {
     208    apbpre2 = RCC_CFGR_PPRE2_BY_8;
     209  } else {
     210    apbpre2 = RCC_CFGR_PPRE2_BY_16;
     211  }
     212
     213  rcc->cr |= RCC_CR_HSION;   /* turn on HSI */
     214
     215  while ( ( !( rcc->cr & RCC_CR_HSIRDY ) ) ) ;
     216
     217  /* all prescalers to 0, clock source to HSI */
     218  rcc->cfgr &= 0x00000300;
     219  rcc->cfgr |= RCC_CFGR_SW_HSI;
     220
     221  while ( ( ( rcc->cfgr & RCC_CFGR_SWS_MSK ) != RCC_CFGR_SWS_HSI ) ) ;
     222
     223  /* turn off PLL */
     224  rcc->cr &= ~( RCC_CR_PLLON | RCC_CR_PLLRDY );
     225
     226  /* turn on HSE */
     227  if ( hse_flag ) {
     228    rcc->cr |= RCC_CR_HSEON;
     229    timeout = 400;
     230
     231    while ( ( !( rcc->cr & RCC_CR_HSERDY ) ) && timeout-- ) ;
     232
     233    assert( timeout != 0 );
     234
     235    if ( timeout == 0 ) {
     236      return RTEMS_TIMEOUT;
     237    }
     238  }
     239
     240  rcc->pllcfgr &= 0xF0BC8000; /* clear PLL prescalers */
     241
     242  /* set pll parameters */
     243  rcc->pllcfgr |= RCC_PLLCFGR_PLLM( pll_m ) | /* input divider */
     244                  RCC_PLLCFGR_PLLN( pll_n ) | /* multiplier */
     245                  pll_p |                     /* output divider from table */
     246                                              /* HSE v HSI */
     247                  ( hse_flag ? RCC_PLLCFGR_PLLSRC_HSE : RCC_PLLCFGR_PLLSRC_HSI )
     248                  |
     249                  RCC_PLLCFGR_PLLQ( pll_q );    /* PLLQ divider */
     250
     251  /* set prescalers for the internal busses */
     252  rcc->cfgr |= apbpre1 |
     253               apbpre2 |
     254               ahbpre;
     255
     256  /*
     257   * Set flash parameters, hard coded for now for fast system clocks.
     258   * TODO implement some math to use flash on as low latancy as possible
     259   */
     260  flash->acr = FLASH_ACR_LATENCY( 5 ) | /* latency */
     261               FLASH_ACR_ICEN |       /* instruction cache */
     262               FLASH_ACR_DCEN;        /* data cache */
     263
     264  /* turn on PLL */
     265  rcc->cr |= RCC_CR_PLLON;
     266  timeout = 40000;
     267
     268  while ( ( !( rcc->cr & RCC_CR_PLLRDY ) ) && --timeout ) ;
     269 
     270  assert( timeout != 0 );
     271
     272  if ( timeout == 0 ) {
     273    return RTEMS_TIMEOUT;
     274  }
     275
     276  /* clock source to PLL */
     277  rcc->cfgr = ( rcc->cfgr & ~RCC_CFGR_SW_MSK ) | RCC_CFGR_SW_PLL;
     278
     279  while ( ( ( rcc->cfgr & RCC_CFGR_SWS_MSK ) != RCC_CFGR_SWS_PLL ) ) ;
     280
     281  return RTEMS_SUCCESSFUL;
     282}
     283
     284#endif /* STM32F4_FAMILY_F4XXXX */
     285
     286#ifdef STM32F4_FAMILY_F10XXX
     287
     288static void init_main_osc( void )
     289{
     290
     291}
     292
     293#endif /* STM32F4_FAMILY_F10XXX */
     294
     295void bsp_start( void )
     296{
     297  init_main_osc();
     298
     299  stm32f4_gpio_set_config_array( &stm32f4_start_config_gpio[ 0 ] );
    24300
    25301  bsp_interrupt_initialize();
Note: See TracChangeset for help on using the changeset viewer.