Skip to content

Added Serial4 (USART2) and updated compiler #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
Update UARTClass.cpp
  • Loading branch information
vChavezB authored Dec 23, 2021
commit 928292e02f7f7f3ab3b67a8587584f498d38a39a
4 changes: 2 additions & 2 deletions cores/arduino/UARTClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ void UARTClass::init(const uint32_t dwBaudRate, const uint32_t modeReg)
*/
if((Usart*)_pUart == USART2)
{
PIOB->PIO_ABSR = (0x0u);
PIOD->PIO_ABSR = PIO_ABSR_P4 | PIO_ABSR_P5;
/* Select Peripheral A for USART 2 pins */
PIOB->PIO_ABSR &= (~(PIO_PB20A_TXD2 | PIO_PB21A_RXD2)) ;
}

// Enable UART interrupt in NVIC
Expand Down