|
1 | 1 | /*
|
2 |
| - * This sketch allows to support Soft Devices on Nano 33 BLE. |
| 2 | + * This sketch allows to support Soft Devices on the Arduino Nano 33 BLE (Sense). |
3 | 3 | *
|
4 | 4 | * To be able to support Soft Devices, the bootloader first needs to be updated.
|
5 |
| - * Upload this sketch on the Nano 33 BLE to download the new bootloader in the flash. |
6 |
| - * After flashing the bootloader the sketch asks if you want to upload a SoftDevice. |
7 |
| - * This is required for the OpenMV firmware to work. |
8 |
| - * |
9 | 5 | * The new bootloader is fully backwards compatible with standard sketches.
|
| 6 | + * ----------------------------------------------------------------------- |
| 7 | + * |
| 8 | + * INSTRUCTIONS |
| 9 | + * |
| 10 | + * 1) Upload this sketch on the Nano 33 BLE to download the new bootloader into the flash. |
| 11 | + * You can choose whether to update only the bootloader or the bootloader plus SoftDevice. |
| 12 | + * Make a choice through the Serial monitor. |
| 13 | + * |
| 14 | + * 2) After flashing the bootloader the sketch asks if you want to upload the SoftDevice. |
| 15 | + * This is required for the OpenMV firmware to work. |
| 16 | + * After completion, the board will reboot and enter the bootloader mode. |
| 17 | + * |
| 18 | + * 3) Now you can upload a sketch that uses the SoftDevice at 0x26000, using the following bossac command |
| 19 | + * |
| 20 | + * /path/to/bossac -d --port=yourPort --offset=0x16000 -U -i -e -w /path/to/sketch.bin -R |
| 21 | + * |
| 22 | + * Or you can still upload a standard sketch from the IDE at 0x10000. This will of course overwrite the SoftDevice. |
| 23 | + * So if you want to run a SoftDevice-related sketch, always remember to upload this sketch before and re-flash the SoftDevice. |
| 24 | + * |
| 25 | + * To create a custom SoftDevice follow this procedure: |
| 26 | + * |
| 27 | + * 1) Convert your SoftDevice binary to a SoftDevice.h . |
| 28 | + * The nRF5-SDK website provides a SoftDevice.hex, so run the following commands: |
| 29 | + * |
| 30 | + * objcopy --input-target=ihex --output-target=binary --gap-fill 0xff SoftDevice.hex SoftDevice.bin |
| 31 | + * xxd -i SoftDevice.bin > SoftDevice.h |
10 | 32 | *
|
| 33 | + * 2) Copy the content of the generated header file to SoftDevice.h |
| 34 | + * |
| 35 | + * 3) Run this sketch again and flash the SoftDevice. |
11 | 36 | */
|
12 | 37 |
|
13 | 38 | #include "FlashIAP.h"
|
|
0 commit comments