From 9bfcb80e61e0f9fe5c4ff88b9ceca02f8ed6fc03 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 16 Sep 2018 08:18:17 +0000 Subject: Imported I2Cv3 driver in L4+ HAL. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12266 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- .../multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h | 23 +++++++++++++++++++--- .../multi/SPI/cfg/stm32l4r5_nucleo144/portab.c | 8 ++++---- 2 files changed, 24 insertions(+), 7 deletions(-) (limited to 'testhal') 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); } -- cgit v1.2.3