AnsweredAssumed Answered

Unable to get LED to toggle with STM32Cube

Question asked by hash.blue on Mar 28, 2014
Latest reply on Mar 28, 2014 by hash.blue
Hello,
I'm evaluating STM32cube, to see how it performs.

I have a simple project  in IAR which I created in STM32Cube for the F407 discovery kit. Enable PortD.12 and D/13 as outputs. However when I insert the toggle code in main(), I'm unable to see the LED toggle on D.13

Any help is appreciated. Thanks!
int main(void)
{
/* USER CODE BEGIN 1 */
 
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
  /* Configure the system clock */
  SystemClock_Config();
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
/* USER CODE BEGIN 2 */
 
/* USER CODE END 2 */
 
  HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_13 );
   HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_13 );
   
  /* Code generated for FreeRTOS */
  /* Create Start thread */
  osThreadDef(USER_Thread, StartThread, osPriorityNormal, 0, 2 * configMINIMAL_STACK_SIZE);
  osThreadCreate (osThread(USER_Thread), NULL);
 
  /* Start scheduler */
  osKernelStart(NULL, NULL);
 
  /* We should never get here as control is now taken by the scheduler */
 
/* USER CODE BEGIN 3 */
  /* Infinite loop */
  while (1)
  {
  }
/* USER CODE END 3 */
 
}

Outcomes