From 4847e0d1e643e11aaa3022336a03b243e772c158 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 5 Sep 2018 15:52:04 -0700 Subject: [PATCH] samd: uart ports updated for bm-sam hw --- src/platforms/samd/usbuart.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platforms/samd/usbuart.c b/src/platforms/samd/usbuart.c index 867e6396..c9a1bed2 100644 --- a/src/platforms/samd/usbuart.c +++ b/src/platforms/samd/usbuart.c @@ -85,7 +85,11 @@ void usbuart_init(void) set_periph_clk(GCLK0, GCLK_ID_SERCOM0_CORE); periph_clk_en(GCLK_ID_SERCOM0_CORE, 1); - usart_enable(USART_NUM, current_baud); + //usart_enable(USART_NUM, current_baud); + usart_setup(USART_NUM, current_baud); + usart_set_pads(USART_NUM, 3, 0); /* uses different pads than the default */ + usart_enable(USART_NUM, 0); /* baud==0 so setup is skipped */ + usart_enable_rx_interrupt(USART_NUM); usart_enable_tx_interrupt(USART_NUM); }