src/platform/arm-stm32l1xx-discovery/system_stm32l1xx-1v8-msi4000.c
void SystemInit (void)
{
    RCC->AHBENR |= RCC_AHBENR_GPIOBEN;  // enable the clock to GPIOB
    GPIOB->MODER |= (1 << 12);          // set pin 13 to be general purpose output
    GPIOB->ODR |= (1 << 6);           // Toggle the pin 
    for (;;) ;
  /*!< Set MSION bit */
  RCC->CR |= (uint32_t)0x00000100;

  /*!< Reset SW[1:0], HPRE[3:0], PPRE1[2:0], PPRE2[2:0], MCOSEL[2:0] and MCOPRE[2:0] bits */
  RCC->CFGR &= (uint32_t)0x88FFC00C;
  
  /*!< Reset HSION, HSEON, CSSON and PLLON bits */
  RCC->CR &= (uint32_t)0xEEFEFFFE;

  /*!< Reset HSEBYP bit */
  RCC->CR &= (uint32_t)0xFFFBFFFF;

  /*!< Reset PLLSRC, PLLMUL[3:0] and PLLDIV[1:0] bits */
  RCC->CFGR &= (uint32_t)0xFF02FFFF;

  /*!< Disable all interrupts */
  RCC->CIR = 0x00000000;

  /* Configure the System clock frequency, AHB/APBx prescalers and Flash settings */
  SetSysClock();

#ifdef VECT_TAB_SRAM
  SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
#else
  SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
#endif
}
/**
  * @brief  Setup the microcontroller system.
  *         Initialize the Embedded Flash Interface, the PLL and update the 
  *         SystemCoreClock variable.
  * @param  None
  * @retval None
  */
@brief  Setup the microcontroller system.
Initialize the Embedded Flash Interface, the PLL and update the
SystemCoreClock variable.
@param  None
@retval None
@brief Setup the microcontroller system . Initialize the Embedded Flash Interface the PLL and update the SystemCoreClock variable . @param None @retval None
void SystemInit (void)
{
    RCC->AHBENR |= RCC_AHBENR_GPIOBEN;  
    GPIOB->MODER |= (1 << 12);          
    GPIOB->ODR |= (1 << 6);           
    for (;;) ;
  RCC->CR |= (uint32_t)0x00000100;
  RCC->CFGR &= (uint32_t)0x88FFC00C;
  RCC->CR &= (uint32_t)0xEEFEFFFE;
  RCC->CR &= (uint32_t)0xFFFBFFFF;
  RCC->CFGR &= (uint32_t)0xFF02FFFF;
  RCC->CIR = 0x00000000;
  SetSysClock();
#ifdef VECT_TAB_SRAM
  SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; 
#else
  SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; 
#endif
}
void SystemInit ( void ) { RCC -> AHBENR |= RCC_AHBENR_GPIOBEN ; GPIOB -> MODER |= ( 1 << 12 ) ; GPIOB -> ODR |= ( 1 << 6 ) ; for ( ; ; ) ; RCC -> CR |= ( uint32_t ) 0x00000100 ; RCC -> CFGR &= ( uint32_t ) 0x88FFC00C ; RCC -> CR &= ( uint32_t ) 0xEEFEFFFE ; RCC -> CR &= ( uint32_t ) 0xFFFBFFFF ; RCC -> CFGR &= ( uint32_t ) 0xFF02FFFF ; RCC -> CIR = 0x00000000 ; SetSysClock ( ) ; #ifdef VECT_TAB_SRAM SCB -> VTOR = SRAM_BASE | VECT_TAB_OFFSET ; #else SCB -> VTOR = FLASH_BASE | VECT_TAB_OFFSET ; #endif }
@brief  Setup the microcontroller system.
@brief Setup the microcontroller system .
// enable the clock to GPIOB // set pin 13 to be general purpose output // Toggle the pin  /*!< Set MSION bit */ /*!< Reset SW[1:0], HPRE[3:0], PPRE1[2:0], PPRE2[2:0], MCOSEL[2:0] and MCOPRE[2:0] bits */ /*!< Reset HSION, HSEON, CSSON and PLLON bits */ /*!< Reset HSEBYP bit */ /*!< Reset PLLSRC, PLLMUL[3:0] and PLLDIV[1:0] bits */ /*!< Disable all interrupts */ /* Configure the System clock frequency, AHB/APBx prescalers and Flash settings */ /* Vector Table Relocation in Internal SRAM. */ /* Vector Table Relocation in Internal FLASH. */