nRF5 SDK v17.1.0
Developing for nRF52820

Table of Contents

Introduction

Starting from version 17.0.0, this SDK supports development for the nRF52820 device on the nRF52833 DK, which uses the nRF52833 device. nRF52820 is a subset of nRF52833 with smaller RAM and flash, and with less peripheral resources. With this in mind, nRF52833 can be used to emulate the functionality of nRF52820.

For detailed information on nRF52820, see nRF52820 Product Specification.

See nRF52 Series comparison for a detailed comparison of the features of the various nRF52 Series devices.

A dedicated development kit for nRF52820 is not available, but this SDK provides you with emulated projects, located in 'pca10100e' folders. You can run these projects on an nRF52833 DK and use them as a starting point for nRF52820 development. The emulated projects are available for the following examples:

You can also create a similar emulated project for any other example, as long as it is compatible in terms of used peripherals. See Creating your own emulated project. See Driver support matrix for hardware supported in nrfx for this SoC.

Hardware emulation of nRF52820

nRF52820 has fewer GPIO pins than nRF52833 and, as a consequence, its pins cannot reach any of the buttons and one LED of the nRF52833 DK. For improved user experience, the five required GPIOs are enabled in the emulated projects using the DEVELOP_IN_NRF52833 define. This means that the buttons and LED can be used during development for nRF52820 on the nRF52833 DK. Note however, that when the application goes to production and the DEVELOP_IN_NRF52833 define is removed, the compiler will report these GPIOs as missing. At this point, the GPIOs must be replaced with the actual ones used in your product.

Creating your own emulated project

If the emulated project is not available for the example you need, then complete these steps to emulate the nRF52820 SoC.

  1. Open the example project for your IDE.
  2. In the project settings, change to device "NordicSemiconductor->nRF52820_xxaa".
  3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52833_XXAA".
  4. Add the preprocessor define "NRF52820_XXAA".
  5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52820.
    • ROM END: 0x3FFFF
    • RAM END: 0x20007FFF
  6. Remove the following files from the project: <compiler>_startup_nrf52833.s and system_nrf52833.c.
  7. Add the following files to the project: <compiler>_startup_nrf52820.s and system_nrf52820.c.
  8. Add the DEVELOP_IN_NRF52833 symbol to the compile flags. This will provide compatibility with the host nRF52833 device where needed.
  9. Add the NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 define to ensure correct timing when using nrf_delay_us function.

Transferring the project to nRF52820 hardware

If you have already developed your application starting from the standard nRF52833 DK project, follow this procedure to reconfigure your project before it can be transferred and run natively on nRF52820.

Note
As part of this procedure, you must change the BSP to the one matching your custom board. See Using the SDK with other boards.
  1. Open the example project for your IDE.
  2. In the project settings, change to device "NordicSemiconductor->nRF52820_xxaa".
  3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52833_XXAA".
  4. Add the preprocessor define "NRF52820_XXAA".
  5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52820.
    • ROM END: 0x3FFFF
    • RAM END: 0x20007FFF
  6. Remove the following files from the project: <compiler>_startup_nrf52833.s and system_nrf52833.c.
  7. Add the following files to the project: <compiler>_startup_nrf52820.s and system_nrf52820.c.

Transferring emulated project

If you have developed your application using the emulated project as a starting point, there is only one step you need to perform before you can run it natively on nRF52820: in your IDE, remove the DEVELOP_IN_NRF52833 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES defines from the compile flags.


Documentation feedback | Developer Zone | Subscribe | Updated