You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,14 @@ There are two pins, `DFU` and `FRST` that bootloader will check upon reset/power
57
57
- The `GPREGRET` register can also be set to force the bootloader can enter any of above modes (plus a CDC-only mode for Arduino).
58
58
`GPREGRET` is set by the application before performing a soft reset.
59
59
60
+
```c
61
+
#include"nrf_nvic.h"
62
+
voidreset_to_uf2(void) {
63
+
NRF_POWER->GPREGRET = 0x57; // 0xA8 OTA, 0x4e Serial
64
+
NVIC_SystemReset(); // or sd_nvic_SystemReset();
65
+
}
66
+
```
67
+
60
68
On the Nordic PCA10056 DK board, `DFU` is connected to **Button1**, and `FRST` is connected to **Button2**.
61
69
So holding down **Button1** while clicking **RESET** will put the board into USB bootloader mode, with UF2 and CDC support.
62
70
Holding down **Button2** while clicking **RESET** will put the board into OTA (over-the-air) bootloader mode.
@@ -69,7 +77,7 @@ For other boards, please check the board definition for details.
69
77
70
78
### Making your own UF2
71
79
72
-
To create your own UF2 DFU update image, simply use the [Python conversion script](https://github.com/Microsoft/uf2/blob/master/utils/uf2conv.py) on a .bin file or .hex file, specifying the family as **0xADA52840**. If using a .bin file with the conversion script you must specify application address with the -b switch, this address depend on the SoftDevice size/version e.g S140 v6 is 0x26000
80
+
To create your own UF2 DFU update image, simply use the [Python conversion script](https://github.com/Microsoft/uf2/blob/master/utils/uf2conv.py) on a .bin file or .hex file, specifying the family as **0xADA52840**. If using a .bin file with the conversion script you must specify application address with the -b switch, this address depend on the SoftDevice size/version e.g S140 v6 is 0x26000
73
81
74
82
To create a UF2 image from a .bin file:
75
83
```
@@ -105,6 +113,15 @@ You must have have a J-Link available to "unbrick" your device.
105
113
Prerequisites
106
114
107
115
- ARM GCC
116
+
117
+
To install for macos
118
+
119
+
```bash
120
+
brew tap ArmMbed/homebrew-formulae
121
+
brew install arm-none-eabi-gcc
122
+
brew link --overwrite arm-none-eabi-gcc # if a prior version was present
123
+
```
124
+
108
125
- Nordic's [nRF5x Command Line Tools](https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Command-Line-Tools)
0 commit comments