mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/b-l4753-iot0a1: Add SPI2 and SPI3 buses
SPI2 is exposed on the PMOD connector, SPI3 is used internally to communicate with the radio modules onboard
This commit is contained in:
parent
fd7c185653
commit
ce31f840b1
@ -40,14 +40,20 @@ extern "C" {
|
||||
static const dma_conf_t dma_config[] = {
|
||||
{ .stream = 1 }, /* DMA1 Channel 2 - SPI1_RX */
|
||||
{ .stream = 2 }, /* DMA1 Channel 3 - SPI1_TX */
|
||||
{ .stream = 3 }, /* DMA1 Channel 4 - USART1_TX */
|
||||
{ .stream = 3 }, /* DMA1 Channel 4 - USART1_TX / SPI2_RX */
|
||||
{ .stream = 4 }, /* DMA1 Channel 5 - SPI2_TX */
|
||||
{ .stream = 8 }, /* DMA2 Channel 1 - SPI3_RX */
|
||||
{ .stream = 9 }, /* DMA2 Channel 2 - SPI3_TX */
|
||||
{ .stream = 10 }, /* DMA2 Channel 3 - UART4_TX */
|
||||
};
|
||||
|
||||
#define DMA_0_ISR isr_dma1_channel2
|
||||
#define DMA_1_ISR isr_dma1_channel3
|
||||
#define DMA_2_ISR isr_dma1_channel4
|
||||
#define DMA_3_ISR isr_dma2_channel3
|
||||
#define DMA_3_ISR isr_dma1_channel5
|
||||
#define DMA_4_ISR isr_dma2_channel1
|
||||
#define DMA_5_ISR isr_dma2_channel2
|
||||
#define DMA_6_ISR isr_dma2_channel3
|
||||
|
||||
#define DMA_NUMOF ARRAY_SIZE(dma_config)
|
||||
/** @} */
|
||||
@ -104,7 +110,7 @@ static const uart_conf_t uart_config[] = {
|
||||
.type = STM32_USART,
|
||||
.clk_src = 0, /* Use APB clock */
|
||||
#ifdef MODULE_PERIPH_DMA
|
||||
.dma = 3,
|
||||
.dma = 6,
|
||||
.dma_chan = 2
|
||||
#endif
|
||||
}
|
||||
@ -158,6 +164,44 @@ static const spi_conf_t spi_config[] = {
|
||||
.tx_dma_chan = 1,
|
||||
.rx_dma = 0,
|
||||
.rx_dma_chan = 1,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.dev = SPI2,
|
||||
.mosi_pin = GPIO_PIN(PORT_D, 4),
|
||||
.miso_pin = GPIO_PIN(PORT_D, 3),
|
||||
.sclk_pin = GPIO_PIN(PORT_D, 1),
|
||||
.cs_pin = SPI_CS_UNDEF,
|
||||
.mosi_af = GPIO_AF5,
|
||||
.miso_af = GPIO_AF5,
|
||||
.sclk_af = GPIO_AF5,
|
||||
.cs_af = GPIO_AF5,
|
||||
.rccmask = RCC_APB1ENR1_SPI2EN,
|
||||
.apbbus = APB1,
|
||||
#ifdef MODULE_PERIPH_DMA
|
||||
.tx_dma = 3,
|
||||
.tx_dma_chan = 1,
|
||||
.rx_dma = 2,
|
||||
.rx_dma_chan = 1,
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.dev = SPI3,
|
||||
.mosi_pin = GPIO_PIN(PORT_C, 12),
|
||||
.miso_pin = GPIO_PIN(PORT_C, 11),
|
||||
.sclk_pin = GPIO_PIN(PORT_C, 10),
|
||||
.cs_pin = SPI_CS_UNDEF,
|
||||
.mosi_af = GPIO_AF6,
|
||||
.miso_af = GPIO_AF6,
|
||||
.sclk_af = GPIO_AF6,
|
||||
.cs_af = GPIO_AF6,
|
||||
.rccmask = RCC_APB1ENR1_SPI3EN,
|
||||
.apbbus = APB1,
|
||||
#ifdef MODULE_PERIPH_DMA
|
||||
.tx_dma = 5,
|
||||
.tx_dma_chan = 3,
|
||||
.rx_dma = 4,
|
||||
.rx_dma_chan = 3,
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user