High-Performance Framework GPIO
Caution
The High-Performance Framework (HPF) support in the nRF Connect SDK is experimental and is limited to the nRF54L15, nRF54LM20, nRF54LC10A, nRF54LV10A, and nRF7120 devices.
This application demonstrates how to write a High-Performance Framework (HPF) application implementing a simple peripheral. The application implements a subset of the Zephyr GPIO API.
Application overview
This application shows the implementation of a subset of the Zephyr GPIO API, intended for use with the Blinky sample from Zephyr. It supports the mbox, icmsg, and icbmsg IPC backends. Depending on your needs, you can enable them with the relevant sysbuild options.
The GPIO HPF application is structured into the following main components:
The HPF application - Operates on the FLPR core and handles the GPIO state using VIO.
The Hard Real Time (HRT) module - Runs on the FLPR core and implements low-level GPIO features.
The GPIO driver - Operates on the application core and uses the Zephyr’s scalable real-time operating system (RTOS) GPIO API for data and configuration transmission between the application and FLPR cores.
Requirements
The firmware supports the following development kits:
Hardware platforms |
PCA |
Board name |
|
|---|---|---|---|
nRF7120 DK |
nrf7120dk |
|
|
nRF54LV10 DK |
PCA10188 |
|
|
PCA10184 |
|
||
nRF54LC10 DK |
PCA10226 |
nrf54lc10dk |
|
PCA10156 |
|
Configuration
You can enable the following IPC backends:
icmsg (
SB_CONFIG_HPF_GPIO_BACKEND_ICMSG)icbmsg (
SB_CONFIG_HPF_GPIO_BACKEND_ICBMSG)
Building and running
This application can be found under applications/hpf/gpio in the nRF Connect SDK folder structure.
To build the application, follow the instructions in Building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.
Note
When building repository applications in the SDK repositories, building with sysbuild is enabled by default.
If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild parameter to every build command or configure west to always use it.
To build and run the application, you must include code for both the application core and FLPR core. The process involves building the Blinky sample with the appropriate sysbuild configuration.
For example, to build with icmsg backend, run the following commands (replace <build_target> with target board, such as nrf54l15dk/nrf54l15/cpuapp or nrf7120dk/nrf7120/cpuapp):
west build -b <build_target> -- -DSB_CONFIG_PARTITION_MANAGER=n -DSB_CONFIG_HPF=y -DSB_CONFIG_HPF_GPIO=y -DSB_CONFIG_HPF_GPIO_BACKEND_ICMSG=y -DEXTRA_DTC_OVERLAY_FILE="./boards/<build_target> _hpf_gpio.overlay"
west flash
Upon successful execution, LED0 will start flashing.
Dependencies
zephyr/doc/services/ipc/ipc_service- Used for transferring data between application core and the FLPR core (if you are not using the mbox backend).zephyr/doc/hardware/peripherals/mbox.rst- Used for transferring data between application core and the FLPR core (if you are not using the ipc backend).nrf HAL - Enables access to the VPR CSR registers for direct hardware control.
API documentation
Application uses the following API elements:
Zephyr driver
Header file:
drivers/gpio/gpio_hpf.hSource file:
drivers/gpio/gpio_hpf.c
The following source files depend on the selected IPC backend:
Source file:
drivers/gpio/gpio_hpf_icmsg.cSource file:
drivers/gpio/gpio_hpf_mbox.c
FLPR application
Source file: applications/hpf/gpio/src/main.c
FLPR application HRT
Header file:
applications/hpf/gpio/src/hrt/hrt.hSource file:
applications/hpf/gpio/src/hrt/hrt.cAssembly:
applications/hpf/gpio/src/hrt/hrt-nrf54l15.s
applications/hpf/gpio/src/hrt/hrt-nrf54lm20a.s