我下载了ST公司官网的最新stm32cube图形化配置软件,并使用它来配置我的F407-discovery开发板,使用了PortD.12与PortD.13两个引脚控制2个LED灯。我在main函数里添加了闪烁D.13的LED灯,但是实际并没有观察到LED灯在反转。求助各位了~~~
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 */
}
这里非常感谢大家帮忙!
每个回复即送10个积分 ^_^
我要赚赏金
