-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
466 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2022 SSV Software Systems GmbH | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
|
||
config BOARD | ||
default "xg23-pk6068a" if BOARD_XG23_PK6068A | ||
|
||
config BOARD_XG23_PK6068A | ||
bool | ||
default y | ||
select CPU_MODEL_EFR32ZG23A020F512GM48 | ||
|
||
# Put defined MCU peripherals here (in alphabetical order) | ||
select HAS_PERIPH_I2C | ||
select HAS_PERIPH_SPI | ||
select HAS_PERIPH_TIMER | ||
select HAS_PERIPH_UART | ||
|
||
# Put other features for this board (in alphabetical order) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE = board | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ifneq (,$(filter saul_default,$(USEMODULE))) | ||
USEMODULE += saul_gpio | ||
endif | ||
|
||
ifneq (,$(filter ztimer,$(USEMODULE))) | ||
USEMODULE += ztimer_periph_lptimer | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CPU = efm32 | ||
CPU_FAM = efr32zg23 | ||
CPU_MODEL = efr32zg23a020f512gm48 | ||
|
||
# Put defined MCU peripherals here (in alphabetical order) | ||
FEATURES_PROVIDED += periph_i2c | ||
FEATURES_PROVIDED += periph_spi | ||
FEATURES_PROVIDED += periph_timer | ||
FEATURES_PROVIDED += periph_uart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# use JLink for flashing | ||
PROGRAMMER ?= jlink | ||
JLINK_DEVICE = EFR32ZG23BXXXF512 | ||
JLINK_PRE_FLASH = r | ||
FLASH_ADDR = 0x08000000 | ||
BAUD ?= 115200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (C) 2022 SSV Software Systems GmbH | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_xg23-pk6068a | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific implementations for the xG23-PK6068A board | ||
* | ||
* @author Juergen Fitschen <[email protected]> | ||
* | ||
* @} | ||
*/ | ||
|
||
#include "cpu.h" | ||
#include "board.h" | ||
#include "periph/gpio.h" | ||
|
||
void board_init(void) | ||
{ | ||
/* Enable VCOM iface */ | ||
gpio_init(VCOM_EN_PIN, GPIO_OUT); | ||
gpio_set(VCOM_EN_PIN); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* @defgroup boards_xg23-pk6068a xG23-PK6068A | ||
* @ingroup boards | ||
* @brief Support for the xG23-PK6068A board. | ||
* | ||
* ### General information | ||
* | ||
* Some general information about the board | ||
* | ||
* ### Pinout | ||
* | ||
* A detailed description of the board pinout (if available) | ||
* | ||
* ### Flash the board | ||
* | ||
* Some notes about how to flash the board | ||
* | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
/* | ||
* Copyright (C) 2022 SSV Software Systems GmbH | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_xg23-pk6068a | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific definitions for the xG23-PK6068A | ||
* | ||
* @author Juergen Fitschen <[email protected]> | ||
*/ | ||
|
||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
#include "cpu.h" | ||
#include "periph_conf.h" | ||
#include "periph_cpu.h" | ||
#include "periph/gpio.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Initialize pm_layered with no pre-defined blockers | ||
* | ||
* All peripheral drivers keep track of required pm modes. | ||
*/ | ||
#define PM_BLOCKER_INITIAL { 0, 0, 0 } | ||
|
||
/** | ||
* @name ztimer configuration | ||
* @{ | ||
*/ | ||
#define CONFIG_ZTIMER_LPTIMER_DEV TIMER_DEV(1) | ||
#define CONFIG_ZTIMER_LPTIMER_FREQ LFXO_FREQ | ||
#define CONFIG_ZTIMER_LPTIMER_WIDTH 24 | ||
#define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE -1 | ||
/** @} */ | ||
|
||
/** | ||
* @brief Power mode required for GPIO IRQs | ||
* | ||
* If all GPIO IRQs are expected on port A or B, EM3 is the lowest allowed | ||
* power mode. No power level has to be blocked in this case. | ||
* If GPIO IRQs shall be fired on port C or D, we must stay in EM1. | ||
* Uncomment the line down below in this case. | ||
*/ | ||
/* #define GPIO_INT_PM_BLOCKER PM_MODE_EM2 */ | ||
|
||
/** | ||
* @name Board VCOM interface | ||
* | ||
* Define the GPIO pin to enable the VCOM interface | ||
*/ | ||
#define VCOM_UART UART_DEV(0) | ||
#define VCOM_EN_PIN GPIO_PIN(PB, 0) | ||
|
||
/** | ||
* @name Push button pin definitions | ||
* @{ | ||
*/ | ||
#define PB0_PIN GPIO_PIN(PB, 1) | ||
#define PB1_PIN GPIO_PIN(PB, 3) | ||
/** @} */ | ||
|
||
/** | ||
* @name LED pin definitions | ||
* @{ | ||
*/ | ||
#define LED0_PIN GPIO_PIN(PB, 2) | ||
#define LED1_PIN GPIO_PIN(PD, 3) | ||
/** @} */ | ||
|
||
/** | ||
* @name Macros for controlling the on-board LEDs | ||
* @{ | ||
*/ | ||
#define LED0_ON gpio_set(LED0_PIN) | ||
#define LED0_OFF gpio_clear(LED0_PIN) | ||
#define LED0_TOGGLE gpio_toggle(LED0_PIN) | ||
#define LED1_ON gpio_set(LED1_PIN) | ||
#define LED1_OFF gpio_clear(LED1_PIN) | ||
#define LED1_TOGGLE gpio_toggle(LED1_PIN) | ||
/** @} */ | ||
|
||
/** | ||
* @name Display configuration | ||
* | ||
* Connection to the on-board Sharp Memory LCD (LS013B7DH03). | ||
* @{ | ||
*/ | ||
#define DISP_SPI SPI_DEV(0) | ||
#define DISP_SCS_PIN GPIO_PIN(PC, 8) | ||
#define DISP_EXTCOMIN_PIN GPIO_PIN(PC, 6) | ||
#define DISP_ENABLE_PIN GPIO_PIN(PC, 9) | ||
/** @} */ | ||
|
||
/** | ||
* @name Flash configuration | ||
* | ||
* Connection to the on-board MX25R8035F. | ||
* @{ | ||
*/ | ||
#define FLASH_SPI SPI_DEV(0) | ||
#define FLASH_CS_PIN GPIO_PIN(PC, 4) | ||
/** @} */ | ||
|
||
/** | ||
* @name Sensor configuration | ||
* | ||
* Connection to the on-board Si7021 temperature & humidity sensor. | ||
* @{ | ||
*/ | ||
#define SENSOR_I2C I2C_DEV(0) | ||
#define SENSOR_ENABLE_PIN GPIO_PIN(PC, 9) | ||
/** @} */ | ||
|
||
/** | ||
* @brief Initialize board specific hardware | ||
*/ | ||
void board_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (C) 2022 SSV Software Systems GmbH | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_xg23-pk6068a | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific configuration of direct mapped GPIOs | ||
* | ||
* @author Juergen Fitschen <[email protected]> | ||
*/ | ||
|
||
#ifndef GPIO_PARAMS_H | ||
#define GPIO_PARAMS_H | ||
|
||
#include "board.h" | ||
#include "saul/periph.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief GPIO pin configuration | ||
*/ | ||
static const saul_gpio_params_t saul_gpio_params[] = | ||
{ | ||
{ | ||
.name = "LED 0", | ||
.pin = LED0_PIN, | ||
.mode = GPIO_OUT | ||
}, | ||
{ | ||
.name = "LED 1", | ||
.pin = LED1_PIN, | ||
.mode = GPIO_OUT | ||
}, | ||
{ | ||
.name = "Button 1", | ||
.pin = PB0_PIN, | ||
.mode = GPIO_IN_PU, | ||
.flags = SAUL_GPIO_INVERTED | ||
}, | ||
{ | ||
.name = "Button 2", | ||
.pin = PB1_PIN, | ||
.mode = GPIO_IN_PU, | ||
.flags = SAUL_GPIO_INVERTED | ||
} | ||
}; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* GPIO_PARAMS_H */ | ||
/** @} */ |
Oops, something went wrong.