Skip to content

Commit 77ee1c5

Browse files
committed
boards/xg23-pk6068a: initial commit
1 parent ee2f5e9 commit 77ee1c5

12 files changed

Lines changed: 564 additions & 0 deletions

File tree

boards/xg23-pk6068a/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2022 SSV Software Systems GmbH
2+
#
3+
# This file is subject to the terms and conditions of the GNU Lesser
4+
# General Public License v2.1. See the file LICENSE in the top level
5+
# directory for more details.
6+
7+
config BOARD
8+
default "xg23-pk6068a" if BOARD_XG23_PK6068A
9+
10+
config BOARD_XG23_PK6068A
11+
bool
12+
default y
13+
select CPU_MODEL_EFR32ZG23A020F512GM48
14+
15+
# Put defined MCU peripherals here (in alphabetical order)
16+
select HAS_PERIPH_I2C
17+
select HAS_PERIPH_SPI
18+
select HAS_PERIPH_TIMER
19+
select HAS_PERIPH_UART
20+
21+
# Put other features for this board (in alphabetical order)
22+
select HAVE_SAUL_GPIO

boards/xg23-pk6068a/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MODULE = board
2+
3+
include $(RIOTBASE)/Makefile.base

boards/xg23-pk6068a/Makefile.dep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ifneq (,$(filter saul_default,$(USEMODULE)))
2+
USEMODULE += saul_gpio
3+
endif
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CPU = efm32
2+
CPU_FAM = efr32zg23
3+
CPU_MODEL = efr32zg23a020f512gm48
4+
5+
# Put defined MCU peripherals here (in alphabetical order)
6+
FEATURES_PROVIDED += periph_i2c
7+
FEATURES_PROVIDED += periph_spi
8+
FEATURES_PROVIDED += periph_timer
9+
FEATURES_PROVIDED += periph_uart
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# use JLink for flashing
2+
PROGRAMMER ?= jlink
3+
JLINK_DEVICE = EFR32ZG23BXXXF512
4+
JLINK_PRE_FLASH = r
5+
FLASH_ADDR = 0x08000000
6+
BAUD ?= 115200

boards/xg23-pk6068a/board.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (C) 2022 SSV Software Systems GmbH
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser
5+
* General Public License v2.1. See the file LICENSE in the top level
6+
* directory for more details.
7+
*/
8+
9+
/**
10+
* @ingroup boards_xg23-pk6068a
11+
* @{
12+
*
13+
* @file
14+
* @brief Board specific implementations for the xG23-PK6068A board
15+
*
16+
* @author Juergen Fitschen <me@jue.yt>
17+
*
18+
* @}
19+
*/
20+
21+
#include "cpu.h"
22+
#include "board.h"
23+
#include "periph/gpio.h"
24+
25+
void board_init(void)
26+
{
27+
/* Enable VCOM iface */
28+
gpio_init(VCOM_EN_PIN, GPIO_OUT);
29+
gpio_set(VCOM_EN_PIN);
30+
31+
#ifndef RIOTBOOT
32+
#ifdef MODULE_SI7021
33+
/* Enable Si7021 sensor */
34+
gpio_init(SI7021_EN_PIN, GPIO_OUT);
35+
gpio_set(SI7021_EN_PIN);
36+
#endif
37+
#endif
38+
}

boards/xg23-pk6068a/doc.txt

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/**
2+
* @defgroup boards_xg23-pk6068a Silicon Labs xG23-PK6068A starter kit
3+
* @ingroup boards
4+
* @brief Support for the xG23-PK6068A board.
5+
6+
## Overview
7+
The EFR32xG23 (xG23) Pro Kit is designed to support the development of Wireless
8+
IoT devices based on Sub-GHz wireless protocols. The Pro Kit includes a radio
9+
board that provides a complete reference design for the EFR32xG23 Wireless SoC,
10+
with the matching network for +20 dBm covering 868 to 915 MHz.
11+
12+
The main board contains an onboard J-Link debugger with a Packet Trace
13+
Interface and a Virtual COM port, enabling application development and
14+
debugging of the attached radio board as well as external hardware through an
15+
expansion header.
16+
17+
## Hardware
18+
19+
### MCU
20+
| MCU | EFR32ZG23 |
21+
|-----------------|--------------------------------------------------------------------------------------------------|
22+
| Family | ARM Cortex-M33 |
23+
| Vendor | Silicon Labs |
24+
| Vendor Family | EFM32 Wireless Gecko |
25+
| RAM | 64.0 KiB |
26+
| Flash | 512.0 KiB |
27+
| EEPROM | no |
28+
| Frequency | up to 78 MHz |
29+
| FPU | yes |
30+
| MPU | no |
31+
| DMA | 8 channels |
32+
| Timers | 4x 16-bits, 1x 32-bits |
33+
| ADCs | 16-bit ADC |
34+
| UARTs | 1x USART, 3x EUSART |
35+
| SPIs | 1x USART |
36+
| I2Cs | 2x |
37+
| Vcc | 1.71 V - 3.8 V |
38+
| Datasheet | [EFR32ZG23](https://www.silabs.com/documents/public/data-sheets/efr32zg23-datasheet.pdf) |
39+
| Manual | [EFR32xG23](https://www.silabs.com/documents/public/reference-manuals/efr32xg23-rm.pdf) |
40+
| Board Manual | [xG23](https://www.silabs.com/documents/public/user-guides/ug507-brd4210a-user-guide.pdf) |
41+
| Board Schematic | [Main Board BRD4001A](https://www.silabs.com/documents/public/schematic-files/BRD4001A-A01-schematic.pdf), [EFR32ZG23 Module BRD4210A](https://www.silabs.com/documents/public/schematic-files/BRD4210A-A01-schematic.pdf) |
42+
43+
### Pinout
44+
45+
This is the pinout of the expansion header on the right side of the board.
46+
PIN 1 is the bottom-left contact when the header faces you horizontally.
47+
48+
| | PIN | PIN | |
49+
|------|-----|-----|------|
50+
| 3V3 | 20 | 19 | RES |
51+
| 5V | 18 | 17 | RES |
52+
| PC7 | 16 | 15 | PC5 |
53+
| PA9 | 14 | 13 | PA7 |
54+
| PA8 | 12 | 11 | PA6 |
55+
| PC0 | 10 | 9 | PD2 |
56+
| PC3 | 8 | 7 | PA5 |
57+
| PC2 | 6 | 5 | PA0 |
58+
| PC1 | 4 | 3 | PA10 |
59+
| VMCU | 2 | 1 | GND |
60+
61+
62+
### Peripheral mapping
63+
| Peripheral | Number | Hardware | Pins | Comments | Min. Power Mode |
64+
|------------|---------|-----------------|--------------------------------|----------------------------------|-----------------|
65+
| I2C | 0 | I2C0 | SDA: PC7, CLK: PC5 | | EM1 |
66+
| SPI | 0 | USART0 | MOSI: PC1, MISO: PC2, CLK: PC3 | PC4 used as CS for Serial Flash | EM1 |
67+
| Timer | 0 | TIMER0 | | Default ztimer backend | EM1 |
68+
| | 1 | LETIMER0 | | | EM3 |
69+
| UART | 0 | EUSART1 | RX: PA9, TX: PA8 | Default STDIO output | EM1 |
70+
71+
### User interface
72+
| Peripheral | Mapped to | Pin | Comments |
73+
|------------|-----------|------|------------|
74+
| Button | PB0 | PB1 | |
75+
| | PB1 | PB3 | |
76+
| LED | LED0 | PB2 | Yellow LED |
77+
| | LED1 | PD3 | Yellow LED |
78+
79+
## Implementation Status
80+
| Device | ID | Supported | Comments |
81+
|-------------------------------|-------------|-----------|----------------------------------------------------------------|
82+
| MCU | EFR32ZG | yes | Power modes supported |
83+
| Low-level driver | ADC | no | |
84+
| | Flash | yes | |
85+
| | GPIO | yes | Interrupts are shared across pins (see reference manual) |
86+
| | HW Crypto | partially | Only hwrng |
87+
| | I2C | yes | |
88+
| | PWM | no | |
89+
| | RTC | no | As RTT or RTC |
90+
| | SPI | partially | Only master mode |
91+
| | Timer | yes | |
92+
| | UART | yes | |
93+
| LCD driver | LS013B7DH03 | yes | Sharp Low Power Memory LCD via the U8g2 package |
94+
| Temperature + humidity sensor | Si7021 | yes | Silicon Labs Temperature + Humidity sensor |
95+
96+
## Flashing the device
97+
To flash, [SEGGER JLink](https://www.segger.com/jlink-software.html) is
98+
required.
99+
100+
Flashing is supported by RIOT-OS using the command below:
101+
102+
```
103+
make flash
104+
```
105+
106+
To run the GDB debugger, use the command:
107+
108+
```
109+
make debug
110+
```
111+
112+
Or, to connect with your own debugger:
113+
114+
```
115+
make debug-server
116+
```
117+
118+
## License information
119+
* Silicon Labs' EMLIB: zlib-style license (permits distribution of source).
120+
121+
*/
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* Copyright (C) 2022 SSV Software Systems GmbH
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser
5+
* General Public License v2.1. See the file LICENSE in the top level
6+
* directory for more details.
7+
*/
8+
9+
/**
10+
* @ingroup boards_xg23-pk6068a
11+
* @{
12+
*
13+
* @file
14+
* @brief Board specific definitions for the xG23-PK6068A
15+
*
16+
* @author Juergen Fitschen <me@jue.yt>
17+
*/
18+
19+
#ifndef BOARD_H
20+
#define BOARD_H
21+
22+
#include "cpu.h"
23+
#include "periph_conf.h"
24+
#include "periph_cpu.h"
25+
#include "periph/gpio.h"
26+
27+
#ifdef __cplusplus
28+
extern "C" {
29+
#endif
30+
31+
/**
32+
* @brief Initialize pm_layered with no pre-defined blockers
33+
*
34+
* All peripheral drivers keep track of required pm modes.
35+
*/
36+
#define PM_BLOCKER_INITIAL { 0, 0, 0 }
37+
38+
/**
39+
* @brief Power mode required for GPIO IRQs
40+
*
41+
* If all GPIO IRQs are expected on port A or B, EM3 is the lowest allowed
42+
* power mode. No power level has to be blocked in this case.
43+
* If GPIO IRQs shall be fired on port C or D, we must stay in EM1.
44+
* Uncomment the line down below in this case.
45+
*/
46+
/* #define GPIO_INT_PM_BLOCKER PM_MODE_EM2 */
47+
48+
/**
49+
* @name Board VCOM interface
50+
*
51+
* Define the GPIO pin to enable the VCOM interface
52+
*/
53+
#define VCOM_UART UART_DEV(0)
54+
#define VCOM_EN_PIN GPIO_PIN(PB, 0)
55+
56+
/**
57+
* @name Push button pin definitions
58+
* @{
59+
*/
60+
#define PB0_PIN GPIO_PIN(PB, 1)
61+
#define PB1_PIN GPIO_PIN(PB, 3)
62+
/** @} */
63+
64+
/**
65+
* @name LED pin definitions
66+
* @{
67+
*/
68+
#define LED0_PIN GPIO_PIN(PB, 2)
69+
#define LED1_PIN GPIO_PIN(PD, 3)
70+
/** @} */
71+
72+
/**
73+
* @name Macros for controlling the on-board LEDs
74+
* @{
75+
*/
76+
#define LED0_ON gpio_set(LED0_PIN)
77+
#define LED0_OFF gpio_clear(LED0_PIN)
78+
#define LED0_TOGGLE gpio_toggle(LED0_PIN)
79+
#define LED1_ON gpio_set(LED1_PIN)
80+
#define LED1_OFF gpio_clear(LED1_PIN)
81+
#define LED1_TOGGLE gpio_toggle(LED1_PIN)
82+
/** @} */
83+
84+
/**
85+
* @name Display configuration
86+
*
87+
* Connection to the on-board Sharp Memory LCD (LS013B7DH03).
88+
* @{
89+
*/
90+
#define DISP_SPI SPI_DEV(0)
91+
#define DISP_SCS_PIN GPIO_PIN(PC, 8)
92+
#define DISP_EXTCOMIN_PIN GPIO_PIN(PC, 6)
93+
#define DISP_ENABLE_PIN GPIO_PIN(PC, 9)
94+
/** @} */
95+
96+
/**
97+
* @name Flash configuration
98+
*
99+
* Connection to the on-board MX25R8035F.
100+
* @{
101+
*/
102+
#define FLASH_SPI SPI_DEV(0)
103+
#define FLASH_CS_PIN GPIO_PIN(PC, 4)
104+
/** @} */
105+
106+
/**
107+
* @name Sensor configuration
108+
*
109+
* Connection to the on-board Si7021 temperature & humidity sensor.
110+
* @{
111+
*/
112+
#define SI70XX_PARAM_I2C_DEV I2C_DEV(0)
113+
#define SI7021_EN_PIN GPIO_PIN(PC, 9)
114+
/** @} */
115+
116+
/**
117+
* @brief Initialize board specific hardware
118+
*/
119+
void board_init(void);
120+
121+
#ifdef __cplusplus
122+
}
123+
#endif
124+
125+
#endif /* BOARD_H */
126+
/** @} */
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright (C) 2022 SSV Software Systems GmbH
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser
5+
* General Public License v2.1. See the file LICENSE in the top level
6+
* directory for more details.
7+
*/
8+
9+
/**
10+
* @ingroup boards_xg23-pk6068a
11+
* @{
12+
*
13+
* @file
14+
* @brief Board specific configuration of direct mapped GPIOs
15+
*
16+
* @author Juergen Fitschen <me@jue.yt>
17+
*/
18+
19+
#ifndef GPIO_PARAMS_H
20+
#define GPIO_PARAMS_H
21+
22+
#include "board.h"
23+
#include "saul/periph.h"
24+
25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
28+
29+
/**
30+
* @brief GPIO pin configuration
31+
*/
32+
static const saul_gpio_params_t saul_gpio_params[] =
33+
{
34+
{
35+
.name = "LED 0",
36+
.pin = LED0_PIN,
37+
.mode = GPIO_OUT
38+
},
39+
{
40+
.name = "LED 1",
41+
.pin = LED1_PIN,
42+
.mode = GPIO_OUT
43+
},
44+
{
45+
.name = "Button 1",
46+
.pin = PB0_PIN,
47+
.mode = GPIO_IN_PU,
48+
.flags = SAUL_GPIO_INVERTED
49+
},
50+
{
51+
.name = "Button 2",
52+
.pin = PB1_PIN,
53+
.mode = GPIO_IN_PU,
54+
.flags = SAUL_GPIO_INVERTED
55+
}
56+
};
57+
58+
#ifdef __cplusplus
59+
}
60+
#endif
61+
62+
#endif /* GPIO_PARAMS_H */
63+
/** @} */

0 commit comments

Comments
 (0)