How to use the Pro Mini nRF52 (nRF52832) with the Arduino IDE

by | Aug 6, 2020 | 0 comments

Adding and Customizing a New Board Library

Following the steps below will enable the Arduino IDE to compile and upload code to the Pro Mini nRF52 board.

The Pro Mini nRF52 has been made fully compatible with the Adafruit nRF52 Board Support Package (BSP).

For more information about how it can also be used with various other BSPs (e.g. Sandeep, SparkFun, etc.), please see below.

Step 1:  Launch the Arduino IDE.

I’m using version 1.8.2 in the screenshots that follow.

Arduino IDE: When you first launch the application.

Step 2:  Navigate to FilePreferences

Tip:  Or just press Ctrl+Comma.

The following window should appear…

Arduino IDE: The Preferences Window

Step 3:  Open the Additional Boards Manager URLs window.

Arduino IDE: The Preferences Window - Additional Boards Manager URLs

The follow new window should appear…

Arduino IDE: The Additional Boards Manager URLs Window - Blank

Note:  The textbox in your window may already contain URLs to additional board packages – one on each line.

Step 4:  Add the following URL on a new line in the above text box:

https://www.adafruit.com/package_adafruit_index.json
Arduino IDE: The Additional Boards Manager URLs Window - Adafruit nRF52 Arduino URL

Step 5:  Close and relaunch the Arduino IDE.

NoteAny change to the Additional Boards Manager URLs requires a relaunch for those changes to take effect.

Step 6:  Navigate to Tools ⇨ Board: ⇨ Board Manager…

The following window should appear…

Arduino IDE: The Boards Manager Window

Step 7:  Search for and install the following Board Support Package

Adafruit nRF52

I’m using version 0.20.5 in the screenshot below.

Arduino IDE Board Manager: Searching for the Adafruit nRF52 Board Support Package

Step 8:  After the Board Support Package has finished installing, close the Board Manager window.

Arduino IDE Board Manager: Adafruit nRF52 Board Support Package Installed

Step 9:  Navigate to FilePreferences

Tip:  Or just press Ctrl+Comma.

The following window should appear…

Arduino IDE: The Preferences Window

Step 10:  Click on the direct link to the Arduino IDE preferences file as shown below:

Arduino IDE: The Preferences Window - Direct Link to Arduino IDE Directory

A new window should open showing the contents of the [Your-User-Area-Here]Arduino15 directory:

Arduino Directory Displayed After Clicking Preferences Link

Step 11:  Navigate to the following directory:

packages\adafruit\hardware\nrf52\0.20.5

Note:  It should look something like this:

Arduino IDE: The Adafruit nRF52 Arduino BSP Directory

Step 12:  Download and extract the ZIP archive from this Github repository into the above directory.

The ZIP archive contains the following files and internal structure:

Pro Mini nRF52 Board Files - ZIP Archive Contents

Extracting should overwrite the boards.txt file, adding in Pro Mini nRF52 specific directories and associated files into the variants and bootloaders directories.

Adafruit nRF52 Arduino BSP Directory: Showing Updates

You should now see one new directory in the variants directory:

Adafruit nRF52 Arduino BSP Variants Directory: Showing Updates

You should now see one new directory in the bootloader directory containing Pro Mini nRF52 specific bootloader files:

Adafruit nRF52 Arduino BSP Bootloader Directory: Showing Updates

Step 5: Close and relaunch the Arduino IDE.

You should now be able to configure your new board.

Configuring Your New Board

Step 1:  Navigate to ToolsBoard:Adafruit nRF52 Boards (Section) and select the following:

Pro Mini nRF52
Arduino IDE Board Selection: Selecting the Pro Mini nRF52

Note:  This will update the board configuration options to those for the selected board.

Step 2:  Navigate to the Tools menu and select the following options for the Pro Mini nRF52:

Bootloader: "0.3.2 SoftDevice s132 6.1.1"
Debug:      "Level 0 (Release)"
Port:       "[COM Port of Your FTDI Programmer]"
Programmer: "Bootloader DFU for Bluefruit nRF52"
Arduino IDE Board Configuration Menu: Pro Mini nRF52 Settings

Note:  For more information about the available options, please visit the Github repository for Adafruit nRF52 Arduino BSP.

You should now be able to compile and upload code to your board using your FTDI Programmer.

Enjoy!

Any feedback on the above instructions would be much appreciated!

0 Comments

Submit a Comment

Your email address will not be published.