STM32: USART init changed

This commit is contained in:
pascallanger
2016-11-06 16:34:40 +01:00
parent 22529e28d8
commit 4348f4b0d4
2 changed files with 21 additions and 6 deletions

View File

@@ -938,8 +938,8 @@ void Mprotocol_serial_init()
PORTC.PIN3CTRL |= 0x40 ;
#endif
#elif defined STM32_BOARD
Serial1.begin(100000,SERIAL_8E2);//USART2
Serial2.begin(100000,SERIAL_8E2);//USART3
usart2_begin(100000,SERIAL_8E2);
usart3_begin(100000,SERIAL_8E2);
USART2_BASE->CR1 |= USART_CR1_PCE_BIT;
USART3_BASE->CR1 &= ~ USART_CR1_RE;//disable
USART2_BASE->CR1 &= ~ USART_CR1_TE;//disable transmit