udiv = (uclk+baudval/2U)/baudval;
intdiv = udiv & 0x0000fff0U;
fradiv = udiv & 0x0000000fU;
}
USART_BAUD(usart_periph) = ((USART_BAUD_FRADIV | USART_BAUD_INTDIV) & (intdiv | fradiv));
跟中代码发现走的上面的过程 uclk = 180000000 , intdiv = ? fradiv = ?
1. intdiv = 456,fradiv=8
2. intdiv = 65440,fradiv=8
|