需要一个串口发送数据格式是1个开始位 9个数据位 1个停止位。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
串口配置 使能bit9 关闭PARITY
发送中断修改如下,测试串口发送9bit数据,单步调试发送bit9成功,全速运行bit9一直保持输出0,请问为什么。
HAL_ISR_FUNCTION( halUart0TxIsr, UTX0_VECTOR )
val = isrCfg.txBuf[isrCfg.txHead++];
UTXxIF = 0;
if (val & 0x100){
UxUCR |= UCR_D9;
}else{
UxUCR &= ~UCR_D9;
}
UxDBUF = val;