STM32 串口 无法 进入 中断

  

串口 配置 , NVIC , GPIO 也 , 无法 进入 串口 串口 串口 串口---------------------------------------- ------- * //* USART1 configurado de la siguiente manera: - BaudRate = 115200 baudios - Word
Length = 8 Bits- One Stop Bit- Sin paridad- Control de flujo de hardware desactivado (señales RTS y CTS) - Recepción y transmisión habilitadas - USART Reloj deshabilitado - USART CPOL: reloj activo bajo. USART CPHA: datos capturados en el medio - USART LastBit: el pulso de reloj del último bit de datos no se envía

al pin SCLK * /USART_ClockInitStructure.USART_Clock = USART_Clock_Disable; USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low; USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge; USART_ClockInitStructure. ClockInit (USARTx, &USART_ClockInitStructure); USART_InitStructure.USART_BaudRate = cota; //115200; USART_InitStructure.USART_WordLength = USART_WordLength_8b; USART_InitStructure.USART_StopBits = USART_StopBits_1; USART_InitStructure.USART_Parity = USART_Parity_No; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx |  USART_Mode_Tx; /* Configura los parámetros básicos y asíncronos de USART1 * /USART_Init (USARTx, &USART_InitStructure); /* Habilita la función de recepción y transmisión de USIT1; * Habilitar USART1 * /USART_Cmd (USARTx, ENABLE);

, 注 //USART_ITConfig(USARTx, USART_IT_TXE, ENABLE);

应该是 二者 不能 同时 同时 使。enen

Copyright © Conocimiento de Windows All Rights Reserved