nrfx 3.14.0 to 4.0.0 - NordicSemiconductor/nrfx GitHub Wiki
nrfx 4.0 introduces API and structure changes. This guide lists actions required to make your code compatible with these changes.
BSP (Board Support Package)
- Added new directory that contains:
- MDK
- SoC-specific templates
- SoC-specific defines from nrfx drivers
- Soc-specific files from soc/ directory (IRQ handlers and interconnect)
Action : Always include
nrfx.hheader globally, do not include sub-headers like:
nrf.hnrf_erratas.hnrf_mem.hnrf_peripherals.h
Errata
- Reworked the errata system. The workarounds for unsupported SoCs were removed. Summary table Doxygen file was created, which presents the currently implemented workarounds in nrfx.
- Added the following errata workarounds:
- nRF52 Series:
- 58,
- 173,
- 174,
- 214,
- nRF53 Series:
- 65,
- 119,
- nRF91 Series:
- 7 (added nrfx_nvmc_uicr_word_write() and fixed nrfx_nvmc_otp_halfword_read()) Action : Remove fixes for errata now handled internally by the nrfx.
- nRF52 Series:
- Some errata are now disabled by default, even if the chip should apply them. They should be carefully enabled by the user on a case-by-case manner. The list includes:
- nRF52 Series erratum 58,
- nRF52 Series erratum 109.
- nRF54H Series erratum 62. Actions :
- If required, explicitly enable nRF52 Series erratum 58 workaround, by defining
NRF52_ERRATA_58_ENABLE_WORKAROUNDto1. - If required, explicitly enable nRF52 Series erratum 109 workaround, by defining
NRF52_ERRATA_109_ENABLE_WORKAROUNDto1. - If required, explicitly enable nRF54H Series erratum 62 workaround, by defining
NRF54H_ERRATA_62_ENABLE_WORKAROUNDto1.
Error codes
All nrfx drivers and helpers now return int errno values. Failed function execution is indicated by negative return value. nrfx_err_t type is deprecated. Expressions like NRFX_ASSERT(err == NRFX_SUCCESS) will no longer work as expected.
Action : Update the affected code. Update implementation of NRFX_LOG_ERROR_STRING_GET macro to new error type.
Instance interrupt handlers
Some nrfx drivers now expect instance specific interrupt handlers to be defined by users using NRFX_INSTANCE_IRQ_HANDLER_DEFINE. Macro expects three parameters - lowercase peripheral name, instance index and address of peripheral instance.
Action : Define instance specific interrupt handler for affected drivers.
Configuration
- Removed instance specific driver enablement configs, eg.
NRFX_SPIM20_ENABLED. Action : Do not redefine these symbols, nrfx now considers all present peripheral instances to be enabled. - Drivers are no longer dependent on driver enablement configs, eg.
NRFX_SPIM_ENABLED. Action : Adjust build system to add appropriate driver source files to compilation accordingly, rather that relying on preprocessor symbols to disable driver source file contents.
HALYs
HALY is now deprecated for all peripherals. Action : Use respective HAL functions instead or migrate to driver.
Drivers
CLOCK
- Split
nrfx_clockdriver into separate drivers for each clock type :nrfx_clock_hfclknrfx_clock_hfclk192mnrfx_clock_hfclkaudionrfx_clock_lfclknrfx_clock_xonrfx_clock_xo24m
- Action : Adjust build system to add appropriate clock driver source files to compilation. Do not include specific clock driver headers separately.
nrfx_clock_hfclk_start,nrfx_clock_hfclk_stop,nrfx_clock_lfclk_startandnrfx_clock_lfclk_stopfunctions are no longer deprecated. Action : No action required from user.nrfx_clock_hfclk_is_runningfunction has been renamed tonrfx_clock_hfclk_running_check. Action : Update the affected code.nrfx_clock_lfclk_is_runningfunction has been renamed tonrfx_clock_lfclk_running_check. Action : Update the affected code.
COMP
- Removed deprecated
nrfx_comp_short_mask_tenumerator. Action : Usenrf_comp_short_mask_tinstead. - Removed deprecated
nrfx_comp_evt_en_mask_tenumerator. Action : Usenrf_comp_int_mask_tinstead. - Changed type of
ext_refandinputfields innrfx_comp_config_ttype tonrfx_analog_input_t. Action : Update the affected code. nrfx_comp_pin_selectnow expectsnrfx_analog_input_tparameter and returnsinterror value. Action : Update the affected code.
DPPI
-
Removed DPPI driver. Use GPPI helper layer instead. If GPPI connection API is used then DPPI channels are handled internally. However, it is possible to allocate a specific group or channel and handle it outside of the GPPI driver, e.g. using HAL.
-
Each domain has one unique DPPI instance and domain ID can be used to identify which DPPI instance shall be used to allocate resources.
nrfx_gppi_domain_id_get(addr)is used to derive the domain ID from a peripheral register address.Action : Replace following template code to allocate a specific DPPI channels
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(20);
uint8_t chan;
nrf_dppi_channel_group_t group_chan;
nrfx_err_t err;
err = nrfx_dppi_channel_alloc(&dppi, &chan);
if (err != NRFX_SUCCESS) return err;
err = nrfx_dppi_group_alloc(&dppi, &group_chan);
if (err != NRFX_SUCCESS) return err;
...
nrfx_dppi_channel_free(&dppi, chan);
nrfx_dppi_group_free(&dppi, group_chan);
with
uint32_t domain_id = nrfx_gppi_domain_id_get(NRF_DPPIC20);
int chan = nrfx_gppi_channel_alloc(domain_id);
if (chan < 0) return chan; // Negative error code
int group_chan = nrfx_gppi_group_channel_alloc(domain_id);
if (chan < 0) return chan; // Negative error code
...
nrfx_gppi_channel_free(domain_id, (uint8_t)chan);
nrfx_gppi_group_channel_free(domain_id, (uint8_t)group_chan);
EGU
NRFX_EGU_INSTANCEmacro for creatingnrfx_egu_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_EGU_INSTANCE(20)toNRFX_EGU_INSTANCE(NRF_EGU20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_egu_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_egu_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_EGU_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
GPIOTE
- Removed deprecated
nrfx_gpiote_input_config_ttype and single instance API variant. Action : Use multi-instance API instead. NRFX_GPIOTE_INSTANCEmacro for creatingnrfx_gpiote_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_GPIOTE_INSTANCE(20)toNRFX_GPIOTE_INSTANCE(NRF_GPIOTE20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_gpiote_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_gpiote_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_GPIOTE_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
GRTC
nrfx_grtc_syscounter_gettakes no arguments, it now returnsuint64_tsyscounter value instead of error code. Action : Update the affected code.
I2S
- Encapsulated
mck_setup,ratioandenable_bypassfields fromnrfx_i2s_config_ttype into separatenrfx_i2s_prescalers_ttype substructure. Action : Update the affected code. Content ofnrfx_i2s_prescalers_tsubstructure can now be acquired usingnrfx_i2s_prescalers_calc. NRFX_I2S_INSTANCEmacro for creatingnrfx_i2s_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_I2S_INSTANCE(20)toNRFX_I2S_INSTANCE(NRF_I2S20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_i2s_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_i2s_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_I2S_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
LPCOMP
- Removed deprecated
configfield innrfx_lpcomp_config_ttype. Action : Usereference,ext_ref,detectionandhystfields. - Changed type of
ext_refandinputfields innrfx_lpcomp_config_ttype tonrfx_analog_input_t. Action : Update the affected code. - Removed deprecated
nrfx_lpcomp_enable. Action : Usenrfx_lpcomp_startinstead. - Removed deprecated
nrfx_lpcomp_disable. Action : Usenrfx_lpcomp_stopinstead.
PDM
- Removed deprecated single instance API variant. Action : Use multi-instance API instead.
- Encapsulated
clock_freq,prescalerandratiofields fromnrfx_pdm_config_ttype into separatenrfx_pdm_prescalers_ttype substructure. Action : Update the affected code. Content ofnrfx_pdm_prescalers_tsubstructure can now be acquired usingnrfx_pdm_prescalers_calc. NRFX_PDM_INSTANCEmacro for creatingnrfx_pdm_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_PDM_INSTANCE(20)toNRFX_PDM_INSTANCE(NRF_PDM20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_pdm_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_pdm_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_PDM_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
PPI
-
Removed PPI driver. Use GPPI helper layer instead. If GPPI connection API is used then PPI channel is handled internally. However, it is possible to allocate a specific group or channel and handle it outside of the GPPI driver, e.g. using HAL.
Action : Replace following template code to allocate a specific PPI channel
uint8_t chan;
nrf_ppi_channel_group_t group_chan;
nrfx_err_t err;
err = nrfx_ppi_channel_alloc(&chan);
if (err != NRFX_SUCCESS) return err;
err = nrfx_ppi_group_alloc(&group_chan);
if (err != NRFX_SUCCESS) return err;
...
nrfx_ppi_channel_free(chan);
nrfx_ppi_group_free(group_chan);
with
int chan = nrfx_gppi_channel_alloc(0);
if (chan < 0) return chan; // Negative error code
int group_chan = nrfx_gppi_group_channel_alloc(0);
if (group_chan < 0) return chan; // Negative error code
...
nrfx_gppi_channel_free(0, (uint8_t)chan);
nrfx_gppi_group_channel_free(0, (uint8_t)group_chan);
PPIB
-
Removed PPIB driver. Use GPPI helper layer instead. If GPPI connection API is used then PPIB are handled internally. However, it is possible to allocate a channel in a SoC specific pair of PPIB instances and handle it outside of the GPPI driver, e.g. using HAL.
Action : Use following code to allocate a PPIB channel
#include <soc/interconnect/nrfx_gppi_lumos.h>
...
int chan = nrfx_gppi_channel_alloc(NRFX_GPPI_NODE_PPIB01_20);
if (chan < 0) return chan; // Negative error code
...
nrfx_gppi_channel_free(NRFX_GPPI_NODE_PPIB01_20, (uint8_t)chan);
PWM
- Renamed symbols in
nrfx_pwm_event_tfromNRFX_PWM_EVT_toNRFX_PWM_EVENT_. Action : Update the affected code. - Renamed
nrfx_pwm_handler_ttonrfx_pwm_event_handler_t. Action : Update the affected code. - Renamed
nrfx_pwm_evt_type_ttonrfx_pwm_event_t. Action : Update the affected code. NRFX_PWM_INSTANCEmacro for creatingnrfx_pwm_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_PWM_INSTANCE(20)toNRFX_PWM_INSTANCE(NRF_PWM20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_pwm_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_PWM_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE. - Some driver functions expect
nrfx_pwm_tparameter to be mutable. Action : Update the affected code.
QDEC
NRFX_QDEC_INSTANCEmacro for creatingnrfx_qdec_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_QDEC_INSTANCE(20)toNRFX_QDEC_INSTANCE(NRF_QDEC20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_qdec_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_qdec_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_QDEC_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
SAADC
- Changed type of
pin_pandpin_nfields innrfx_saadc_channel_ttype tonrfx_analog_input_t. Action : Update the affected code.
SPIM
- Renamed
nrfx_spim_evt_type_ttonrfx_spim_event_type_t. Action : Update the affected code. - Renamed
nrfx_spim_evt_ttonrfx_spim_event_t. Action : Update the affected code. - Renamed
nrfx_spim_evt_handler_ttonrfx_spim_event_handler_t. Action : Update the affected code. - Driver no longer validates whether an instance supports SPIM extended features.
Action : Provide proper configuration in
nrfx_spim_config_tbased on hardware capabilities of an instance. Refer to Product Specification for details. NRFX_SPIM_INSTANCEmacro for creatingnrfx_spim_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_SPIM_INSTANCE(20)toNRFX_SPIM_INSTANCE(NRF_SPIM20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_spim_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_spim_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_SPIM_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
SPIS
- Renamed
nrfx_spis_evt_type_ttonrfx_spis_event_type_t. Action : Update the affected code. - Renamed
nrfx_spis_evt_ttonrfx_spis_event_t. Action : Update the affected code. NRFX_SPIS_INSTANCEmacro for creatingnrfx_spis_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_SPIS_INSTANCE(20)toNRFX_SPIS_INSTANCE(NRF_SPIS20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_spis_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_spis_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_SPIS_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
TIMER
NRFX_TIMER_INSTANCEmacro for creatingnrfx_timer_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_TIMER_INSTANCE(20)toNRFX_TIMER_INSTANCE(NRF_TIMER20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_timer_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_timer_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_TIMER_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
TWIM
- Renamed
nrfx_twim_evt_type_ttonrfx_twim_event_type_t. Action : Update the affected code. - Renamed
nrfx_twim_evt_ttonrfx_twim_event_t. Action : Update the affected code. - Renamed
nrfx_twim_evt_handler_ttonrfx_twim_event_handler_t. Action : Update the affected code. NRFX_TWIM_INSTANCEmacro for creatingnrfx_twim_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_TWIM_INSTANCE(20)toNRFX_TWIM_INSTANCE(NRF_TWIM20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_twim_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_twim_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_TWIM_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
TWIS
- Renamed
nrfx_twis_evt_type_ttonrfx_twis_event_type_t. Action : Update the affected code. - Renamed
nrfx_twis_evt_ttonrfx_twis_event_t. Action : Update the affected code. NRFX_TWIS_INSTANCEmacro for creatingnrfx_twis_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_TWIS_INSTANCE(20)toNRFX_TWIS_INSTANCE(NRF_TWIS20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_twis_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_twis_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_TWIS_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
UARTE
- Renamed
nrfx_uarte_evt_type_ttonrfx_uarte_event_type_t. Action : Update the affected code. - Removed deprecated
nrfx_uarte_rxfunction. Action : Usenrfx_uarte_rx_enableandnrfx_uarte_rx_buffer_setinstead. NRFX_UARTE_INSTANCEmacro for creatingnrfx_uarte_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_UARTE_INSTANCE(20)toNRFX_UARTE_INSTANCE(NRF_UARTE20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_uarte_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_uarte_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_UARTE_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
WDT
- Removed deprecated event handler type expecting single parameter. Action : Use new variant instead.
- Removed deprecated variant of
nrfx_wdt_inittaking 3 parameters. Action : Use new variant instead. NRFX_WDT_INSTANCEmacro for creatingnrfx_wdt_tdriver instance now expects peripheral's base address instead of instance number. Action : Update the affected code, e.g. fromNRFX_WDT_INSTANCE(20)toNRFX_WDT_INSTANCE(NRF_WDT20).- Driver internal state is now kept within driver's instance object. Driver instance object must have static storage to remain valid throughout application runtime. Creating multiple driver instances associated with same hardware peripheral instance will not share peripheral state. Action : Declare single driver instance within the system and share it among dependent software components, e.g. by using global scope.
- Some driver functions expect
nrfx_wdt_tparameter to be mutable. Action : Update the affected code. - Driver instance interrupt handler now has to be explicitly defined by user and call
nrfx_wdt_irq_handlerwith pointer to the driver instance as an argument. RemovedNRFX_WDT_INST_HANDLER_GETmacro. Action : UseNRFX_INSTANCE_IRQ_HANDLER_DEFINE.
Helpers
GPPI
GPPI has been reworked to accommodate for a multi-instance DPPI architecture present in the newest SoC, e.g. nRF54 famlily. GPPI focuses on establishing and managing connections between endpoints or domains rather than a particular channels. Connection can spread across multiple and consists of resources in mutliple DPPIC and PPIB instances. Legacy architecture with a single PPI or DPPIC instance can be seen as the simplest example. GPPI API provides API for a basic one-to-one connection and API that allows to setup more complex many-to-many, spreading across multiple domains, connections.
-
New GPPI API has limited support on nRF54H20. Full support requires a dedicated Ironside service which is planned in the near future. Support is limited to one-to-one connections:
nrfx_gppi_conn_alloc,nrfx_gppi_conn_free,nrfx_gppi_conn_enable,nrfx_gppi_conn_disable. It is using legacy GPPI implementation underneath. -
Contrary to the legacy solution, GPPI needs to be initialized prior to using the GPPI API. Ensure that
nrfx_gppi_initis called before calling any GPPI API. -
Removed
nrfx_gppi_channel_group_tandnrfx_gppi_task_tenumerators andnrfx_gppi_channel_check,nrfx_gppi_channels_disable_all,nrfx_gppi_task_endpoint_setup,nrfx_gppi_channel_endpoints_setup,nrfx_gppi_channel_endpoints_clear,nrfx_gppi_task_endpoint_clear,nrfx_gppi_fork_endpoint_setup,nrfx_gppi_fork_endpoint_clear,nrfx_gppi_fork_endpoint_clear,nrfx_gppi_task_trigger,nrfx_gppi_task_address_get,nrfx_gppi_group_disable_task_get,nrfx_gppi_group_enable_task_getandnrfx_gppi_edge_connection_setupfunctions. Action : Use new API. -
Removed
nrfx_gppi_event_endpoint_setup. Action : Usenrfx_gppi_ep_attachinstead. -
Removed
nrfx_gppi_event_endpoint_clear. Action : Use nrfx_gppi_ep_clear. -
nrfx_gppi_channels_enableandnrfx_gppi_channels_enablefunctions now expects additionaldomain_idparameter which enables a particular channel in a specific domain. Action : Update the affected code. Use domain ID returned bynrfx_gppi_domain_id_get. For controlling all channels within a connection, usenrfx_gppi_conn_enableandnrfx_gppi_conn_disable. -
Some API accepts domain ID as a parameter. Each domain has one unique DPPI instance and domain ID can be used to identify which DPPI instance shall be used to allocate resources.
nrfx_gppi_domain_id_get(addr)is used to derive the domain ID from a peripheral register address. -
Reworked connection workflow using DPPI. Action : Replace following template code
static uint8_t dppi_channel;
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
nrfx_dppi_channel_alloc(&dppi, &dppi_channel);
nrf_<a>_subscribe_set(p_reg_a, A_TASK, &dppi_channel);
nrf_<b>_publish_set(p_reg_b, B_EVENT, &dppi_channel);
nrfx_dppi_channel_enable(&dppi, dppi_channel);
...
nrfx_dppi_channel_disable(&dppi, dppi_channel);
with
uint32_t eep, tep;
nrfx_gppi_handle_t gppi_handle;
tep_a = nrf_<a>_task_address_get(p_reg_a, A_TASK);
eep_b = nrf_<b>_event_address_get(p_reg_b, B_EVENT);
nrfx_gppi_conn_alloc(eep_a, tep_b, &gppi_handle);
nrfx_gppi_conn_enable(gppi_handle);
...
nrfx_gppi_conn_disable(gppi_handle);
- Reworked multiple endpoints workflow using DPPI. Action : Replace following template code
nrf_<c>_subscribe_set(p_reg_c, C_TASK, &dppi_channel);
with
tep_c = nrf_<c>_task_address_get(p_reg_c, C_TASK);
nrfx_gppi_ep_attach(tep_c, gppi_handle);
- Reworked channel grouping using GPPI. Action : Replace following template code
uint8_t chan_a, chan_b;
nrfx_gppi_channel_alloc(&chan_a);
nrfx_gppi_channel_alloc(&chan_b);
eep_a = nrf_<a>_event_address_get(p_reg_a, A_EVENT);
eep_b = nrf_<b>_event_address_get(p_reg_b, B_EVENT);
tep_c = nrf_<c>_task_address_get(p_reg_c, C_TASK);
nrfx_gppi_group_clear(NRFX_GPPI_CHANNEL_GROUP0);
nrfx_gppi_group_disable(NRFX_GPPI_CHANNEL_GROUP0);
nrfx_gppi_channels_include_in_group(BIT(chan_a) | BIT(chan_b),
NRFX_GPPI_CHANNEL_GROUP0);
nrfx_gppi_channel_endpoints_setup(chan_a, eep_a,
nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_EN));
nrfx_gppi_channel_endpoints_setup(chan_b, eep_b, tep_c);
nrfx_gppi_fork_endpoint_setup(chan_b,
nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_DIS));
nrfx_gppi_channels_enable(BIT(chan_a) | BIT(chan_b));
...
nrfx_gppi_channels_disable_all(BIT(chan_a) | BIT(chan_b));
nrfx_gppi_channels_remove_from_group(BIT(chan_a) | BIT(chan_b),
NRFX_GPPI_CHANNEL_GROUP0);
nrfx_gppi_fork_endpoint_clear(chan_b,
nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_DIS));
nrfx_gppi_channel_endpoints_clear(chan_b, eep_b, tep_c);
nrfx_gppi_channel_endpoints_clear(chan_a, eep_a,
nrfx_gppi_task_address_get(NRFX_GPPI_TASK_CHG0_EN));
with
nrfx_gppi_handle_t gppi_handle, gppi_handle2;
nrfx_gppi_group_handle_t gppi_group;
eep_a = nrf_<a>_event_address_get(p_reg_a, A_EVENT);
eep_b = nrf_<b>_event_address_get(p_reg_b, B_EVENT);
tep_c = nrf_<c>_task_address_get(p_reg_c, C_TASK);
nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep_a), &gppi_group);
nrfx_gppi_conn_alloc(eep_a, nrfx_gppi_group_task_en_addr(gppi_group), &gppi_handle);
nrfx_gppi_conn_alloc(eep_b, tep_c, &gppi_handle2);
nrfx_gppi_ep_attach(nrfx_gppi_group_task_dis_addr(gppi_group), gppi_handle2);
nrfx_gppi_group_ep_add(gppi_group, eep_a);
nrfx_gppi_group_ap_add(gppi_group, eep_b);
nrfx_gppi_conn_enable(gppi_handle);
nrfx_gppi_conn_enable(gppi_handle2);
...
nrfx_gppi_conn_disable(gppi_handl2);
nrfx_gppi_conn_disable(gppi_handle);
nrfx_gppi_ep_clear(eep_a);
nrfx_gppi_ep_clear(eep_b);
nrfx_gppi_ep_clear(tep_c);
HALs
CACHE
nrf_cache_data_get,nrf_cache_tag_get,nrf_cache_line_validity_check,nrf_cache_mru_get,nrf_cache_data_unit_validity_checkandnrf_cache_is_data_unit_dirty_checknow expectNRF_CACHE_Typeas their first parameter. Action : Update the affected code by usingNRF_CACHE,NRF_DCACHEorNRF_ICACHE.
CLOCK
- Removed deprecated
nrf_clock_lf_actv_src_get,nrf_clock_lf_is_runningandnrf_clock_hf_is_runningfunctions andnrf_clock_start_task_status_tenumerator. Action: Usenrf_clock_is_runninginstead. - Removed deprecated
nrf_clock_lf_start_task_status_getandnrf_clock_hf_start_task_status_getfunctions. Action : Usenrf_clock_start_task_checkinstead.
COMP
- Renamed
nrf_isource_ttype tonrf_comp_isource_t. Action : Update the affected code.
LPCOMP
- Removed deprecated
NRF_LPCOMP_REF_EXT_REF0andNRF_LPCOMP_REF_EXT_REF1symbols fromnrf_lpcomp_ref_tenumerator. Action : UseNRF_LPCOMP_EXT_REF_REF0orNRF_LPCOMP_EXT_REF_REF1symbols fromnrf_lpcomp_ext_ref_tenumerator instead. - Removed deprecated
nrf_lpcomp_configurefunction andnrf_lpcomp_config_ttype. Action : Use dedicated functions to configure specific parameters.
POWER
- Removed deprecated
nrf_power_rampower_tenumerator. Action : UseNRF_POWER_RAMPOWER_S0POWER_POSorNRF_POWER_RAMPOWER_S0RETENTION_POSsymbols instead. - Removed deprecated
nrf_power_vreg_enableandnrf_power_vreg_disablefunctions. Action : Usenrf_power_vreg_setinstead. - Removed deprecated
nrf_power_vreg_enable_checkfunction. Action : Usenrf_power_vreg_getinstead.
RESET
- Removed
NRF_RESET_HAS_APPLICATIONsymbol. Action : Update the affected code.
SAADC
- Removed deprecated
NRF_SAADC_8BIT_SAMPLE_WIDTHsymbol. Action : Update the affected code, all SAADC samples are 16 bits wide now. - Defined
nrf_saadc_value_ttype asint16_t.nrf_saadc_value_min_get,nrf_saadc_value_max_get,nrf_saadc_value_min_getandnrf_saadc_value_max_getfunctions now returnnrf_saadc_value_ttype. Action : Update the affected code.
Others
nrfx_coredep
- Moved from
socdirectory tolibdirectory. Action : Update the inclusion paths.