mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #15388 from benpicco/boards/e104-bt5010a-tb
boards/e104-bt5011a-tb: add support for the E104-BT5011A Test Board
This commit is contained in:
commit
418aaa6e67
14
boards/common/e104-bt50xxa-tb/Kconfig
Normal file
14
boards/common/e104-bt50xxa-tb/Kconfig
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2020 Benjamin Valentin
|
||||
#
|
||||
# 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_COMMON_E104_BT50XXA_TB
|
||||
bool
|
||||
select BOARD_COMMON_NRF52
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
3
boards/common/e104-bt50xxa-tb/Makefile
Normal file
3
boards/common/e104-bt50xxa-tb/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
MODULE = boards_common_e104_bt50xxa_tb
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
12
boards/common/e104-bt50xxa-tb/Makefile.dep
Normal file
12
boards/common/e104-bt50xxa-tb/Makefile.dep
Normal file
@ -0,0 +1,12 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
|
||||
# used for software reset
|
||||
ifneq (,$(filter board_software_reset,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_gpio_irq
|
||||
endif
|
||||
|
||||
DEFAULT_MODULE += board_software_reset
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.dep
|
7
boards/common/e104-bt50xxa-tb/Makefile.features
Normal file
7
boards/common/e104-bt50xxa-tb/Makefile.features
Normal file
@ -0,0 +1,7 @@
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.features
|
6
boards/common/e104-bt50xxa-tb/Makefile.include
Normal file
6
boards/common/e104-bt50xxa-tb/Makefile.include
Normal file
@ -0,0 +1,6 @@
|
||||
# external programmer required
|
||||
DEBUG_ADAPTER ?= jlink
|
||||
|
||||
INCLUDES += -I$(RIOTBOARD)/common/e104-bt50xxa-tb/include
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
@ -7,11 +7,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_e104-bt5010a-tb
|
||||
* @ingroup boards_common_e104-bt50xxa-tb
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Board initialization for the E104-BT5010A Test Board
|
||||
* @brief Board initialization for the E104-BT50xxA Test Board
|
||||
*
|
||||
* @author Benjamin Valentin <benpicco@googlemail.com>
|
||||
*
|
||||
@ -20,6 +20,9 @@
|
||||
|
||||
#include "cpu.h"
|
||||
#include "board.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
extern void pm_reboot(void*);
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
@ -27,6 +30,12 @@ void board_init(void)
|
||||
LED_PORT->DIRSET = (LED_MASK);
|
||||
LED_PORT->OUTSET = (LED_MASK);
|
||||
|
||||
/* configure software RST button */
|
||||
#ifdef MODULE_BOARD_SOFTWARE_RESET
|
||||
gpio_init_int(BTN0_PIN, BTN0_MODE, GPIO_FALLING,
|
||||
pm_reboot, NULL);
|
||||
#endif
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
}
|
6
boards/common/e104-bt50xxa-tb/doc.txt
Normal file
6
boards/common/e104-bt50xxa-tb/doc.txt
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
@defgroup boards_common_e104-bt50xxa-tb E104-BT50xxA-TB common code
|
||||
@ingroup boards_common
|
||||
@brief Support for EBYTE nRF52 module breakout boards
|
||||
|
||||
*/
|
@ -7,11 +7,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_e104-bt5010a-tb
|
||||
* @ingroup boards_common_e104-bt50xxa-tb
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Board specific configuration for the E104-BT5010A Test Board
|
||||
* @brief Board specific configuration for the E104-BT50xxA Test Board
|
||||
*
|
||||
* @author Benjamin Valentin <benpicco@googlemail.com>
|
||||
*/
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_e104-bt5010a-tb
|
||||
* @ingroup boards_common_e104-bt50xxa-tb
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
@ -43,18 +43,20 @@ static const saul_gpio_params_t saul_gpio_params[] =
|
||||
.mode = GPIO_OUT,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "BTN (RTS)",
|
||||
.pin = BTN0_PIN,
|
||||
.mode = BTN0_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "BTN (DBG)",
|
||||
.pin = BTN1_PIN,
|
||||
.mode = BTN1_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
#ifndef MODULE_BOARD_SOFTWARE_RESET
|
||||
{
|
||||
.name = "BTN (RST)",
|
||||
.pin = BTN0_PIN,
|
||||
.mode = BTN0_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
@ -7,11 +7,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_e104-bt5010a-tb
|
||||
* @ingroup boards_common_e104-bt50xxa-tb
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Peripheral configuration for the E104-BT5010A Test Board
|
||||
* @brief Peripheral configuration for the E104-BT50xxA Test Board
|
||||
*
|
||||
* @author Benjamin Valentin <benpicco@googlemail.com>
|
||||
*
|
||||
@ -30,10 +30,10 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* @name Clock configuration
|
||||
* The E104-BT5010A module does not have any external oscillators
|
||||
* The E104-BT50xxA module does not have any external oscillators
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HFCLK (0U) /* internal RC oscillator */
|
||||
#define CLOCK_HFCLK (1) /* external crystal */
|
||||
#define CLOCK_LFCLK (0) /* internal RC oscillator */
|
||||
/** @} */
|
||||
|
@ -2,10 +2,10 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_nrf_temperature
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring nrf52832, $(CPU_MODEL)))
|
||||
# include common nrf52832 dependencies
|
||||
include $(RIOTBOARD)/common/nrf52/nrf52832/Makefile.dep
|
||||
else ifneq (,$(findstring nrf52840, $(CPU_MODEL)))
|
||||
# include common nrf52840 dependencies
|
||||
include $(RIOTBOARD)/common/nrf52/nrf52840/Makefile.dep
|
||||
ifneq (,$(filter nrf52811xxaa nrf52820xxaa rf52833xxaa nrf52840xxaa,$(CPU_MODEL)))
|
||||
# include dependencies for 802.15.4 radio
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.nrf802154.dep
|
||||
else
|
||||
# include dependencies for BLE
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.nimble.dep
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
ifneq (,$(filter gnrc_netdev_default,$(USEMODULE)))
|
||||
ifeq (,$(filter nrfmin,$(USEMODULE)))
|
||||
ifeq (,$(filter nrfmin nrf802154,$(USEMODULE)))
|
||||
USEMODULE += nimble_netif
|
||||
endif
|
||||
endif
|
5
boards/common/nrf52/Makefile.nrfmin.dep
Normal file
5
boards/common/nrf52/Makefile.nrfmin.dep
Normal file
@ -0,0 +1,5 @@
|
||||
ifneq (,$(filter gnrc_netdev_default,$(USEMODULE)))
|
||||
ifeq (,$(filter nimble_% nrf802154,$(USEMODULE)))
|
||||
USEMODULE += nrfmin
|
||||
endif
|
||||
endif
|
@ -10,10 +10,7 @@ config BOARD
|
||||
config BOARD_E104_BT5010A_TB
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_NRF52
|
||||
select BOARD_COMMON_E104_BT50XXA_TB
|
||||
select CPU_MODEL_NRF52810XXAA
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
||||
source "$(RIOTBOARD)/common/e104-bt50xxa-tb/Kconfig"
|
||||
|
@ -1,2 +1,5 @@
|
||||
MODULE = board
|
||||
|
||||
DIRS = $(RIOTBOARD)/common/e104-bt50xxa-tb
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,5 +1,5 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
USEMODULE += boards_common_e104_bt50xxa_tb
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.dep
|
||||
# use nrfmin for GNRC as nimble is too large for the board
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.nrfmin.dep
|
||||
include $(RIOTBOARD)/common/e104-bt50xxa-tb/Makefile.dep
|
||||
|
@ -1,9 +1,3 @@
|
||||
CPU_MODEL = nrf52810xxaa
|
||||
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.features
|
||||
include $(RIOTBOARD)/common/e104-bt50xxa-tb/Makefile.features
|
||||
|
@ -1,4 +1 @@
|
||||
# external programmer required
|
||||
DEBUG_ADAPTER ?= jlink
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||
include $(RIOTBOARD)/common/e104-bt50xxa-tb/Makefile.include
|
||||
|
16
boards/e104-bt5011a-tb/Kconfig
Normal file
16
boards/e104-bt5011a-tb/Kconfig
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2020 Benjamin Valentin
|
||||
#
|
||||
# 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 "e104-bt5011a-tb" if BOARD_E104_BT5011A_TB
|
||||
|
||||
config BOARD_E104_BT5011A_TB
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_E104_BT50XXA_TB
|
||||
select CPU_MODEL_NRF52811XXAA
|
||||
|
||||
source "$(RIOTBOARD)/common/e104-bt50xxa-tb/Kconfig"
|
5
boards/e104-bt5011a-tb/Makefile
Normal file
5
boards/e104-bt5011a-tb/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
MODULE = board
|
||||
|
||||
DIRS = $(RIOTBOARD)/common/e104-bt50xxa-tb
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
3
boards/e104-bt5011a-tb/Makefile.dep
Normal file
3
boards/e104-bt5011a-tb/Makefile.dep
Normal file
@ -0,0 +1,3 @@
|
||||
USEMODULE += boards_common_e104_bt50xxa_tb
|
||||
|
||||
include $(RIOTBOARD)/common/e104-bt50xxa-tb/Makefile.dep
|
3
boards/e104-bt5011a-tb/Makefile.features
Normal file
3
boards/e104-bt5011a-tb/Makefile.features
Normal file
@ -0,0 +1,3 @@
|
||||
CPU_MODEL = nrf52811xxaa
|
||||
|
||||
include $(RIOTBOARD)/common/e104-bt50xxa-tb/Makefile.features
|
1
boards/e104-bt5011a-tb/Makefile.include
Normal file
1
boards/e104-bt5011a-tb/Makefile.include
Normal file
@ -0,0 +1 @@
|
||||
include $(RIOTBOARD)/common/e104-bt50xxa-tb/Makefile.include
|
31
boards/e104-bt5011a-tb/doc.txt
Normal file
31
boards/e104-bt5011a-tb/doc.txt
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
@defgroup boards_e104-bt5011a-tb E104-BT5011A Test Board
|
||||
@ingroup boards
|
||||
@brief Support for the Ebyte E104-BT5011A Test Board (nRF52811)
|
||||
|
||||
## General information
|
||||
|
||||
The E104-BT5011A Test Board is a cheap break-out board for the E104-BT5011A module.
|
||||
It's based on the nRF52811 and by default comes with a Firmware that accepts AT
|
||||
commands over UART, but it can be flashed with RIOT easily.
|
||||
|
||||
- [Module Datasheet](http://www.ebyte.com/en/downpdf.aspx?id=1074)
|
||||
- [Module Website](http://www.ebyte.com/en/product-view-news.aspx?id=1074)
|
||||
|
||||
## Flashing the board
|
||||
|
||||
To flash the board, you have to connect a SWD programmer to the pins labeled SWDIO and
|
||||
SWCLK. Also make sure to connect GND.
|
||||
P0.21 is Reset.
|
||||
|
||||
## Accessing STDIO via UART
|
||||
|
||||
The STDIO is directly accessible via the USB port. On a Linux host, it's
|
||||
generally mapped to `/dev/ttyUSB0`.
|
||||
|
||||
Use the `term` target to connect to the board serial port<br/>
|
||||
```
|
||||
make BOARD=e104-bt5011a-tb -C examples/hello-world term
|
||||
```
|
||||
|
||||
*/
|
@ -193,8 +193,8 @@ static int16_t _get_txpower(void)
|
||||
|
||||
static void _set_txpower(int16_t txpower)
|
||||
{
|
||||
if (txpower > 8) {
|
||||
NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_Pos8dBm;
|
||||
if (txpower > (int)RADIO_TXPOWER_TXPOWER_Max) {
|
||||
NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_Max;
|
||||
}
|
||||
else if (txpower > 1) {
|
||||
NRF_RADIO->TXPOWER = (uint32_t)txpower;
|
||||
|
@ -38,8 +38,8 @@
|
||||
/* Set timer period to 16 us (IEEE 802.15.4 symbol time) */
|
||||
#define TIMER_FREQ (62500UL)
|
||||
|
||||
#define TX_POWER_MIN (-40) /* in dBm */
|
||||
#define TX_POWER_MAX (8) /* in dBm */
|
||||
#define TX_POWER_MIN (-40) /* in dBm */
|
||||
#define TX_POWER_MAX ((int)RADIO_TXPOWER_TXPOWER_Max) /* in dBm */
|
||||
|
||||
/**
|
||||
* @brief Default nrf802154 radio shortcuts
|
||||
@ -308,8 +308,8 @@ static int set_cca_threshold(ieee802154_dev_t *dev, int8_t threshold)
|
||||
static void _set_txpower(int16_t txpower)
|
||||
{
|
||||
DEBUG("[nrf802154]: Setting TX power to %i\n", txpower);
|
||||
if (txpower > 8) {
|
||||
NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_Pos8dBm;
|
||||
if (txpower > (int)RADIO_TXPOWER_TXPOWER_Max) {
|
||||
NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_Max;
|
||||
}
|
||||
else if (txpower > 1) {
|
||||
NRF_RADIO->TXPOWER = (uint32_t)txpower;
|
||||
|
@ -8,6 +8,8 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
calliope-mini \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
hifive1 \
|
||||
hifive1b \
|
||||
i-nucleo-lrwan1 \
|
||||
|
@ -9,6 +9,7 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
hifive1 \
|
||||
hifive1b \
|
||||
i-nucleo-lrwan1 \
|
||||
|
@ -16,6 +16,7 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
e180-zg120b-tb \
|
||||
ek-lm4f120xl \
|
||||
esp8266-esp-12x \
|
||||
|
@ -6,6 +6,7 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
atmega328p \
|
||||
b-l072z-lrwan1 \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
lsn50 \
|
||||
msb-430 \
|
||||
msb-430h \
|
||||
|
@ -6,6 +6,7 @@ PSEUDOMODULES += at_urc_isr_highest
|
||||
PSEUDOMODULES += at24c%
|
||||
PSEUDOMODULES += atomic_utils
|
||||
PSEUDOMODULES += base64url
|
||||
PSEUDOMODULES += board_software_reset
|
||||
PSEUDOMODULES += can_mbox
|
||||
PSEUDOMODULES += can_pm
|
||||
PSEUDOMODULES += can_raw
|
||||
|
@ -24,6 +24,7 @@ LOW_MEMORY_BOARDS += \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
derfmega128 \
|
||||
feather-m0 \
|
||||
feather-m0-lora \
|
||||
|
@ -16,6 +16,8 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
derfmega128 \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
hifive1 \
|
||||
hifive1b \
|
||||
i-nucleo-lrwan1 \
|
||||
|
@ -16,6 +16,8 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
derfmega128 \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
hifive1 \
|
||||
hifive1b \
|
||||
i-nucleo-lrwan1 \
|
||||
|
@ -1,3 +1,4 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
#
|
||||
|
@ -1,3 +1,4 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
#
|
||||
|
@ -1,3 +1,4 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
#
|
||||
|
@ -1,3 +1,4 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
#
|
||||
|
@ -1,3 +1,4 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
#
|
||||
|
@ -8,6 +8,8 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
calliope-mini \
|
||||
cc2650-launchpad \
|
||||
cc2650stk \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
hifive1 \
|
||||
hifive1b \
|
||||
i-nucleo-lrwan1 \
|
||||
|
@ -27,6 +27,7 @@ BOARD_INSUFFICIENT_MEMORY := \
|
||||
derfmega128 \
|
||||
derfmega256 \
|
||||
e104-bt5010a-tb \
|
||||
e104-bt5011a-tb \
|
||||
e180-zg120b-tb \
|
||||
ek-lm4f120xl \
|
||||
esp8266-esp-12x \
|
||||
|
Loading…
Reference in New Issue
Block a user