diff options
| author | Matt Trentini <matt.trentini@gmail.com> | 2025-07-01 08:17:09 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-07-08 13:57:58 +1000 |
| commit | 42cfa7cdaeef455e3744ee8a21a5a423926e211f (patch) | |
| tree | 07e28b60ccfdcc97bed372bddd3755e013141078 | |
| parent | f3c56c81eaeb197e7765514b8e3c3aed731f8c5f (diff) | |
stm32/dma: Extend STM32H5 DMA use to SPI3 and SPI4.
Attempting to configure SPI3 and SPI4 for the STM32H5 would fail with a
linker error. This patch resolves that, ensuring that appropriate DMA
channels are assigned to those SPI resources.
Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
| -rw-r--r-- | ports/stm32/dma.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ports/stm32/dma.c b/ports/stm32/dma.c index df8a408cb..53c53868c 100644 --- a/ports/stm32/dma.c +++ b/ports/stm32/dma.c @@ -735,9 +735,13 @@ const dma_descr_t dma_SPI_1_RX = { GPDMA1_Channel0, GPDMA1_REQUEST_SPI1_RX, dma_ const dma_descr_t dma_SPI_1_TX = { GPDMA1_Channel1, GPDMA1_REQUEST_SPI1_TX, dma_id_1, &dma_init_struct_spi_i2c }; const dma_descr_t dma_SPI_2_RX = { GPDMA1_Channel2, GPDMA1_REQUEST_SPI2_RX, dma_id_2, &dma_init_struct_spi_i2c }; const dma_descr_t dma_SPI_2_TX = { GPDMA1_Channel3, GPDMA1_REQUEST_SPI2_TX, dma_id_3, &dma_init_struct_spi_i2c }; +const dma_descr_t dma_SPI_3_RX = { GPDMA1_Channel4, GPDMA1_REQUEST_SPI3_RX, dma_id_4, &dma_init_struct_spi_i2c }; +const dma_descr_t dma_SPI_3_TX = { GPDMA1_Channel5, GPDMA1_REQUEST_SPI3_TX, dma_id_5, &dma_init_struct_spi_i2c }; +const dma_descr_t dma_SPI_4_RX = { GPDMA1_Channel6, GPDMA1_REQUEST_SPI4_RX, dma_id_6, &dma_init_struct_spi_i2c }; +const dma_descr_t dma_SPI_4_TX = { GPDMA1_Channel7, GPDMA1_REQUEST_SPI4_TX, dma_id_7, &dma_init_struct_spi_i2c }; #if MICROPY_HW_ENABLE_DAC -const dma_descr_t dma_DAC_1_TX = { GPDMA1_Channel4, GPDMA1_REQUEST_DAC1_CH1, dma_id_4, &dma_init_struct_dac }; -const dma_descr_t dma_DAC_2_TX = { GPDMA1_Channel5, GPDMA1_REQUEST_DAC1_CH2, dma_id_5, &dma_init_struct_dac }; +const dma_descr_t dma_DAC_1_TX = { GPDMA2_Channel0, GPDMA1_REQUEST_DAC1_CH1, dma_id_8, &dma_init_struct_dac }; +const dma_descr_t dma_DAC_2_TX = { GPDMA2_Channel1, GPDMA1_REQUEST_DAC1_CH2, dma_id_9, &dma_init_struct_dac }; #endif static const uint8_t dma_irqn[NSTREAM] = { |
