title: STM32 BluePill LED flasher acts strange using HAL_GPIO_TogglePin
body: <p>I have two simple LED flasher programs the flash at 1 sec intervals for my BluePills.One method uses HAL_GPIO_TogglePin to toggle the LED state and the other uses Set and Reset to toggle the LED state. The Set and Reset functions as expected but the HAL_GPIO_TogglePin definitely is working but it has a almost PWM effect part of the time. I have tried both methods on 2 different Bluepills with same results for both.</p>
  <pre><code> while (1)
    {  
          if (__HAL_TIM_GET_COUNTER(&amp;htim1) &gt;= 32000)
          {
            HAL_GPIO_TogglePin(User_LED_GPIO_Port, User_LED_Pin);
          }
  </code></pre>
  <p>and</p>
  <pre><code> while (1)
    {  
          if (__HAL_TIM_GET_COUNTER(&amp;htim1) &gt;= 32000)
          {
                HAL_GPIO_WritePin(User_LED_GPIO_Port, User_LED_Pin, GPIO_PIN_SET);
          }
          else {
                HAL_GPIO_WritePin(User_LED_GPIO_Port, User_LED_Pin, GPIO_PIN_RESET);
          }
  </code></pre>