本帖最后由 Ketose 于 2016-11-16 23:38 编辑
在NUCLEO-F412ZG上使用串口时发现的:
串口使用USART3,115200 8 NONE 1
while (1)
{
while(HAL_UART_GetState(&huart3) != HAL_UART_STATE_READY);
HAL_UART_Transmit(&huart3,(uint8_t*)"UserA button pressed.\r\n",25,100);
while(HAL_UART_GetState(&huart3) != HAL_UART_STATE_READY);
HAL_UART_Transmit(&huart3,(uint8_t*)"UserB button pressed.\r\n",25,100);
HAL_Delay(1000);
}
按说应该是串口输出:
UserA button pressed.
UserB button pressed.
可是结果并不是想象的那样,大家有没有遇到过。是我哪里没有弄对?还是HAL 的BUG?
|