Program application using nRF Connect Programmer Set RAM_START=0x20000008, as the first 8 bytes are used by the MBR for interrupt forwarding and adjust the size accordingly by setting RAM_SIZE=0x3FFF8. You should also set FLASH_SIZE=0xDF000 to make sure that there is room for the bootloader at the end of the flash. Set FLASH_START=0x1000 to place the application right above the MBR. Step 1: Update the Preprocessor Definitions by removing BOARD_PCA10056 and inserting BOARD_PCA10059: Remember to select the Common configuration in the upper left corner of the Options window when editing Segger Embedded Studio configurations. The instructions are for Segger Embedded Studio, but this approach can easily be adapted to any other toolchain or SDK example without SoftDevice. The SDK already has dongle projects for the Blinky example which can be used as a reference. In this example, we will adapt the Blinky Example for the nRF52840 DK for the nRF52840 Dongle. Depending on the configuration this may cause problems so it is a good idea to disable logging by setting NRF_LOG_ENABLED to 0 in sdk_config.hĪdapt a simple example ( without SoftDevice) Most example projects use UART and/or RTT logging by default, neither which can be used with the dongle without additional hardware. Note that examples that rely on more buttons or LEDs will need more adjustments to work with the nRF52840 Dongle. The SDK examples use the Board Support Package (BSP) to abstract away differences between different boards. The application must be built so that the flash (ROM) and RAM memory layout does not conflict with the MBR and bootloader. Most SDK example application can be used with the nRF52840 dongle with a few adjustments. Most SDK example applications do not include this library, and in that case, the dongle must be put in DFU mode by pressing the RESET button.Īdapting nRF5 SDK projects for the nRF52840 Dongle This is for instance used in the Connectivity firmware that is used by the nRF Connect BLE app. The DFU Trigger library can be included in an application to allow the USB host to put the nRF52840 Dongle in DFU mode. The USB bootloader starts at address 0x000E0000 and occupies the rest of the flash (this includes the Bootloader settings page and MBR parameter storage page). The bootloader is responsible for programming an application or SoftDevice via USB. The MBRs primary responsibility is to support safe upgrades of the bootloader. The MBR occupies the first flash page (address 0 - 0xFFF) and also reserves the lowest 8 bytes of RAM (0x20000000 - 0x20000007) for interrupt forwarding. The DFU Trigger Library (optionally part of the application).The USB DFU system consists of the following parts: However, an application developer must be aware of the existence of the bootloader and adjust the memory layout of the application accordingly. You do not need to understand the bootloader in order to use it, as most of the DFU related stuff is typically handled by the nRF Connect Programmer app. The nRF52840 Dongle is shipped with an Open USB bootloader which allows it to be programmed without the need for a debugger. Using the nRF Connect SDK the only adjustment you need to do to build an existing sample for the nRF52840 dongle is to specify that the board is nrf52840dongle_nrf52840. Note: If you are using the nRF Connect SDK the instructions on how to adapt a nRF5 SDK project is not valid. Lastly, it will describe how you can recover if you have put the nRF52840 Dongle is in a non-programmable state. It also describes how to program the dongle via Serial Wire Debug (SWD) using an external debugger (for instance a nRF52840 DK or nRF52 DK). This tutorial demonstrates how to adapt and program nRF5 SDK example applications to the nRF52840 dongle using USB DFU. The nRF52840 DK is a better choice for a stand-alone development platform. The lack of an onboard debugger means that common debugging techniques such as stepping through code or accessing registers are not possible unless you connect an external debugger. It can also be used for development, and easily programmed over USB DFU from nRF Connect Programmer. The nRF52840 Dongle is a superb companion for several nRF Connect for Desktop apps and is a good device for doing large scale mesh test setups and similar, with its low cost and small size.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |