diff --git a/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h index 7c8db5425..f7eb5a691 100644 --- a/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h +++ b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h @@ -100,17 +100,12 @@ * I2C driver system settings. */ #define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE #define STM32_I2C_BUSY_TIMEOUT 50 #define STM32_I2C_I2C1_IRQ_PRIORITY 3 -#define STM32_I2C_I2C2_IRQ_PRIORITY 3 #define STM32_I2C_USE_DMA TRUE #define STM32_I2C_I2C1_DMA_PRIORITY 1 -#define STM32_I2C_I2C2_DMA_PRIORITY 1 #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") /* @@ -135,15 +130,10 @@ * SPI driver system settings. */ #define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 #define STM32_SPI_SPI1_IRQ_PRIORITY 1 -#define STM32_SPI_SPI2_IRQ_PRIORITY 1 #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") /* diff --git a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc index 1de459746..7c800b4ad 100644 --- a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc +++ b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma1_ch4567.inc @@ -64,14 +64,20 @@ OSAL_IRQ_HANDLER(STM32_DMA1_CH4567_HANDLER) { /* Check on channel 4.*/ dmaServeInterrupt(STM32_DMA1_STREAM4); +#if STM32_DMA1_NUM_CHANNELS >= 5 /* Check on channel 5.*/ dmaServeInterrupt(STM32_DMA1_STREAM5); +#endif +#if STM32_DMA1_NUM_CHANNELS >= 6 /* Check on channel 6.*/ dmaServeInterrupt(STM32_DMA1_STREAM6); +#endif +#if STM32_DMA1_NUM_CHANNELS >= 7 /* Check on channel 7.*/ dmaServeInterrupt(STM32_DMA1_STREAM7); +#endif OSAL_IRQ_EPILOGUE(); } diff --git a/readme.txt b/readme.txt index c02f740d7..bf11d85cf 100644 --- a/readme.txt +++ b/readme.txt @@ -77,6 +77,8 @@ - NEW: EFL driver and demo for STM32F3xx. - NEW: New unit test subsystem under /os/test. Now it is officially ChibiOS/TEST. +- FIX: Fixed DMAv1 compile fail on STM32L011 (bug #1181) + (TBP)(backported to 20.3.4). - FIX: Fixed error in STM32_ADCCLK_MIN for STM32F37x/hal_lld.h (bug #1180) (TBP)(backported to 20.3.4). - FIX: Fixed direct calls to RT in STM32 RTCv2 and RTCv3 (bug #1179)