Compare commits

...
Author SHA1 Message Date
taco 0c0ef4075c update README.md 2026-04-13 22:24:16 +10:00
taco bc9b190ab2 MX25LE01: fix DEVICE_NAME length
DEVICE_NAME must be 8 chars or less, otherwise the Nordic DFU service UUID is silently dropped from the BLE advertising packet which has the potential to cause issues with some DFU apps.
2026-04-13 21:48:21 +10:00
taco 91b336dfee board support: add Seeed SenseCAP Solar Node P1 2026-04-13 17:57:31 +10:00
Huw Duddy ef2114d012 Merge pull request #23 from formtapez/minewsewi
Support for MinewSemi MX25LE01 Devboard
2026-04-13 16:30:27 +10:00
Huw Duddy da9a778564 Merge pull request #19 from spacemishka/ThinknodeM1
Thinknode M1 OTA Bootloader
2026-04-13 13:18:26 +10:00
tacoandPeter Bölke 0325b7f1bb board support: add ELECROW ThinkNode M1
Co-authored-by: Peter Bölke <peterboelke@gmail.com>
2026-04-13 13:16:15 +10:00
tacoandRastislav Vysoky 1d8194f44f use maximum ble tx power for nrf52840
Co-authored-by: Rastislav Vysoky <recrof@gmail.com>
2026-04-13 12:30:48 +10:00
taco 08f0f902ea board support: add Elecrow ThinkNode M3 2026-03-28 08:43:30 +11:00
taco 287f68ef5f board support: add Elecrow ThinkNode M6 2026-03-25 15:40:47 +11:00
taco c18884724a board support: add LILYGO T-Echo 2026-03-25 15:40:23 +11:00
formtapez 3fa9ed7235 support for MinewSemi MX25LE01 board 2026-03-24 18:33:00 +01:00
21 changed files with 556 additions and 12 deletions

No files matched your search

+44 -11
View File
@@ -1,5 +1,16 @@
# Adafruit nRF52 Bootloader with Enhanced OTA DFU
## Changes in OTAFIX 2.2
- **Use maximum TX power for BLE**
Changed BLE TX power to be set to +8 for nRF52840.
- **New boards**
Elecrow ThinkNode M1, M3, M6
LilyGo T-Echo
Minewsemi MX25LE01
Seeed SenseCAP Solar Node P1
## Changes in OTAFIX 2.1
- **Defaults to OTA DFU mode**
@@ -22,29 +33,39 @@
- **Unique BLE advertising names per board**
In OTA DFU mode, devices advertise using a board-specific name instead of the generic `AdaDFU`:
- **Elecrow ThinkNode M1** → `TNM1_DFU`
- **Elecrow ThinkNode M3** → `TNM3_DFU`
- **Elecrow ThinkNode M6** → `TNM6_DFU`
- **Heltec T114** → `T114_DFU`
- **LILYGO T-Echo** → `LGTE_DFU`
- **Minewsemi MX25LE01** → `MX25_DFU`
- **ProMicro NRF52840** → `PROM_DFU`
- **T1000e** → `T1KE_DFU`
- **WioTracker L1** → `WTL1_DFU`
- **RAK 4631** → `4631_DFU`
- **RAK WisMesh Tag** → `RTAG_DFU`
- **Seeed SenseCAP Solar Node P1** → `SCAP_DFU`
- **Seeed T1000e** → `T1KE_DFU`
- **Seeed WioTracker L1** → `WTL1_DFU`
- **XIAO NRF52 BLE / SENSE** → `XIAO_DFU`
---
## Boards supported
- Elecrow ThinkNode M1
- Elecrow ThinkNode M3
- Elecrow ThinkNode M6
- Heltec Automation Mesh Node T114 / HT-nRF5262
- LilyGO T-Echo
- Minewsemi MX25LE01
- Nologo ProMicro NRF52840 (aka SuperMini NRF52840)
- Seeed Studio SenseCAP Card Tracker T1000-E
- Seeed Studio Wio Tracker L1
- Seeed Studio XIAO nRF52840 BLE (and Seeed SenseCAP Solar Node)
- Seeed Studio XIAO nRF52840 BLE SENSE
- RAK 4631 ([See note](#notes-on-RAK4631-bootloader))
- RAK WisMesh Tag (new 28/11/2025)
- RAK WisMesh Tag
- Seeed Studio SenseCAP Card Tracker T1000-E
- Seeed SenseCAP Solar Node P1
- Seeed Studio Wio Tracker L1
- Seeed Studio XIAO nRF52840 BLE ([See note](#notes-on-xiao-nrf52840-ble)
- Seeed Studio XIAO nRF52840 BLE SENSE
Any board already supported by the Adafruit nRF52 bootloader can be added.
If there is another nRF52840-based board you are interested in, please raise an issue.
If there is another nRF52840-based board you would like to see supported please raise a github issue and we can make it happen.
---
@@ -65,7 +86,7 @@ If you have somehow managed to accidentally flash an incorrect bootloader to you
If the device does not show up on your computer after flashing the bootloader or performing an OTA update, it may be **waiting in OTA DFU mode**.
In **OTAFIX 2.0**, OTA DFU is the default state when no valid application is present.
In **OTAFIX 2.0** and above, OTA DFU is the default state when no valid application is present.
In this mode:
- No UF2 drive is exposed
- No serial port is available
@@ -151,6 +172,18 @@ Although it's not necessary, if you find this useful please consider donating to
---
## Notes on Xiao NRF52840 BLE
Many of these boards are shipped with the Sense version of the bootloader installed. If your board has the Sense version installed you must use the Sense version when updating via UF2.
You can look at the INFO_UF2.TXT file on the UF2 drive to check what version is currently installed.
To check:
1. Enter UF2 DFU mode (double-press reset)
2. Open the `INFO_UF2.TXT` file on the mounted drive
If the file shows: "Board-ID: nRF52840-SeeedXiaoSense-v1" then you must install the ***SENSE*** variant if updating via UF2 file.
## Notes on RAK4631 bootloader
This version of the RAK4631 bootloader is based on a much newer version (0.9.2) of the Adafruit nRF52 bootloader than what RAK Wireless uses on their official bootloader (0.6.2-11).
@@ -864,8 +864,12 @@ static void advertising_start(void)
advertising_init(&gap_adv.adv_data, adv_flag);
APP_ERROR_CHECK( sd_ble_gap_adv_set_configure(&_adv_handle, &gap_adv, &m_adv_params) );
// maximum power for nrf52832, nrf52840 max power is +8
// maximum power for nrf52832 is +4, nrf52840 max power is +8
#if defined(NRF52840_XXAA)
APP_ERROR_CHECK( sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, _adv_handle, 8) );
#else
APP_ERROR_CHECK( sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, _adv_handle, 4) );
#endif
APP_ERROR_CHECK( sd_ble_gap_adv_start(_adv_handle, BLE_CONN_CFG_HIGH_BANDWIDTH) );
m_is_advertising = true;
+63
View File
@@ -0,0 +1,63 @@
/*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _LILYGO_TECHO_H
#define _LILYGO_TECHO_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
#define UICR_REGOUT0_VALUE UICR_REGOUT0_VOUT_3V3
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(0, 14) // Blue
#define LED_STATE_ON 1
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 // hold down user button on boot to enter OTA DFU mode.
#define BUTTON_1 _PINNUM(1, 10) // user button
#define BUTTON_2 _PINNUM(1, 10)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "LilyGo"
#define BLEDIS_MODEL "T-Echo v1.0"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x0029
#define USB_DESC_CDC_ONLY_PID 0x0029
#define UF2_PRODUCT_NAME "LilyGo T-Echo"
#define UF2_VOLUME_LABEL "TECHOBOOT"
#define UF2_BOARD_ID "nRF52840-TEcho-v1"
#define UF2_INDEX_URL "https://lilygo.cc/products/t-echo-lilygo"
#endif // _LILYGO_TECHO_H
+2
View File
@@ -0,0 +1,2 @@
MCU_SUB_VARIANT = nrf52840
CFLAGS += -DDEVICE_NAME='"LGTE_DFU"'
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};
+65
View File
@@ -0,0 +1,65 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 Ha Thach for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _MINEWSEMI_MX25LE01_H
#define _MINEWSEMI_MX25LE01_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 2
#define LED_PRIMARY_PIN _PINNUM(1, 7)
#define LED_SECONDARY_PIN _PINNUM(1, 5)
#define LED_STATE_ON 1
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2
#define BUTTON_1 _PINNUM(0, 27)
#define BUTTON_2 _PINNUM(0, 11)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "MinewSemi"
#define BLEDIS_MODEL "MX25LE01"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x0029
#define USB_DESC_CDC_ONLY_PID 0x002A
//------------- UF2 -------------//
#define UF2_PRODUCT_NAME "MinewSemi MX25LE01"
#define UF2_VOLUME_LABEL "MX25LE01"
#define UF2_BOARD_ID "MinewSemi-MX25LE01"
#define UF2_INDEX_URL "https://www.minewsemi.com"
#endif // _MINEWSEMI_MX25LE01_H
+3
View File
@@ -0,0 +1,3 @@
MCU_SUB_VARIANT = nrf52840
SD_VERSION = 7.3.0
CFLAGS += -DDEVICE_NAME='"MX25_DFU"'
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};
+66
View File
@@ -0,0 +1,66 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 Ha Thach for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _SEEED_SOLAR_NODE_P1_H
#define _SEEED_SOLAR_NODE_P1_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(0, 19)
#define LED_STATE_ON 1
#define NEOPIXELS_NUMBER 0
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2
#define BUTTON_1 _PINNUM(1, 1) // Hold user button while pressing reset to enter OTA DFU mode
#define BUTTON_2 _PINNUM(1, 1)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "Seeed"
#define BLEDIS_MODEL "SenseCAP Solar Node P1"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x2886
#define USB_DESC_UF2_PID 0x0044
#define USB_DESC_CDC_ONLY_PID 0x0044
//------------- UF2 -------------//
#define UF2_PRODUCT_NAME "Seeed Solar Node P1"
#define UF2_VOLUME_LABEL "SENSECAP"
#define UF2_BOARD_ID "nRF52840-SeeedSenseCAPSolarP1-v1"
#define UF2_INDEX_URL "https://www.seeedstudio.com/"
#endif // _SEEED_SOLAR_NODE_P1_H
+3
View File
@@ -0,0 +1,3 @@
MCU_SUB_VARIANT = nrf52840
SD_VERSION = 7.3.0
CFLAGS += -DDEVICE_NAME='"SCAP_DFU"'
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};
+1
View File
@@ -0,0 +1 @@
set(MCU_VARIANT nrf52840)
+62
View File
@@ -0,0 +1,62 @@
/*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _THINKNODE_M1_H
#define _THINKNODE_M1_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(0, 14) // Blue LED
#define LED_STATE_ON 0
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2
// #define BUTTON_1 _PINNUM(1, 7) // Function button (TBN)
#define BUTTON_1 _PINNUM(1, 10) // Hold page turn to enter OTA DFU mode.
#define BUTTON_2 _PINNUM(1, 10) // Page Turn button
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "ELECROW"
#define BLEDIS_MODEL "ThinkNodeM1"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "ELECROW ThinkNodeM1"
#define UF2_VOLUME_LABEL "ThinkNodeM1"
#define UF2_BOARD_ID "nRF52840-ThinkNodeM1-v1"
#define UF2_INDEX_URL "https://www.elecrow.com"
#endif // _THINKNODE_M1_H
+2
View File
@@ -0,0 +1,2 @@
MCU_SUB_VARIANT = nrf52840
CFLAGS += -DDEVICE_NAME='"TNM1_DFU"'
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};
+61
View File
@@ -0,0 +1,61 @@
/*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _THINKNODE_M3_H
#define _THINKNODE_M3_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(1, 5) // Blue
#define LED_STATE_ON 1
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 // these pins were reversed from the stock bootloader
#define BUTTON_1 _PINNUM(0, 11) // probably unconnected?
#define BUTTON_2 _PINNUM(0, 12) // user button
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "ELECROW"
#define BLEDIS_MODEL "ThinkNode-M3"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "ELECROW ThinkNode-M3"
#define UF2_VOLUME_LABEL "ThinkNodeM3"
#define UF2_BOARD_ID "nRF52840-ThinkNode-M3-v1"
#define UF2_INDEX_URL "https://www.elecrow.com"
#endif // _THINKNODE_M3_H
+2
View File
@@ -0,0 +1,2 @@
MCU_SUB_VARIANT = nrf52840
CFLAGS += -DDEVICE_NAME='"TNM3_DFU"'
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};
+61
View File
@@ -0,0 +1,61 @@
/*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _THINKNODE_M6_H
#define _THINKNODE_M6_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(0, 7) // Blue
#define LED_STATE_ON 1
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2 // hold down user button on boot to enter OTA DFU mode.
#define BUTTON_1 _PINNUM(0, 17) // user button
#define BUTTON_2 _PINNUM(0, 17)
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "ELECROW"
#define BLEDIS_MODEL "ThinkNodeM6"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "ELECROW ThinkNodeM6"
#define UF2_VOLUME_LABEL "ThinkNodeM6"
#define UF2_BOARD_ID "nRF52840-ThinkNodeM6-v1"
#define UF2_INDEX_URL "https://www.elecrow.com"
#endif // _THINKNODE_M6_H
+2
View File
@@ -0,0 +1,2 @@
MCU_SUB_VARIANT = nrf52840
CFLAGS += -DDEVICE_NAME='"TNM6_DFU"'
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};