nRF5 SDK  v16.0.0
Choose documentation:
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Developing for nRF52811

Introduction

Starting from version 15.3.0, this SDK supports developing for the nRF52811 SoC on the PCA10056 board, which uses nRF52840. Both of these ICs feature the 802.15.4 radio but nRF52811 is a subset of the nRF52840 with smaller RAM and flash, and with less peripheral resources. Therefore, you can use nRF52840 to emulate the functionality of nRF52811.

You can use the SDK to develop your own applications for nRF52811. A dedicated development kit for nRF52811 is not available, but this SDK provides you with emulated projects, located in the 'pca10056e' folder. You can run these projects on an nRF52840 based PCA10056 and use them as a starting point for nRF52811 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.

Additionally, in some cases, a small hardware modification might be required on the PCA10056 board. See Hardware emulation of nRF52811.

This approach has certain limitations, as some features cannot be effectively emulated in this way. See Limitations.

Hardware emulation of nRF52811

Due to a slightly different architecture of the COMP module, in special cases it is necessary to introduce a manual hardware change before using PCA10056 for nRF52811 development. If you want to use VDD/2 as analog input on the AIN7 pin of nRF52811, you must create a voltage divider and set it up according to the following figure.

nrf52810_voltage_divider.svg
Recommended setup of the voltage divider circuit

Limitations

You can fully emulate nRF52811 features using an nRF52840 Development Kit (PCA10056), however keep in mind that the bit length for the following features differs for both chips. This means that the emulated project lets you use 16 bits, but in order to successfully function on nRF52811, the following features cannot exceed 14 bits in your application.

Differences nRF52840 nRF52811
SPIM: RXD.MAXCNT 16-bit 14-bit
SPIM: TXD.MAXCNT 16-bit 14-bit
SPIS: RXD.MAXCNT 16-bit 14-bit
SPIS: TXD.MAXCNT 16-bit 14-bit
TWIM: RXD.MAXCNT 16-bit 14-bit
TWIM: TXD.MAXCNT 16-bit 14-bit
TWIS: RXD.MAXCNT 16-bit 14-bit
TWIS: TXD.MAXCNT 16-bit 14-bit
UARTE: RXD.MAXCNT 16-bit 14-bit
UARTE: TXD.MAXCNT 16-bit 14-bit

Software emulation of nRF52811

All SDK examples for nRF52811 are configured to be run on the nRF52840 Development Kit (PCA10056). These examples use an emulated project that is stored in the 'pca10056e' folder. All examples that are hardware compatible can be set up to emulate nRF52811 on nRF52840, even though the emulated project is not available for all of them. Hardware compatibility means that a project uses only the resources present in nRF52811, including peripherals and memory. Note that the nRF52811 does not have cache and hardware floating point support.

Note
The example projects located in the 'pca10056e' folder include all Errata workarounds for nRF52840.

Creating your own emulated project

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

pca10056topca10056e.svg
Converting a standard PCA10056 project to an emulated project
  1. Open the example project for your IDE.
  2. In the project settings, change to device "NordicSemiconductor->nRF52811_xxaa".
  3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52840_XXAA".
  4. Add the preprocessor define "NRF52811_XXAA".
  5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52811.
    • ROM END: 0x2FFFF
    • RAM END: 0x20005FFF
  6. Remove the following files from the project: <compiler>_startup_nrf52.s and system_nrf52.c.
  7. Add the following files to the project: <compiler>_startup_nrf52811.s and system_nrf52811.c.
  8. Add the DEVELOP_IN_NRF52840 define to the compile flags. Adding this define will add extra code in SystemInit needed for nRF52840.
  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 nRF52811 hardware

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

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.
pca10056tonrf52811.svg
Transferring a PCA10056 project to nRF52811 SoC
  1. Open the example project for your IDE.
  2. In the project settings, change to device "NordicSemiconductor->nRF52811_xxaa".
  3. In the C/C++ preprocessor settings, remove the defines "NRF52" and "NRF52840_XXAA".
  4. Add the preprocessor define "NRF52811_XXAA".
  5. In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52811.
    • ROM END: 0x2FFFF
    • RAM END: 0x20005FFF
  6. Remove the following files from the project: <compiler>_startup_nrf52.s and system_nrf52.c.
  7. Add the following files to the project: <compiler>_startup_nrf52811.s and system_nrf52811.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 nRF52811: In your IDE, remove the DEVELOP_IN_NRF52840 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES defines from the compile flags.