Skip to content

Commit 1f169d9

Browse files
committed
nrfx: Update to version 3.12.0
Update nrfx to the recently released version. See https://github.com/NordicSemiconductor/nrfx/blob/v3.12.0/CHANGELOG.md for a list of changes that this version introduces. Origin: nrfx License: BSD 3-Clause URL: https://github.com/NordicSemiconductor/nrfx/tree/v3.12.0 commit: db85149b1871aa09e8ff8ed240a177e8406ead58 Purpose: Provide peripheral drivers for Nordic SoCs Maintained-by: External Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent 03e3979 commit 1f169d9

File tree

159 files changed

+164539
-179469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+164539
-179469
lines changed

nrfx/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
# Changelog
22
All notable changes to this project are documented in this file.
33

4+
## [3.12.0] - 2025-06-02
5+
### Added
6+
- Added a driver, HALY and HAL for MRAMC.
7+
- Added support for 24 MHz clock on the nRF54LM20A Eng A SoC in the CLOCK driver.
8+
- Added the workaround for nRF54L Series anomaly 55 in the SPIM driver.
9+
- Added functions for setting compare value in an optimized way in the GRTC driver.
10+
- Added a function for retrieving compare value in the GRTC driver.
11+
- Added a function for setting and getting an event handler in the TWIM driver.
12+
- Added support for chopping and high-speed analog pin configuration on the affected SoCs in the SAADC driver.
13+
- Added a function for getting a driver instance associated with a DPPIC instance located on the same APB as the specified peripheral in the DPPI driver.
14+
- Added functions for managing all RAM blocks at once in the ``nrfx_ram_ctrl`` helper.
15+
- Added a function for getting a pin drive setting in the GPIO HAL.
16+
- Added a function for checking whether the XIP is active in the QSPI HAL.
17+
- Added an enumerator for frequency divider ratio in the AUXPLL HAL.
18+
- Added new functions for enabling, disabling and checking status of voltage regulators in POWER HAL. Previous functions are deprecated.
19+
- Added functions for getting the SUBSCRIBE and PUBLISH registers in all HALs.
20+
21+
### Changed
22+
- Updated MDK to version 8.71.1.
23+
- Optimized counter setting and reading procedures to make them more performant in the GRTC driver.
24+
- Restored USBPWRRDY event clearing before initialization in the USBREG driver.
25+
26+
### Fixed
27+
- Fixed 8-bit samples handling for the nRF54 Series in the SAADC driver.
28+
- Fixed missing DONE event clearing after a calibration in the SAADC driver.
29+
- Fixed the processing order when events arrive simultaneously in the SPIS driver.
30+
- Fixed pin idle state handling for the nRF54 Series in the PWM driver.
31+
- Fixed the counter reading procedure for VPR cores in the GRTC HALY.
32+
- Fixed the custom ratio setting procedure in the PDM HALY.
33+
- Fixed missing array list functionality for the nRF54 Series in the SPIM HAL.
34+
- Fixed a workaround for the anomaly 161 on the nRF5340 SoC in non-secure variant in the RESET HAL.
35+
436
## [3.11.0] - 2025-02-24
537
### Added
638
- Added the workaround for nRF54L Series anomaly 39 in the CLOCK driver.

nrfx/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ nrfx
22
####
33

44
Origin:
5-
https://github.com/NordicSemiconductor/nrfx/tree/v3.11.0
5+
https://github.com/NordicSemiconductor/nrfx/tree/v3.12.0
66

77
Status:
8-
v3.11.0
8+
v3.12.0
99

1010
Purpose:
1111
With added proper shims adapting it to Zephyr's APIs, nrfx will provide
@@ -32,7 +32,7 @@ URL:
3232
https://github.com/NordicSemiconductor/nrfx
3333

3434
commit:
35-
bacc23e5387964462e5638f0c914c2ab5802fa3c
35+
db85149b1871aa09e8ff8ed240a177e8406ead58
3636

3737
Maintained-by:
3838
External
@@ -41,4 +41,4 @@ License:
4141
BSD-3-Clause
4242

4343
License Link:
44-
https://github.com/NordicSemiconductor/nrfx/blob/v3.11.0/LICENSE
44+
https://github.com/NordicSemiconductor/nrfx/blob/v3.12.0/LICENSE

nrfx/doc/drv_supp_matrix.dox

Lines changed: 76 additions & 77 deletions
Large diffs are not rendered by default.

nrfx/doc/nrf7120_enga.dox

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ For a complete overview, see @ref nrfx_drv_supp_matrix.
4646

4747
@ref nrf_mpc
4848

49+
@ref nrf_mramc
50+
4951
@ref nrf_nfct
5052

5153
@ref nrf_pdm

nrfx/doc/nrfx.doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PROJECT_NAME = "nrfx"
5050

5151
### EDIT THIS ###
5252

53-
PROJECT_NUMBER = "3.11"
53+
PROJECT_NUMBER = "3.12"
5454

5555
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5656
# for a project that appears at the top of each page and should give viewer a

nrfx/doc/nrfx_api.dox

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171

7272
@defgroup nrf_mpu MPU
7373

74+
@defgroup nrf_mramc MRAMC
75+
7476
@defgroup nrf_mutex MUTEX
7577

7678
@defgroup nrf_mvdma MVDMA

nrfx/drivers/include/nrfx_clock.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,30 @@ extern "C" {
5252
/** @brief Clock events. */
5353
typedef enum
5454
{
55-
NRFX_CLOCK_EVT_HFCLK_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HF_STARTED_MASK), ///< HFCLK has been started.
55+
NRFX_CLOCK_EVT_HFCLK_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HF_STARTED_MASK), ///< HFCLK has been started.
5656
#if NRF_CLOCK_HAS_PLL
57-
NRFX_CLOCK_EVT_PLL_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_PLL_STARTED_MASK), ///< PLL has been started.
57+
NRFX_CLOCK_EVT_PLL_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_PLL_STARTED_MASK), ///< PLL has been started.
5858
#endif
59-
NRFX_CLOCK_EVT_LFCLK_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_LF_STARTED_MASK), ///< LFCLK has been started.
59+
NRFX_CLOCK_EVT_LFCLK_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_LF_STARTED_MASK), ///< LFCLK has been started.
6060
#if NRF_CLOCK_HAS_CALIBRATION_TIMER
61-
NRFX_CLOCK_EVT_CTTO = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_CTTO_MASK), ///< Calibration timeout.
61+
NRFX_CLOCK_EVT_CTTO = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_CTTO_MASK), ///< Calibration timeout.
6262
#endif
6363
#if NRF_CLOCK_HAS_CALIBRATION
64-
NRFX_CLOCK_EVT_CAL_DONE = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_DONE_MASK), ///< Calibration has been done.
64+
NRFX_CLOCK_EVT_CAL_DONE = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_DONE_MASK), ///< Calibration has been done.
6565
#endif
6666
#if NRF_CLOCK_HAS_HFCLKAUDIO
67-
NRFX_CLOCK_EVT_HFCLKAUDIO_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HFAUDIO_STARTED_MASK), ///< HFCLKAUDIO has been started.
67+
NRFX_CLOCK_EVT_HFCLKAUDIO_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HFAUDIO_STARTED_MASK), ///< HFCLKAUDIO has been started.
68+
#endif
69+
#if NRF_CLOCK_HAS_HFCLK24M
70+
NRFX_CLOCK_EVT_HFCLK24M_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HFCLK24M_STARTED_MASK), ///< HFCLK24M has been started.
6871
#endif
6972
#if NRF_CLOCK_HAS_HFCLK192M
70-
NRFX_CLOCK_EVT_HFCLK192M_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HF192M_STARTED_MASK), ///< HFCLK192M has been started.
73+
NRFX_CLOCK_EVT_HFCLK192M_STARTED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HF192M_STARTED_MASK), ///< HFCLK192M has been started.
7174
#endif
7275
#if NRF_CLOCK_HAS_XO_TUNE
73-
NRFX_CLOCK_EVT_XO_TUNED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_XOTUNED_MASK), ///< XO tune has been done.
74-
NRFX_CLOCK_EVT_XO_TUNE_ERROR = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_XOTUNEERROR_MASK), ///< XO is not tuned.
75-
NRFX_CLOCK_EVT_XO_TUNE_FAILED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_XOTUNEFAILED_MASK), ///< XO tune operation failed.
76+
NRFX_CLOCK_EVT_XO_TUNED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_XOTUNED_MASK), ///< XO tune has been done.
77+
NRFX_CLOCK_EVT_XO_TUNE_ERROR = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_XOTUNEERROR_MASK), ///< XO is not tuned.
78+
NRFX_CLOCK_EVT_XO_TUNE_FAILED = NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_XOTUNEFAILED_MASK), ///< XO tune operation failed.
7679
#endif
7780
} nrfx_clock_evt_type_t;
7881

nrfx/drivers/include/nrfx_dppi.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,20 @@ nrfx_err_t nrfx_dppi_group_enable(nrfx_dppi_t const * p_instance,
239239
nrfx_err_t nrfx_dppi_group_disable(nrfx_dppi_t const * p_instance,
240240
nrf_dppi_channel_group_t group);
241241

242+
/**
243+
* @brief Function for getting a driver instance for DPPI located on the same bus
244+
* as the specified peripheral.
245+
*
246+
* @param[in] peripheral_addr Address of a peripheral.
247+
* @param[out] p_instance Pointer to the DPPI driver instance structure
248+
* to be filled.
249+
*
250+
* @retval NRFX_SUCCESS DPPI driver instance was found.
251+
* @retval NRFX_ERROR_INVALID_PARAM No DPPI driver instance was found
252+
* for a given peripheral address.
253+
*/
254+
nrfx_err_t nrfx_dppi_periph_get(uint32_t peripheral_addr, nrfx_dppi_t * p_instance);
255+
242256
#else
243257

244258
#if !defined(NRF_DPPIC_INDEX)

nrfx/drivers/include/nrfx_grtc.h

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,19 @@ nrfx_err_t nrfx_grtc_sleep_configuration_get(nrfx_grtc_sleep_config_t * p_sleep_
169169
*/
170170
nrfx_err_t nrfx_grtc_channel_alloc(uint8_t * p_channel);
171171

172+
/**
173+
* @brief Function for setting a callback to a channel.
174+
*
175+
* Function enables the interrupt for that channel.
176+
*
177+
* @param[in] channel Channel.
178+
* @param[in] handler User handler called when channel expires.
179+
* @param[in] p_context Context passed to the callback.
180+
*/
181+
void nrfx_grtc_channel_callback_set(uint8_t channel,
182+
nrfx_grtc_cc_handler_t handler,
183+
void * p_context);
184+
172185
/**
173186
* @brief Function for freeing the GRTC capture/compare channel.
174187
*
@@ -294,7 +307,6 @@ void nrfx_grtc_syscountervalid_int_disable(void);
294307
* @retval NRFX_ERROR_ALREADY The GRTC is already running.
295308
* @retval NRFX_ERROR_TIMEOUT The SYSCOUNTER failed to start due to a timeout.
296309
*/
297-
298310
nrfx_err_t nrfx_grtc_syscounter_start(bool busy_wait, uint8_t * p_main_cc_channel);
299311

300312
/**
@@ -359,9 +371,29 @@ nrfx_err_t nrfx_grtc_syscounter_cc_absolute_set(nrfx_grtc_channel_t * p_chan_dat
359371
uint64_t val,
360372
bool enable_irq);
361373

374+
/**
375+
* @brief Function for setting the absolute compare value for the SYSCOUNTER in an optimized way.
376+
*
377+
* Function must be called with interrupts locked. If @p safe_setting is true then
378+
* it means that previous CC for that channel did not yet expire and it
379+
* was set to a value earlier than @p val so there is a chance that it will
380+
* expire during setting the new value. In that case compare event may be misinterpreted.
381+
* Slower but safe procedure is used in that case which ensures that there will be no
382+
* unexpected user callback triggered. If @p safe_setting is false then function just sets
383+
* new CC value.
384+
*
385+
* @param[in] channel Channel.
386+
* @param[in] val Absolute value to be set in the compare register.
387+
* @param[in] safe_setting True if safe procedure is to be used, false otherwise.
388+
*/
389+
void nrfx_grtc_syscounter_cc_abs_set(uint8_t channel, uint64_t val, bool safe_setting);
390+
362391
/**
363392
* @brief Function for setting the relative compare value for the SYSCOUNTER.
364393
*
394+
* Function has no assumptions on the current channel state so channel event is cleared and
395+
* interrupt can optionally be enabled for that channel.
396+
*
365397
* @note This function marks the specified @p channel as used.
366398
*
367399
* @param[in] p_chan_data Pointer to the channel data instance structure.
@@ -379,6 +411,22 @@ nrfx_err_t nrfx_grtc_syscounter_cc_relative_set(nrfx_grtc_channel_t *
379411
bool enable_irq,
380412
nrfx_grtc_cc_relative_reference_t reference);
381413

414+
/**
415+
* @brief Function for setting the relative compare value in an optimized way.
416+
*
417+
* Function just sets CCADD value and does not attempt to enable or disable the interrupt.
418+
* It assumes that expected channel configuration is done prior to that call.
419+
* Function assumes that previously used CC value has already expired so new value
420+
* can be safely set without a risk of spurious CC expiration.
421+
*
422+
* @param[in] channel Channel.
423+
* @param[in] val Relative value to be set in the CCADD register.
424+
* @param[in] reference Reference. Current counter value or current CC value.
425+
*/
426+
void nrfx_grtc_syscounter_cc_rel_set(uint8_t channel,
427+
uint32_t val,
428+
nrfx_grtc_cc_relative_reference_t reference);
429+
382430
/**
383431
* @brief Function for disabling the SYSCOUNTER compare interrupt.
384432
*
@@ -479,7 +527,6 @@ void nrfx_grtc_active_request_set(bool active);
479527
* @param[out] p_counter p_counter Pointer to the variable to be filled with the SYSCOUNTER value.
480528
*
481529
* @retval NRFX_SUCCESS The procedure was successful.
482-
* @retval NRFX_ERROR_INTERNAL The SYSCOUNTER (1 MHz) is not running.
483530
*/
484531
nrfx_err_t nrfx_grtc_syscounter_get(uint64_t * p_counter);
485532

@@ -539,6 +586,15 @@ NRFX_STATIC_INLINE bool nrfx_grtc_sys_counter_cc_enable_check(uint8_t channel);
539586
*/
540587
NRFX_STATIC_INLINE bool nrfx_grtc_syscounter_compare_event_check(uint8_t channel);
541588

589+
/**
590+
* @brief Function for retrieving CC value.
591+
*
592+
* @param[in] channel Compare channel.
593+
*
594+
* @return Value read from CC register.
595+
*/
596+
NRFX_STATIC_INLINE uint64_t nrfx_grtc_sys_counter_cc_get(uint8_t channel);
597+
542598
#if NRF_GRTC_HAS_RTCOUNTER || defined(__NRFX_DOXYGEN__)
543599
/**
544600
* @brief Function for reading the GRTC RTCOUNTER value.
@@ -590,6 +646,11 @@ NRFX_STATIC_INLINE bool nrfx_grtc_syscounter_compare_event_check(uint8_t channel
590646
return nrfy_grtc_sys_counter_compare_event_check(NRF_GRTC, channel);
591647
}
592648

649+
NRFX_STATIC_INLINE uint64_t nrfx_grtc_sys_counter_cc_get(uint8_t channel)
650+
{
651+
return nrfy_grtc_sys_counter_cc_get(NRF_GRTC, channel);
652+
}
653+
593654
#if NRF_GRTC_HAS_RTCOUNTER
594655
NRFX_STATIC_INLINE uint64_t nrfx_grtc_rtcounter_get(void)
595656
{

0 commit comments

Comments
 (0)