From 9d2647ec8bf0c74921cd6dec3a018405bc1b3e78 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 2 Nov 2021 14:28:52 +0100 Subject: [PATCH] boards/stk3200: Fix spi config The spi bus for the stk3200 doesn't actually work. Other efm32 based boards do work. After some guessing and some checking it turns out that the .loc is wrong. The original was USART_ROUTE_LOCATION_LOC1, which appears in other periph_conf. After changing it to USART_ROUTE_LOCATION_LOC2 the spi bus actually outputs data. --- boards/stk3200/include/periph_conf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boards/stk3200/include/periph_conf.h b/boards/stk3200/include/periph_conf.h index 90fa76cb75..aec7d80889 100644 --- a/boards/stk3200/include/periph_conf.h +++ b/boards/stk3200/include/periph_conf.h @@ -107,6 +107,7 @@ static const i2c_conf_t i2c_config[] = { /** * @name SPI configuration + * * @{ */ static const spi_dev_t spi_config[] = { @@ -115,7 +116,8 @@ static const spi_dev_t spi_config[] = { .mosi_pin = GPIO_PIN(PD, 7), .miso_pin = GPIO_PIN(PD, 6), .clk_pin = GPIO_PIN(PC, 15), - .loc = USART_ROUTE_LOCATION_LOC1, +/* page 81 https://www.silabs.com/documents/public/data-sheets/efm32zg-datasheet.pdf */ + .loc = USART_ROUTE_LOCATION_LOC3, .cmu = cmuClock_USART1, .irq = USART1_RX_IRQn }