Introduction
The nRF52805 SoC is a low-cost member of the nRF52 Series with a subset of the features of the nRF52811 and nRF52810 SoCs. As the nRF52805 has a feature subset of the nRF52810/11 SoCs, which in turn has a feature subset of the nRF52832, you can use the nRF52832 on the nRF52 DK to emulate the functionality of nRF52805 during development.
This blog post will show you how to emulate the nRF52805 on the nRF52 Development Kit and show you how to transfer the emulated project to nRF52805 hardware.
Detailed information on the SoC can be found in the nRF52805 Product Specification and a detailed comparison of the features of the various nRF52 Series chips can be seen in the nRF52 Series comparison table on the Nordic Infocenter.
Required software
To support development for the nRF52805 the following versions are required.
Hardware emulation of nRF52805 on the nRF52 DK
You can fully emulate nRF52805 features using an nRF52 Development Kit (PCA10040), there are however, some differences that developers should be aware of when transferring emulated projects to nRF52805 hardware.
EasyDMA
The EasyDMAbit MAXCNT bit length for some of the digital serial interfaces differs between the nRF52832 and the nRF52805. This means that the emulated project running on the nRF52 832 may only be able to use an EasyDMA MAXCNT bit length of 8 bits, while on the nRF52805 you may use EasyDMA MAXCNT bit length of up to 14 bits, see the table below for which peripherals that are affected.
SAADC
The SAADC on the nRF52805 only has a limited number of channels compared to the nRF52832
PPI
The number of PPI channels on the nRF52805 is lower than on the nRF52832
GPIO
The number of GPIOs available on the nRF52805 is lower than the nRF52805.
When running an emulated nRF52805 example on the nRF52 DK you will be able to use the buttons and LEDs, but when transferring the emulated project to nRF52805 hardware you will need to remap the GPIOs used on the nRF52832 to available GPIOs on the nRF52805 wlCSP package, see table below.
P0.00
XL1
Digital I/O
Analog input
General purpose I/O
Connection for 32.768 kHz crystal (LFXO)
P0.01
XL2
P0.04
AIN2
SAADC input
P0.05
AIN3
P0.12
P0.14
P0.18
P0.21
nRESET
Configurable as pin reset
Software emulation of nRF52805
All examples that are hardware compatible with the nRF52805 can be set up to emulate the nRF52805 on the nRF52832. Hardware compatibility means that a project uses only the resources present in nRF52805, including peripherals and memory. Note that the nRF52805 does not have cache and hardware floating-point support. It is also important to note that the nRF52805 has reduced flash and RAM size compared to the nRF52832, hence not all nRF52 DK examples may fit on the nRF52805.
See the nRF52 Series comparison table on the Nordic Infocenter for a full overview of which peripherals that are present on the nRF52805 compared to the nRF52832.
The following SoftDevices are supported on the nRF52805
this is also listed in the SDKs and SoftDevices Compatibility Matrix for the nRF52805.
Patching nRF5 SDK v17.0.0 to support the nRF52805
The following files in the nRF5 SDK v17.0.0 need to be patched or added to support the nRF52805:
The patched and added files are available in this zip: SDK_v17.0.0_nRF52805_Patch.zip
Creating an emulated project for the nRF52805 on the nRF52 DK
This section will show you how to convert the emulated nRF52810 (pca10040e) examples in the nRF5 SDK to emulated nRF52805 (pca10040e_nrf52805) examples. Instructions for Keil, Segger Embedded Studio, and GCC with Makefiles are given below.
Keil
Segger Embedded Studio
DEVELOP_IN_NRF52832
SystemInit
NRFX_COREDEP_DELAY_US_LOOP_CYCLES=7
nrf_delay_us
_startup_nrf52810.s
system_nrf52810.c
_startup_nrf52805.s
system_nrf52805.c
GCC and Makefiles
DDEVELOP_IN_NRF52832
DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=7ASMFLAGS += -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=7
Change
Transferring an emulated project to nRF52805 hardware
If you have developed your application using the emulated project as a starting point, there are only two steps you need to perform before you can run it natively on nRF52805:
NRFX_COREDEP_DELAY_US_LOOP_CYCLES
Emulated nRF52805 (pca10040e_nrf52805) Project examples
Below you will find some of the BLE examples from SDK v17.0.0 where a pca10040e_nrf52805 project has been added with support for Keil 5, Segger Embedded Studio.
Peripheral UART/Serial Port Emulation over BLE (ble_app_uart)
Buttonless DFU
Secure BLE Bootloader
Secure UART Bootloader
as well none of the provided Emulated nRF52805 (pca10040e_nrf52805) Project examples works, giving multiple build errors. Has anyone make it work (at least a basic example)?
I use SEGGER Embedded Studio for ARMRelease 5.40 Build 2021012605.45039 Windows x64 and nRF5_SDK_17.0.2_d674dde
Any advice how to start?
I have a PCA10040 and BCM805 module from Fanstel as a target https://www.fanstel.com/bc805
unable to compile, linker error I follow exactly the instruction, but no luck Building ‘blinky_pca10040’ from solution ‘blinky_pca10040’ in configuration ‘Release’ Assembling ‘thumb_crt0.s’ Compiling ‘nrf_log_frontend.c’ Compiling ‘nrf_log_str_formatter.c’ Compiling ‘boards.c’ Compiling ‘app_error.c’ Compiling ‘app_error_handler_gcc.c’ Compiling ‘app_error_weak.c’ Compiling ‘app_util_platform.c’ Compiling ‘nrf_assert.c’ Compiling ‘nrf_atomic.c’ Compiling ‘nrf_balloc.c’ Compiling ‘nrf_fprintf.c’ Compiling ‘nrf_fprintf_format.c’ Compiling ‘nrf_memobj.c’ Compiling ‘nrf_ringbuf.c’ Compiling ‘nrf_strerror.c’ Compiling ‘nrfx_atomic.c’ Compiling ‘main.c’ Assembling ‘ses_startup_nrf52.s’ Assembling ‘ses_startup_nrf_common.s’ Compiling ‘system_nrf52.c’ Assembling ‘ses_startup_nrf52805.s’ Compiling ‘system_nrf52805.c’ Generating linker script ‘blinky_pca10040.ld’ cannot find run section .log_dynamic_data_run referenced in log_dynamic_dataBuild failed
Unable to compile - linker error.
Jason Wright: The nRF52805 is already supported in NCS, see the nRF52805 SDKs and SoftDevices Compatibility matrix on our infocenter.
Do you know when support for nRF52805 will be added to the nRF Connect SDK?