From 3ee7b72431416cb0db16c1f57da4806bd638f005 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 19 Feb 2020 17:52:12 +0100 Subject: [PATCH] boards/same54-xpro: don't source peripheral clocks from main clock Use the dedicated 48 MHz clock as a source for the peripheral clocks. This was already done for I2C to allow it to work despite the 120 MHz main clock. Not running the peripherals off the main clock will allow for dynamic re-clocking of the main clock in the future, without affecting the operation of the peripherals. It also gives more flexibility to the main clock selection in general. --- boards/same54-xpro/include/periph_conf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/same54-xpro/include/periph_conf.h b/boards/same54-xpro/include/periph_conf.h index e4195e97f0..b8506880d1 100644 --- a/boards/same54-xpro/include/periph_conf.h +++ b/boards/same54-xpro/include/periph_conf.h @@ -86,7 +86,7 @@ static const uart_conf_t uart_config[] = { .rx_pad = UART_PAD_RX_1, .tx_pad = UART_PAD_TX_0, .flags = UART_FLAG_NONE, - .gclk_src = SAM0_GCLK_MAIN, + .gclk_src = SAM0_GCLK_48MHZ, } }; @@ -112,7 +112,7 @@ static const spi_conf_t spi_config[] = { .clk_mux = GPIO_MUX_C, .miso_pad = SPI_PAD_MISO_3, .mosi_pad = SPI_PAD_MOSI_0_SCK_1, - .gclk_src = SAM0_GCLK_MAIN, + .gclk_src = SAM0_GCLK_48MHZ, } };