summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3210e-eval
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/stm3210e-eval')
-rwxr-xr-xnuttx/configs/stm3210e-eval/src/up_spi.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/up_spi.c b/nuttx/configs/stm3210e-eval/src/up_spi.c
index 4173bbc6a..75c27c40d 100755
--- a/nuttx/configs/stm3210e-eval/src/up_spi.c
+++ b/nuttx/configs/stm3210e-eval/src/up_spi.c
@@ -93,7 +93,9 @@
void weak_function stm32_spiinitialize(void)
{
-#ifdef CONFIG_STM32_SPI1
+ /* NOTE: Clocking for SPI1 and/or SPI2 was already provided in stm32_rcc.c */
+
+#ifdef CONFIG_STM32_SPI1
/* Configure SPI1 alternate function pins */
stm32_configgpio(GPIO_SPI1_SCK);
@@ -104,6 +106,14 @@ void weak_function stm32_spiinitialize(void)
stm32_configgpio(GPIO_MMCSD_CS);
stm32_configgpio(GPIO_FLASH_CS);
+#endif
+#ifdef CONFIG_STM32_SPI2
+ /* Configure SPI1 alternate function pins */
+
+ stm32_configgpio(GPIO_SPI2_SCK);
+ stm32_configgpio(GPIO_SPI3_MISO);
+ stm32_configgpio(GPIO_SPI4_MOSI);
+
#endif
}