实验现象:
核心代码:
int main(void) { /* USER CODE BEGIN 1 */ int i,j; int res; float time[2]; static int error_flag = 0; /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART6_UART_Init(); MX_TIM3_Init(); /* USER CODE BEGIN 2 */ usart6.initialize(115200); usart6.printf("x0c"); //ÇåÆÁ usart6.printf("