Skip to content

Commit dbeaafa

Browse files
committed
added feather 833
1 parent 0811a47 commit dbeaafa

File tree

7 files changed

+102
-3
lines changed

7 files changed

+102
-3
lines changed

.github/workflows/githubci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- 'circuitplayground_nrf52840'
2020
- 'clue_nrf52840'
2121
- 'feather_nrf52832'
22+
- 'feather_nrf52833_express'
2223
- 'feather_nrf52840_express'
2324
- 'feather_nrf52840_sense'
2425
- 'itsybitsy_nrf52840_express'

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ TUSB_PATH = lib/tinyusb/src
1616
NRFX_PATH = lib/nrfx
1717
SD_PATH = lib/softdevice/$(SD_FILENAME)
1818

19+
# SD_VERSION can be overwritten by board.mk
1920
ifndef SD_VERSION
20-
SD_VERSION = 6.1.1
21+
SD_VERSION = 6.1.1
2122
endif
2223

2324
SD_FILENAME = $(SD_NAME)_nrf52_$(SD_VERSION)

linker/nrf52833.ld

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ MEMORY
1111
* those values do not match. The check is performed in main.c, see
1212
* APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START);
1313
*/
14-
FLASH (rx) : ORIGIN = 0x74000, LENGTH = 0x7E000-0x74000 /* 40 KB */
14+
FLASH (rx) : ORIGIN = 0x74000, LENGTH = 0x7E000-0x74000-2K /* 38 KB */
15+
16+
BOOTLOADER_CONFIG (r): ORIGIN = 0x7E000 - 2K, LENGTH = 2K
1517

1618
/** Location of mbr params page in flash. */
1719
MBR_PARAMS_PAGE (rw) : ORIGIN = 0x0007E000, LENGTH = 0x1000
@@ -50,6 +52,11 @@ SECTIONS
5052
PROVIDE( __stop_fs_data = .);
5153
} = 0
5254

55+
.bootloaderConfig :
56+
{
57+
KEEP(*(.bootloaderConfig))
58+
} > BOOTLOADER_CONFIG
59+
5360
/* Place the bootloader settings page in flash. */
5461
.bootloaderSettings(NOLOAD) :
5562
{
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2018 Ha Thach for Adafruit Industries
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
#ifndef _FEATHER_NRF52833_H
26+
#define _FEATHER_NRF52833_H
27+
28+
#define _PINNUM(port, pin) ((port)*32 + (pin))
29+
30+
/*------------------------------------------------------------------*/
31+
/* LED
32+
*------------------------------------------------------------------*/
33+
#define LEDS_NUMBER 2
34+
#define LED_PRIMARY_PIN _PINNUM(1, 15)
35+
#define LED_SECONDARY_PIN _PINNUM(1, 10)
36+
#define LED_STATE_ON 1
37+
38+
#define LED_NEOPIXEL _PINNUM(0, 16)
39+
#define NEOPIXELS_NUMBER 1
40+
#define BOARD_RGB_BRIGHTNESS 0x040404
41+
42+
/*------------------------------------------------------------------*/
43+
/* BUTTON
44+
*------------------------------------------------------------------*/
45+
#define BUTTONS_NUMBER 2
46+
#define BUTTON_1 _PINNUM(1, 02)
47+
#define BUTTON_2 _PINNUM(0, 10)
48+
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
49+
50+
//--------------------------------------------------------------------+
51+
// BLE OTA
52+
//--------------------------------------------------------------------+
53+
#define BLEDIS_MANUFACTURER "Adafruit Industries"
54+
#define BLEDIS_MODEL "Feather nRF52833 Express"
55+
56+
//--------------------------------------------------------------------+
57+
// USB
58+
//--------------------------------------------------------------------+
59+
#define USB_DESC_VID 0x239A
60+
#define USB_DESC_UF2_PID 0x0029 // TODO change later
61+
#define USB_DESC_CDC_ONLY_PID 0x002A // TODO change later
62+
63+
//------------- UF2 -------------//
64+
#define UF2_PRODUCT_NAME "Adafruit Feather nRF52833 Express"
65+
#define UF2_VOLUME_LABEL "FTHR833BOOT"
66+
#define UF2_BOARD_ID "nRF52833-Feather-revD"
67+
#define UF2_INDEX_URL "https://www.adafruit.com/product/4062" // TODO change later
68+
69+
#endif
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
MCU_SUB_VARIANT = nrf52833
2+
SD_VERSION = 7.2.0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "boards.h"
2+
#include "uf2/configkeys.h"
3+
4+
__attribute__((used, section(".bootloaderConfig")))
5+
const uint32_t bootloaderConfig[] =
6+
{
7+
/* CF2 START */
8+
CFG_MAGIC0, CFG_MAGIC1, // magic
9+
5, 100, // used entries, total entries
10+
11+
204, 0x80000, // FLASH_BYTES
12+
205, 0x20000, // RAM_BYTES
13+
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
14+
209, 0x621e937a, // UF2_FAMILY
15+
210, 0x20, // PINS_PORT_SIZE = PA_32
16+
17+
0, 0, 0, 0, 0, 0, 0, 0
18+
/* CF2 END */
19+
};

src/boards/feather_nrf52840_express/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define LED_SECONDARY_PIN _PINNUM(1, 10)
3636
#define LED_STATE_ON 1
3737

38-
#define LED_NEOPIXEL _PINNUM(0, 16)
38+
#define LED_NEOPIXEL _PINNUM(0, 16)
3939
#define NEOPIXELS_NUMBER 1
4040
#define BOARD_RGB_BRIGHTNESS 0x040404
4141

0 commit comments

Comments
 (0)