title: HAL_Delay() gets into infinite loop
body: <p>I'm using Stm32f429 discovery and I got a problem about using HAL_Delay() in my blinking project.when my program want to execute HAL_Delay it stucks in infinite loop.but if I create my project using CubeMX and I copy my code there it works correctly.Whats the problem?
  Here is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>#include "stm32f4xx_hal.h"
  
  int main()
  {
   HAL_Init();
   __HAL_RCC_GPIOG_CLK_ENABLE();
   GPIO_InitTypeDef a;
   a.Pin = GPIO_PIN_13 | GPIO_PIN_14;
          a.Mode = GPIO_MODE_OUTPUT_PP;
   HAL_GPIO_Init(GPIOG, &amp;a);
   while(1)
   {
    HAL_GPIO_WritePin(GPIOG, GPIO_PIN_14, GPIO_PIN_SET);
    HAL_Delay(100);
    HAL_GPIO_WritePin(GPIOG, GPIO_PIN_14, GPIO_PIN_RESET);
    HAL_Delay(100);
   }
   return 0;
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank you very much</p>