nucleo-f413zh: Add DMA config for SPI
This commit is contained in:
parent
61830480e9
commit
2028a97db6
@ -3,6 +3,7 @@ CPU_MODEL = stm32f413zh
|
|||||||
|
|
||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_adc
|
FEATURES_PROVIDED += periph_adc
|
||||||
|
FEATURES_PROVIDED += periph_dma
|
||||||
FEATURES_PROVIDED += periph_can
|
FEATURES_PROVIDED += periph_can
|
||||||
FEATURES_PROVIDED += periph_dma
|
FEATURES_PROVIDED += periph_dma
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
|
|||||||
@ -38,18 +38,12 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#ifdef MODULE_PERIPH_DMA
|
#ifdef MODULE_PERIPH_DMA
|
||||||
static const dma_conf_t dma_config[] = {
|
static const dma_conf_t dma_config[] = {
|
||||||
{ .stream = 4 },
|
{ .stream = 11 }, /* DMA2 Stream 3 - SPI1_TX */
|
||||||
{ .stream = 14 },
|
{ .stream = 10 }, /* DMA2 Stream 2 - SPI1_RX */
|
||||||
{ .stream = 6 },
|
|
||||||
{ .stream = 10 },
|
|
||||||
{ .stream = 8 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DMA_0_ISR isr_dma1_stream4
|
#define DMA_0_ISR isr_dma2_stream3
|
||||||
#define DMA_1_ISR isr_dma2_stream6
|
#define DMA_1_ISR isr_dma2_stream2
|
||||||
#define DMA_2_ISR isr_dma1_stream6
|
|
||||||
#define DMA_3_ISR isr_dma2_stream2
|
|
||||||
#define DMA_4_ISR isr_dma2_stream0
|
|
||||||
|
|
||||||
#define DMA_NUMOF ARRAY_SIZE(dma_config)
|
#define DMA_NUMOF ARRAY_SIZE(dma_config)
|
||||||
#endif
|
#endif
|
||||||
@ -179,9 +173,9 @@ static const spi_conf_t spi_config[] = {
|
|||||||
.rccmask = RCC_APB2ENR_SPI1EN,
|
.rccmask = RCC_APB2ENR_SPI1EN,
|
||||||
.apbbus = APB2,
|
.apbbus = APB2,
|
||||||
#ifdef MODULE_PERIPH_DMA
|
#ifdef MODULE_PERIPH_DMA
|
||||||
.tx_dma = 3,
|
.tx_dma = 0,
|
||||||
.tx_dma_chan = 2,
|
.tx_dma_chan = 3,
|
||||||
.rx_dma = 4,
|
.rx_dma = 1,
|
||||||
.rx_dma_chan = 3,
|
.rx_dma_chan = 3,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user