Skip to content

Commit 1fbea3c

Browse files
sago35deadprogram
authored andcommitted
microcontrollers: add feather-nrf52840-sense
1 parent 7d1c56b commit 1fbea3c

File tree

2 files changed

+101
-1
lines changed

2 files changed

+101
-1
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: "Adafruit Feather nRF52840 Sense"
3+
weight: 3
4+
---
5+
6+
The [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516) is a small ARM development board based on the Nordic Semiconductor [nrf52840](https://www.nordicsemi.com/eng/Products/nRF52840) processor.
7+
8+
## Interfaces
9+
10+
| Interface | Hardware Supported | TinyGo Support |
11+
| --------- | ------------- | ----- |
12+
| GPIO | YES | YES |
13+
| UART | YES | YES |
14+
| SPI | YES | YES |
15+
| I2C | YES | YES |
16+
| ADC | YES | YES |
17+
| PWM | YES | YES |
18+
| Bluetooth | YES | YES |
19+
20+
## Machine Package Docs
21+
22+
[Documentation for the machine package for the Adafruit Feather nRF52840 Sense](../machine/feather-nrf52840-sense)
23+
24+
## Flashing
25+
26+
### UF2
27+
28+
The Adafruit Feather nRF52840 Sense comes with the [UF2 bootloader](https://github.com/Microsoft/uf2) already installed.
29+
30+
**PLEASE NOTE** that for a good experience using TinyGo on your board you must be running version 0.4.1 or above of the UF2 bootloader on the board. For more information, [see below](#updating-the-uf2-bootloader)
31+
32+
### CLI Flashing
33+
34+
- Plug your Adafruit Feather nRF52840 Sense into your computer's USB port.
35+
- Flash your TinyGo program to the board using this command:
36+
37+
```shell
38+
tinygo flash -target=feather-nrf52840-sense [PATH TO YOUR PROGRAM]
39+
```
40+
41+
- The Adafruit Feather nRF52840 Sense board should restart and then begin running your program.
42+
43+
### Troubleshooting
44+
45+
If you have troubles getting your Adafruit Feather nRF52840 Sense board to receive code, try this:
46+
47+
- Press the "RESET" button on the board two times to get the Adafruit Feather nRF52840 Sense board ready to receive code.
48+
- The Adafruit Feather nRF52840 Sense board will appear to your computer like a USB drive.
49+
- Now try running the command:
50+
51+
```shell
52+
tinygo flash -target=feather-nrf52840-sense [PATH TO YOUR PROGRAM]
53+
```
54+
55+
Once you have updated your Adafruit Feather nRF52840 Sense board the first time, after that you should be able to flash it entirely from the command line.
56+
57+
## Notes
58+
59+
You can use the USB port to the Adafruit Feather nRF52840 Sense as a serial port. `UART0` refers to this connection.
60+
61+
Bluetooth support is now available for the Adafruit Feather nRF52840 Sense board. See https://github.com/tinygo-org/bluetooth for more information.
62+
63+
## Updating the UF2 bootloader
64+
65+
This board uses a UF2 bootloader created by Adafruit: https://github.com/adafruit/Adafruit_nRF52_Bootloader
66+
67+
We recommend bootloader version 0.4.1 or above. You can check what version is installed on your board by double-clicking the button on the board to launch the bootloader. When you do this, a USB volume that should automatically be mounted on your computer. Check the file named "INFO_UF2.TXT" on that drive. The bootloader firmware version should be listed in that file, for example:
68+
69+
```
70+
UF2 Bootloader 0.4.1 lib/nrfx (v2.0.0) lib/tinyusb (0.6.0-272-g4e6aa0d8) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
71+
Model: Adafruit CLUE nRF52840
72+
Board-ID: nRF52840-CLUE-revA
73+
SoftDevice: S140 version 6.1.1
74+
Date: Jan 19 2021
75+
```
76+
77+
To update the bootloader, you will need to install the `adafruit-nrfutil` program.
78+
79+
You can install it by running:
80+
81+
```shell
82+
pip3 install --user adafruit-nrfutil
83+
```
84+
85+
Once you have installed the `adafruit-nrfutil` program, download the firmware here:
86+
https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/download/0.4.1/feather_nrf52840_sense_bootloader-0.4.1.zip
87+
88+
Unzip the files in this zip file and save them to a convenient location.
89+
90+
Plug in your board to your computer's USB port.
91+
92+
Now we are ready to update the firmware. Run a command something like the following, adjusting for any difference based on where you have saved the files, and what your serial port is named:
93+
94+
```shell
95+
adafruit-nrfutil --verbose dfu serial --package feather_nrf52840_bootloader-0.4.1_s140_6.1.1.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200
96+
```
97+
98+
Note that you should be flashing the board using the zip file that was contained within the zip file that you downloaded, NOT the file that you downloaded.
99+
100+
Once you have flashed the board with the `adafruit-nrfutil` it should restart the board with the new bootloader. You only need to do this update once, and then from that point on the new bootloader will be active.

content/docs/reference/microcontrollers/feather-nrf52840.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pip3 install --user adafruit-nrfutil
8383
```
8484

8585
Once you have installed the `adafruit-nrfutil` program, download the firmware here:
86-
https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/download/0.4.1/feather_nrf52832_bootloader-0.4.1.zip
86+
https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/download/0.4.1/feather_nrf52840_express_bootloader-0.4.1.zip
8787

8888
Unzip the files in this zip file and save them to a convenient location.
8989

0 commit comments

Comments
 (0)