Skip to content

Commit 417da00

Browse files
Butterfly Receiver P1
1 parent d9e0920 commit 417da00

File tree

8 files changed

+171
-0
lines changed

8 files changed

+171
-0
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
{boardname: "xiao_ble/nrf52840", fileformat: "uf2", filename: "SlimeNRF_XIAO_Receiver"},
2929
{boardname: "etee_dongle_uf2/nrf52840", fileformat: "uf2", filename: "SlimeNRF_etee_Receiver"},
3030
{boardname: "nrf52840dk/nrf52840", fileformat: "hex", filename: "SlimeNRF_nRF52840dk_Receiver"},
31+
{boardname: "butterfly_p1_uf2/nrf52833", fileformat: "uf2", filename: "SlimeNRF_Butterfly_P1_Receiver"},
3132
]
3233
if: always()
3334
runs-on: ubuntu-latest
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_BUTTERFLY_P1_UF2
5+
select SOC_NRF52833_QIAA
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000")
5+
board_runner_args(pyocd "--target=nrf52833" "--frequency=4000000")
6+
7+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
8+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board:
5+
name: butterfly_p1_uf2
6+
vendor: slimevr
7+
socs:
8+
- name: nrf52833
9+
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
// Copyright (c) 2024 Nordic Semiconductor ASA
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
/dts-v1/;
5+
#include <nordic/nrf52833_qiaa.dtsi>
6+
7+
//move to dtsi?
8+
&pinctrl {
9+
pwm0_default: pwm0_default {
10+
group1 {
11+
psels = <NRF_PSEL(PWM_OUT0, 0, 3)>;
12+
nordic,drive-mode = <NRF_DRIVE_D0S1>;
13+
};
14+
};
15+
16+
pwm0_sleep: pwm0_sleep {
17+
group1 {
18+
psels = <NRF_PSEL(PWM_OUT0, 0, 3)>;
19+
low-power-enable;
20+
};
21+
};
22+
};
23+
//end
24+
25+
/ {
26+
model = "butterfly_p1_uf2";
27+
compatible = "butterfly_p1_uf2";
28+
29+
aliases {
30+
sw0 = &button0;
31+
pwm-led0 = &pwm_led0;
32+
};
33+
34+
buttons {
35+
compatible = "gpio-keys";
36+
button0: button_0 {
37+
gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
38+
label = "Push button switch 0";
39+
};
40+
};
41+
42+
chosen {
43+
zephyr,sram = &sram0;
44+
zephyr,flash = &flash0;
45+
zephyr,console = &cdc_acm_uart0;
46+
zephyr,shell-uart = &cdc_acm_uart0;
47+
};
48+
49+
nrf_radio_fem: nrf21540_fem {
50+
compatible = "nordic,nrf21540-fem";
51+
supply-voltage-mv = <3000>;
52+
pdn-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
53+
mode-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
54+
rx-en-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
55+
tx-en-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
56+
// TRX (Transmit/Receive Select)
57+
// trx-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
58+
};
59+
60+
pwmleds {
61+
compatible = "pwm-leds";
62+
pwm_led0: pwm_led_0 {
63+
pwms = <&pwm0 0 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
64+
};
65+
};
66+
67+
zephyr,user {
68+
led-gpios = <&gpio0 3 GPIO_OPEN_SOURCE>;
69+
};
70+
71+
};
72+
73+
&reg1 {
74+
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
75+
};
76+
77+
&gpiote {
78+
status = "okay";
79+
};
80+
81+
&gpio0 {
82+
status = "okay";
83+
};
84+
85+
&gpio1 {
86+
status = "okay";
87+
};
88+
89+
&pwm0 {
90+
status = "okay";
91+
pinctrl-0 = <&pwm0_default>;
92+
pinctrl-1 = <&pwm0_sleep>;
93+
pinctrl-names = "default", "sleep";
94+
};
95+
96+
zephyr_udc0: &usbd {
97+
compatible = "nordic,nrf-usbd";
98+
status = "okay";
99+
cdc_acm_uart0: cdc_acm_uart0 {
100+
compatible = "zephyr,cdc-acm-uart";
101+
};
102+
};
103+
104+
&nfct {
105+
status = "disabled";
106+
};
107+
108+
&radio {
109+
fem = <&nrf_radio_fem>;
110+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
identifier: butterfly_p1_uf2
5+
name: butterfly_p1_uf2
6+
vendor: slimevr
7+
type: mcu
8+
arch: arm
9+
ram: 128
10+
flash: 512
11+
toolchain:
12+
- zephyr
13+
- gnuarmemb
14+
- xtools
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_ARM_MPU=y
5+
CONFIG_HW_STACK_PROTECTION=y
6+
7+
CONFIG_USB_DEVICE_STACK=y
8+
CONFIG_USB_DEVICE_MANUFACTURER="SlimeVR"
9+
CONFIG_USB_DEVICE_PRODUCT="SlimeVR Butterfly Receiver P1"
10+
11+
#generate for adafruit uf2 bootloader flashing
12+
CONFIG_BUILD_OUTPUT_UF2=y
13+
CONFIG_FLASH_LOAD_OFFSET=0x1000
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bootloader:
2+
address: 0x0
3+
end_address: 0x1000
4+
region: flash_primary
5+
size: 0x1000
6+
uf2_bootloader:
7+
address: 0x74000
8+
end_address: 0x80000
9+
region: flash_primary
10+
size: 0xc000

0 commit comments

Comments
 (0)