STM32-HAL-PlatformIO-LED-Blink-Beispiel
Verwenden Sie in der autogenerierten main.c die folgende while()-Schleife:
stm32_blink.c
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET);
HAL_Delay(1000);
HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_RESET);
HAL_Delay(1000);
}
/* USER CODE END 3 */Auf STM32H7-Nucleo-Boards schaltet dies die grüne LED um.
Check out similar posts by category:
C/C++, PlatformIO, STM32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow