stm32g4: add support for DMA (DMAMUX)

This commit is contained in:
raiden00pl 2021-04-12 21:56:52 +02:00 committed by Alan Carvalho de Assis
parent ad43d9e8f3
commit bf04ef9a3c
5 changed files with 1526 additions and 2 deletions

View File

@ -1927,6 +1927,19 @@ config STM32_STM32F469
config STM32_STM32G4XXX
bool
default n
select STM32_HAVE_DMAMUX
config STM32_STM32G4_CAT2
bool
default n
config STM32_STM32G4_CAT3
bool
default n
config STM32_STM32G4_CAT4
bool
default n
config STM32_STM32G4XXK
bool
@ -1960,6 +1973,7 @@ config STM32_STM32G43XX
bool
default n
select STM32_STM32G4XXX
select STM32_STM32G4_CAT2
select ARCH_CORTEXM4
select ARCH_HAVE_FPU
select STM32_HAVE_ADC2
@ -2030,6 +2044,7 @@ config STM32_STM32G47XX
bool
default n
select STM32_STM32G4XXX
select STM32_STM32G4_CAT3
select ARCH_CORTEXM4
select ARCH_HAVE_FPU
select STM32_HAVE_ADC2
@ -2174,6 +2189,10 @@ config STM32_HAVE_DMA2_CHAN678
bool
default n
config STM32_HAVE_DMAMUX
bool
default n
config STM32_HAVE_UCPD
bool
default n
@ -2758,14 +2777,22 @@ config STM32_CRYP
config STM32_DMA1
bool "DMA1"
default n
select STM32_DMA
select ARCH_DMA
config STM32_DMA2
bool "DMA2"
default n
select STM32_DMA
select ARCH_DMA
depends on !STM32_VALUELINE || (STM32_VALUELINE && STM32_HIGHDENSITY)
config STM32_DMAMUX1
bool "DMAMUX1"
default n
depends on STM32_HAVE_DMAMUX
select STM32_DMAMUX
config STM32_DAC1
bool "DAC1"
default n
@ -3286,6 +3313,12 @@ config STM32_SDADC
config STM32_DAC
bool
config STM32_DMA
bool
config STM32_DMAMUX
bool
config STM32_SPI
bool

View File

@ -78,11 +78,15 @@ endif
CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c
CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c
CHIP_CSRCS += stm32_irq.c stm32_dma.c stm32_lowputc.c
CHIP_CSRCS += stm32_irq.c stm32_lowputc.c
CHIP_CSRCS += stm32_serial.c stm32_spi.c stm32_i2s.c stm32_sdio.c stm32_tim.c
CHIP_CSRCS += stm32_waste.c stm32_ccm.c stm32_uid.c stm32_capture.c
CHIP_CSRCS += stm32_dfumode.c
ifeq ($(CONFIG_STM32_DMA),y)
CHIP_CSRCS += stm32_dma.c
endif
ifeq ($(CONFIG_TIMER),y)
CHIP_CSRCS += stm32_tim_lowerhalf.c
endif

View File

@ -37,7 +37,11 @@
*/
#if defined(CONFIG_STM32_HAVE_IP_DMA_V1)
# include "stm32_dma_v1.c"
# if defined(CONFIG_STM32_HAVE_DMAMUX)
# include "stm32_dma_v1mux.c"
# else
# include "stm32_dma_v1.c"
# endif
#elif defined(CONFIG_STM32_HAVE_IP_DMA_V2)
# include "stm32_dma_v2.c"
#endif

View File

@ -47,6 +47,10 @@
#include "hardware/stm32_dma.h"
#ifdef CONFIG_STM32_HAVE_DMAMUX
# include "hardware/stm32_dmamux.h"
#endif
/* These definitions provide the bit encoding of the 'status' parameter
* passed to the DMA callback function (see dma_callback_t).
*/

File diff suppressed because it is too large Load Diff