请问一下32串口发送的问题,为什么我在mian函数中使用三种不同的发送模式按顺序发送,第一次没有加delay函数,我发现IT中断发送的内容串口中就打印不出来,第二次加了delay三个就都能发送出来了,这是为什么呢?有没有人能解释一下?
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();
/* 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_DMA_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
HAL_UART_Transmit(&huart1,(uint8_t*)"usart ok\n\r",strlen("usart ok\n\r"),999);
HAL_Delay(10);
HAL_UART_Transmit_DMA(&huart1,(uint8_t *)"usart_DMA ok\n\r",strlen("usart_DMA ok\n\r"));
HAL_Delay(10);
HAL_UART_Transmit_IT(&huart1,(uint8_t*)"usart_IT ok\n\r",strlen("usart_IT ok\n\r"));
/* Infinite loop */
/* USER CODE BEGIN WHILE */