aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-09-16 08:18:17 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-09-16 08:18:17 +0000
commit9bfcb80e61e0f9fe5c4ff88b9ceca02f8ed6fc03 (patch)
treed7ee9aa92a321979f570fccd548471ed549ac4b1 /testhal/STM32
parentfe2fb8757056efa555ed77277de1cc207bb01baa (diff)
downloadChibiOS-9bfcb80e61e0f9fe5c4ff88b9ceca02f8ed6fc03.tar.gz
ChibiOS-9bfcb80e61e0f9fe5c4ff88b9ceca02f8ed6fc03.tar.bz2
ChibiOS-9bfcb80e61e0f9fe5c4ff88b9ceca02f8ed6fc03.zip
Imported I2Cv3 driver in L4+ HAL.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12266 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testhal/STM32')
-rw-r--r--testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h23
-rw-r--r--testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/portab.c8
2 files changed, 24 insertions, 7 deletions
diff --git a/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h b/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h
index 452d1dce3..e02d41c7e 100644
--- a/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h
+++ b/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h
@@ -158,6 +158,23 @@
/*
* I2C driver system settings.
*/
+#define STM32_I2C_USE_I2C1 FALSE
+#define STM32_I2C_USE_I2C2 FALSE
+#define STM32_I2C_USE_I2C3 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_RX_DMA_CHANNEL 6
+#define STM32_I2C_I2C1_TX_DMA_CHANNEL 7
+#define STM32_I2C_I2C2_RX_DMA_CHANNEL 8
+#define STM32_I2C_I2C2_TX_DMA_CHANNEL 9
+#define STM32_I2C_I2C3_RX_DMA_CHANNEL 8
+#define STM32_I2C_I2C3_TX_DMA_CHANNEL 9
+#define STM32_I2C_I2C1_IRQ_PRIORITY 5
+#define STM32_I2C_I2C2_IRQ_PRIORITY 5
+#define STM32_I2C_I2C3_IRQ_PRIORITY 5
+#define STM32_I2C_I2C1_DMA_PRIORITY 3
+#define STM32_I2C_I2C2_DMA_PRIORITY 3
+#define STM32_I2C_I2C3_DMA_PRIORITY 3
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
/*
* ICU driver system settings.
@@ -215,9 +232,9 @@
/*
* SPI driver system settings.
*/
-#define STM32_SPI_USE_SPI1 TRUE
-#define STM32_SPI_USE_SPI2 TRUE
-#define STM32_SPI_USE_SPI3 TRUE
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI2 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_SPI1_RX_DMA_CHANNEL 0
#define STM32_SPI_SPI1_TX_DMA_CHANNEL 1
#define STM32_SPI_SPI2_RX_DMA_CHANNEL 2
diff --git a/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/portab.c b/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/portab.c
index 33aa6aac2..1da5d2e1e 100644
--- a/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/portab.c
+++ b/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/portab.c
@@ -94,13 +94,13 @@ void portab_setup(void) {
* SPI2 I/O pins setup.
*/
palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) |
- PAL_STM32_OSPEED_HIGHEST); /* New SCK. */
+ PAL_STM32_OSPEED_HIGH); /* New SCK. */
palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) |
- PAL_STM32_OSPEED_HIGHEST); /* New MISO. */
+ PAL_STM32_OSPEED_HIGH); /* New MISO. */
palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) |
- PAL_STM32_OSPEED_HIGHEST); /* New MOSI. */
+ PAL_STM32_OSPEED_HIGH); /* New MOSI. */
palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL |
- PAL_STM32_OSPEED_HIGHEST); /* New CS. */
+ PAL_STM32_OSPEED_HIGH); /* New CS. */
palSetPad(GPIOB, 12);
}