Esempio n. 1
0
/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
  /* STM32F3xx HAL library initialization:
       - Configure the Flash prefetch
       - Systick timer is configured by default as source of time base, but user 
         can eventually implement his proper time base source (a general purpose 
         timer for example or other time source), keeping in mind that Time base 
         duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and 
         handled in milliseconds basis.
       - Set NVIC Group Priority to 4
       - Low Level Initialization
     */
  HAL_Init();

  /* -1- Initialize LEDs mounted on STM32303C-EVAL RevC board */
  BSP_LED_Init(LED1);
  BSP_LED_Init(LED2);

  /* Configure the system clock to 72 MHz */
  SystemClock_Config();

  /* -2- Configure EXTI_Line9-5 (connected to PE.06 pin) in interrupt mode */
  EXTI9_5_IRQHandler_Config();

  /* -3- Configure EXTI_Line15_10 (connected to PC.13 pin) in interrupt mode */
  EXTI15_10_IRQHandler_Config();
  
  /* Infinite loop */
  while (1)
  {
  }
}
Esempio n. 2
0
/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
  /* Enable the CPU Cache */
  CPU_CACHE_Enable();
	
  /* STM32F7xx HAL library initialization:
       - Configure the Flash ART accelerator on ITCM interface
       - Systick timer is configured by default as source of time base, but user 
         can eventually implement his proper time base source (a general purpose 
         timer for example or other time source), keeping in mind that Time base 
         duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and 
         handled in milliseconds basis.
       - Set NVIC Group Priority to 4
       - Low Level Initialization
     */
  if (HAL_Init() != HAL_OK)
  {
    Error_Handler();
  }

  /* Configure the system clock to 216 MHz */
  SystemClock_Config();

  /* -1- Initialize LEDs mounted on STM32756G-EVAL board */
  BSP_LED_Init(LED1);

  /* -2- Configure EXTI15_10 (connected to PC.13 pin) in interrupt mode */
  EXTI15_10_IRQHandler_Config();

  /* Infinite loop */
  while (1)
  {
  }
}
Esempio n. 3
0
/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
    /* STM32F2xx HAL library initialization:
         - Configure the Flash prefetch, instruction and Data caches
         - Configure the Systick to generate an interrupt each 1 msec
         - Set NVIC Group Priority to 4
         - Global MSP (MCU Support Package) initialization
       */
    HAL_Init();

    /* Configure the system clock to 120 MHz */
    SystemClock_Config();

    /* -1- Initialize LEDs mounted on NUCLEO-207ZG board */
    BSP_LED_Init(LED1);

    /* -2- Configure EXTI Line15 (connected to PG.15 pin) in interrupt mode */
    EXTI15_10_IRQHandler_Config();

    /* Infinite loop */
    while (1)
    {
    }
}