mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/seeedstudio-gd32v: add SPI configuration
This commit is contained in:
parent
ea6a9d3f36
commit
b2c0062393
@ -16,6 +16,7 @@ config BOARD_SEEEDSTUDIO_GD32
|
||||
select BOARD_HAS_LXTAL
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_PWM
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -3,6 +3,7 @@ CPU_MODEL = gd32vf103vbt6
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_pwm
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
|
@ -41,7 +41,7 @@ on-board components:
|
||||
| DAC | 2 x 12-bit channel | no |
|
||||
| UART | 2 | yes |
|
||||
| USART | 3 | yes |
|
||||
| SPI | 3 | no |
|
||||
| SPI | 3 | yes |
|
||||
| I2C | 2 x Fast Mode 400 kHz | yes |
|
||||
| I2S | 2 | no |
|
||||
| CAN | 2 x CAN 2.0B with up to 1 Mbps | no |
|
||||
@ -64,9 +64,13 @@ MCU pins and their configuration in RIOT.
|
||||
|
||||
| MCU Pin | MCU Peripheral | RIOT Peripheral | Board Function | Remark |
|
||||
|:--------|:---------------|:-----------------|:---------------|:-----------------------------|
|
||||
| PA0 | | BTN0 | KEY1 | |
|
||||
| PA0 | BOOT0 | BTN0 | KEY1 | |
|
||||
| PA9 | USART0 TX | UART_DEV(0) TX | UART TX | |
|
||||
| PA10 | USART0 RX | UART_DEV(0) RX | UART RX | |
|
||||
| PA4 | SPI1 CS | SPI_DEV(1) CS | | |
|
||||
| PA5 | SPI1 SCLK | SPI_DEV(1) SCLK | | |
|
||||
| PA6 | SPI1 MISO | SPI_DEV(1) MISO | | |
|
||||
| PA7 | SPI1 MOSI | SPI_DEV(1) MOSI | | |
|
||||
| PB0 | | PWM_DEV(0) CH0 | LED1 green | |
|
||||
| PB1 | | PWM_DEV(0) CH1 | LED2 blue | |
|
||||
| PB5 | | | LED0 red | |
|
||||
@ -76,9 +80,13 @@ MCU pins and their configuration in RIOT.
|
||||
| PB9 | | PWM_DEV(1) CH1 | | N/A if CAN is used |
|
||||
| PB10 | I2C1 SCL | I2C_DEV(1) SCL | | |
|
||||
| PB11 | I2C1 SDA | I2C_DEV(1) SDA | | |
|
||||
| PB12 | SPI0 CS | SPI_DEV(0) CS | | |
|
||||
| PB13 | SPI0 SCLK | SPI_DEV(0) SCLK | | |
|
||||
| PB14 | SPI0 MISO | SPI_DEV(0) MISO | | |
|
||||
| PB15 | SPI0 MOSI | SPI_DEV(0) MOSI | | |
|
||||
| PC13 | | BTN1 | KEY2 | |
|
||||
|
||||
## Flash the board
|
||||
## Flashing the Device
|
||||
|
||||
The board is flashed via a JTAG interface with OpenOCD (at least [release version 0.12.0]
|
||||
(https://github.com/openocd-org/openocd/tree/9ea7f3d647c8ecf6b0f1424002dfc3f4504a162c)).
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "periph_common_conf.h"
|
||||
|
||||
#include "cfg_i2c_default.h"
|
||||
#include "cfg_spi_default.h"
|
||||
#include "cfg_timer_default.h"
|
||||
#include "cfg_uart_default.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user