fix baudrate setting

This commit is contained in:
kkitayam 2021-06-26 21:13:35 +09:00
parent dccb3b1a46
commit 60fedaa050
1 changed files with 17 additions and 15 deletions

View File

@ -201,7 +201,9 @@ void board_init(void)
SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY | SYSTEM_PRCR_PRC1;
MSTP(SCI5) = 0;
SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY;
SCI5.BRR = ((SCI_PCLK * 1.0) / (32.0 * 115200.0)) - 1;
SCI5.SEMR.BIT.ABCS = 1;
SCI5.SEMR.BIT.BGDM = 1;
SCI5.BRR = (SCI_PCLK / (8 * 115200)) - 1;
IR(SCI5, RXI5) = 0;
IR(SCI5, TXI5) = 0;
IS(SCI5, TEI5) = 0;