From 6a4828edab012f1409dfe1458716aec52ea674ff Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Sun, 5 Feb 2023 19:12:16 +0100 Subject: [PATCH] boards/seeedstudio-gd32: improve peripherals doc Available peripherals for the board are now shown ordered by RIOT peripheral names and by pins. --- boards/seeedstudio-gd32/doc.txt | 124 ++++++++++++++++++++++---------- 1 file changed, 86 insertions(+), 38 deletions(-) diff --git a/boards/seeedstudio-gd32/doc.txt b/boards/seeedstudio-gd32/doc.txt index 4fa5666de974a..e3a6fcbfdedc1 100644 --- a/boards/seeedstudio-gd32/doc.txt +++ b/boards/seeedstudio-gd32/doc.txt @@ -32,7 +32,7 @@ on-board components: | RAM | 32 kByte | | | Flash | 128 KByte | | | Frequency | 108 MHz | | -| Power Modes | 3 (Sleep, Deep Sleep, Standby) | no | +| Power Modes | 3 (Sleep, Deep Sleep, Standby) | yes | | GPIOs | 80 | yes | | Timers | 5 x 16-bit timer | yes | | RTC | 1 x 32-bit counter, 20-bit prescaler | yes | @@ -59,43 +59,91 @@ The general pin layout is shown below. @image html "https://raw.githubusercontent.com/SeeedDocument/GD32VF103/master/img/GD32VF-103VBT6-c.jpg" "Seeedstudio GD32 RISC-V Dev Board Pinout" width=600 -The following table shows the connection of the on-board components with the -MCU pins and their configuration in RIOT. - -| MCU Pin | MCU Peripheral | RIOT Peripheral | Board Function | Remark | -|:--------|:---------------|:-----------------|:---------------|:-----------------------------| -| PA0 | BOOT0 | BTN0 | KEY1 | | -| PA1 | ADC01_IN1 | ADC_LINE(0) | | | -| PA2 | ADC01_IN2 | ADC_LINE(1) | | | -| PA3 | ADC01_IN3 | ADC_LINE(2) | | | -| 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 | | -| PB6 | I2C0 SCL | I2C_DEV(0) SCL | | | -| PB7 | I2C0 SDA | I2C_DEV(0) SDA | | | -| PB8 | | PWM_DEV(1) CH0 | | N/A if CAN is used | -| 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 | | | -| PC0 | ADC01_IN10 | ADC_LINE(3) | | | -| PC1 | ADC01_IN11 | ADC_LINE(4) | | | -| PC2 | ADC01_IN12 | ADC_LINE(5) | | | -| PC3 | ADC01_IN13 | ADC_LINE(6) | | | -| PC4 | ADC01_IN14 | ADC_LINE(7) | | | -| PC5 | ADC01_IN15 | ADC_LINE(8) | | | -| PC13 | | BTN1 | KEY2 | | -| - | ADC01_IN16 | ADC_LINE(9) | | internal Temperature channel | -| - | ADC01_IN17 | ADC_LINE(10) | | internal VFEF channel | +The following tables show the connection of the on-board components with the +MCU pins and their configuration in RIOT sorted by RIOT peripherals and +by pins. + +| RIOT Peripheral | MCU Pin | MCU Peripheral | Board Function | Remark | +|:-----------------|:--------|:---------------|:---------------|:-----------------------------| +| ADC_LINE(0) | PA1 | ADC01_IN1 | | | +| ADC_LINE(1) | PA2 | ADC01_IN2 | | | +| ADC_LINE(2) | PA3 | ADC01_IN3 | | | +| ADC_LINE(3) | PC0 | ADC01_IN10 | | | +| ADC_LINE(4) | PC1 | ADC01_IN11 | | | +| ADC_LINE(5) | PC2 | ADC01_IN12 | | | +| ADC_LINE(6) | PC3 | ADC01_IN13 | | | +| ADC_LINE(7) | PC4 | ADC01_IN14 | | | +| ADC_LINE(8) | PC5 | ADC01_IN15 | | | +| ADC_LINE(9) | - | ADC01_IN16 | | internal Temperature channel | +| ADC_LINE(10) | - | ADC01_IN17 | | internal VFEF channel | +| BTN0 | PA0 | BOOT0 | KEY1 | | +| BTN1 | PC13 | | KEY2 | | +| I2C_DEV(0) SCL | PB6 | I2C0 SCL | | | +| I2C_DEV(0) SDA | PB7 | I2C0 SDA | | | +| I2C_DEV(1) SCL | PB10 | I2C1 SCL | | | +| I2C_DEV(1) SDA | PB11 | I2C1 SDA | | | +| LED0 | PB5 | | LED red | | +| LED1 | PB0 | | LED green | | +| LED2 | PB1 | | LED blue | | +| PWM_DEV(0) CH0 | PB0 | | LED1 green | | +| PWM_DEV(0) CH1 | PB1 | | LED2 blue | | +| PWM_DEV(1) CH0 | PB8 | | | N/A if CAN is used | +| PWM_DEV(1) CH1 | PB9 | | | N/A if CAN is used | +| SPI_DEV(0) CS | PB12 | SPI0 CS | | | +| SPI_DEV(0) SCLK | PB13 | SPI0 SCLK | | | +| SPI_DEV(0) MISO | PB14 | SPI0 MISO | | | +| SPI_DEV(0) MOSI | PB15 | SPI0 MOSI | | | +| SPI_DEV(1) CS | PA4 | SPI1 CS | | | +| SPI_DEV(1) SCLK | PA5 | SPI1 SCLK | | | +| SPI_DEV(1) MISO | PA6 | SPI1 MISO | | | +| SPI_DEV(1) MOSI | PA7 | SPI1 MOSI | | | +| UART_DEV(0) TX | PA9 | USART0 TX | UART TX | | +| UART_DEV(0) RX | PA10 | USART0 RX | UART RX | | + +| Pin | Board Function | RIOT Function 1 | RIOT Function 2 | RIOT Function 3 | +|:-----|:---------------|:----------------|:----------------|:----------------| +| PA0 | KEY1 | | | BTN0 | +| PA1 | | | ADC_LINE(0) | | +| PA2 | | | ADC_LINE(1) | | +| PA3 | | | ADC_LINE(2) | | +| PA4 | FLASH CS | SPI_DEV(1) CS | | | +| PA5 | FLASH SCK | SPI_DEV(1) SCLK | | | +| PA6 | FLASH MISO | SPI_DEV(1) MISO | | | +| PA7 | FLASH MOSI | SPI_DEV(1) MOSI | | | +| PA8 | | | | | +| PA9 | | UART_DEV(0) TX | | | +| PA10 | | UART_DEV(0) RX | | | +| PA11 | USB D- | | | | +| PA12 | USB D+ | | | | +| PA13 | JTAG TMS | | | | +| PA14 | JTAG TCK | | | | +| PA15 | JTAG TDI | | | | +| PB0 | LED green | PWM_DEV(0) CH0 | | LED1 | +| PB1 | LED blue | PWM_DEV(0) CH1 | | LED2 | +| PB3 | JTAG TDO | | | | +| PB4 | JTAG NRST | | | | +| PB5 | LED red | | | LED3 | +| PB6 | | I2C_DEV(0) SCL | | | +| PB7 | | I2C_DEV(0) SDA | | | +| PB8 | | PWM_DEV(1) CH0 | | | +| PB9 | | PWM_DEV(1) CH1 | | | +| PB10 | | I2C_DEV(1) SCL | | | +| PB11 | | I2C_DEV(1) SDA | | | +| PB12 | SD CS | SPI_DEV(0) CS | | | +| PB13 | SD SCK | SPI_DEV(0) SCLK | | | +| PB14 | SD MISO | SPI_DEV(0) MISO | | | +| PB15 | SD MOSI | SPI_DEV(0) MOSI | | | +| PC0 | | | ADC_LINE(3) | | +| PC1 | | | ADC_LINE(4) | | +| PC2 | | | ADC_LINE(5) | | +| PC3 | | | ADC_LINE(6) | | +| PC4 | | | ADC_LINE(7) | | +| PC5 | | | ADC_LINE(8) | | +| PC13 | KEY2 | | | BTN1 | +| - | Temperatur | | ADC_LINE(9) | | +| - | VREF | | ADC_LINE(10) | | + +All other pins are either not broken out or have no special usage. ## Flashing the Device