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:
- Hardware peripheral examples:
- Most BLE peripheral examples
- Many radio examples including proprietary protocols
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.
- Open the example project for your IDE.
- In the project settings, change to device "NordicSemiconductor->nRF52820_xxaa".
- In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52833_XXAA".
- Add the preprocessor define "NRF52820_XXAA".
-
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
-
Remove the following files from the project:
<compiler>_startup_nrf52833.sandsystem_nrf52833.c. -
Add the following files to the project:
<compiler>_startup_nrf52820.sandsystem_nrf52820.c. -
Add the
DEVELOP_IN_NRF52833symbol to the compile flags. This will provide compatibility with the host nRF52833 device where needed. -
Add the
NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3define to ensure correct timing when usingnrf_delay_usfunction.
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 .
- Open the example project for your IDE.
- In the project settings, change to device "NordicSemiconductor->nRF52820_xxaa".
- In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52833_XXAA".
- Add the preprocessor define "NRF52820_XXAA".
-
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
-
Remove the following files from the project:
<compiler>_startup_nrf52833.sandsystem_nrf52833.c. -
Add the following files to the project:
<compiler>_startup_nrf52820.sandsystem_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.