Skip to content

Commit

Permalink
nrfx 3.2.0 release
Browse files Browse the repository at this point in the history
Signed-off-by: Nikodem Kastelik <[email protected]>
  • Loading branch information
nika-nordic committed Oct 2, 2023
1 parent 98d6f43 commit 7ef620b
Show file tree
Hide file tree
Showing 170 changed files with 9,479 additions and 3,589 deletions.
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,56 @@
# Changelog
All notable changes to this project are documented in this file.

## [3.1.0] - 2023-06-28
## [3.2.0] - 2023-10-02
### Added
- Added multi-instance support for the GPIOTE driver.
- Added the nrfx_ram_ctrl helper layer to facilitate developing generic code that controls the power and retention settings of RAM blocks.
- Introduced the NRFX_TIMER_BASE_FREQUENCY_GET() and NRFX_SPIM_BASE_FREQUENCY_GET() macros for getting base frequencies in Hz for the specified TIMER and SPIM instances.
- Added a function for checking whether the specified voltage regulator is enabled in the REGULATORS HAL.
- Added a function for checking whether an inductor is connected to the DCC pin in the REGULATORS HAL.
- Added a function for checking if the detected voltage is below or above the threshold of VPOF (POF Comparator's threshold voltage) in the REGULATORS HAL.
- Added a function for powering on all RAM blocks in the VMC HAL.
- Added missing entries in enumerators for RAM sections in the VMC HAL.
- Added the new nrfx_wdt_stop() function to the WDT driver that stops the watchdog.
- Added the new nrfx_wdt_uninit() function to the WDT driver that uninitializes the watchdog.
- Added the new nrfy_wdt_task_stop_enable_set() function to the WDT HALY that enables or disables stopping the watchdog.
- Added functions for retrieving pointers to the receive and transmit buffers in the TWIS HAL.
- Added functions for checking whether given instance is initialized to all of the drivers.
- Added individual functions for setting reference selection, external reference, detection type and enabling hysteresis in the LPCOMP HAL. Now they are supposed to be used instead of nrf_lpcomp_configure() function.
- Added a blocking mode to the CLOCK driver. The mode is initialized when a user handler is set to NULL.
- Added a new member to the configuration structure of the QSPI driver. The new configuration member determines time in milliseconds when a timeout of the QSPI operation occurs.
- Added the new nrfx_qspi_timeout_signal() function to the QSPI driver that signals premature QSPI operation timeout.

### Changed
- Updated MDK to version 8.58.0.
- Overhauled the UARTE driver. Extended the UARTE driver with various modes of operations including: mixing of blocking and non-blocking transfers, linking transfers, continuous reception, low power operation.
- Changed all functions' parameters in the GPIOTE driver. A pointer to nrfx_gpiote_t structure was added as the first parameter in all functions. Now functions without the pointer to nrfx_gpiote_t structure as the first argument are deprecated.
- Changed functions for setting and reading the GPREGRET registers in the POWER HAL. Now there are only two functions, nrf_power_gpregret_set() for setting and nrf_power_gpregret_get() for reading. A new `reg_num` argument was added to both of them.
- Replaced nrf_regulators_dcdcen_set() and nrf_regulators_dcdcen_vddh_set() functions with nrf_regulators_vreg_enable_set().
- Replaced nrf_regulators_pofcon_set() and nrf_regulators_pofcon_vddh_set() functions with nrf_regulators_config_set().
- Replaced nrf_regulators_pofcon_get() function with nrf_regulators_pof_config_get().
- Renamed nrf_regulators_mainregstatus_get() function to nrf_regulators_main_status_get().
- Renamed NRF_REGULATORS_POTHR_V{XY} macros to NRF_REGULATORS_POF_THR_{X}V{Y}.
- Renamed NRF_REGULATORS_PORTHRVDDH_V{XY} macros to NRF_REGULATORS_POF_THR_VDDH_{X}V{Y}.
- Renamed nrf_regulators_pof_thrvddh_t structure to nrf_regulators_pof_thr_vddh_t.
- Renamed macros indicating features presence in the REGULATORS HAL.
- Changed a default value of the source reference structure member from 1.8V to 1.2V in the COMP driver configuration structure.
- Changed a prototype of an event handler in the WDT driver. The new prototype accepts an event type, requests and a pointer to the context. A previous version is deprecated.
- Changed a prototype of the nrfx_wdt_init() function in the WDT driver. The new prototype accepts a pointer to the instance, a pointer to the configuration, an event handler and a pointer to the context. A previous version is deprecated.
- Replaced the nrf_wdt_task_stop_enable() function with nrf_wdt_task_stop_enable_set(). Now it takes a boolean parameter.
- Replaced the deprecated NRFX_ERROR_ALREADY_INITIALIZED error code with the new NRFX_ERROR_ALREADY one.
- Changed the organization of configuration structure members in the LPCOMP driver.
- Changed the definition of nrf_saadc_value_t type in the SAADC HAL. Now pointer to the buffer holding conversion results is a void* instead of int16_t*.
- Changed the return value in all drivers in case initialization functions have already been executed. Now the NRFX_ERROR_ALREADY error code will be returned instead of NRFX_ERROR_INVALID_STATE.
- Changed the way that the QSPI peripheral is activated. Now the driver activates the peripheral instance before the first transfer or when the nrfx_qspi_activate() function is called.

### Fixed
- Fixed the device failing to reconnect to the host after USB cable being reconnected in the USBD driver.
- Fixed configuration of the external reference in nrfx_comp_init() and nrfx_comp_reconfigure() functions. Now the differential mode can be enabled in the COMP driver.
- Fixed support for P0.18, P0.20, and P0.28-P0.30 pins in the GPIOTE driver for nRF52820 SoC.
- Fixed events being forwarded to the user callback despite having their interrupts disabled in the QDEC driver.

## [3.1.0] - 2023-06-28
### Added
- Added the HALY layer for the NFCT. HALY is an extension of the HAL layer that aggregates basic hardware use cases within single functions. Now it is used instead of HAL in the NFCT drivers.
- Added the NRFX_IN_RANGE() macro for checking if a given value is in a given range.
Expand Down
9 changes: 9 additions & 0 deletions doc/main_page.dox
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ included through a common nrfx_config.h file, according to the selected SoC.
Refer to the "driver configuration" section in the API reference for a given
driver for more information regarding configuration options available for it.

@section nrfx_api_change_procedure API change procedure

Starting from 3.0 release, nrfx API can no longer be considered as stable for minor version updates.
Taking into account the potential impact on the end users, APIs are changed in a few stages.
Every deprecated API is completely removed from the code base after two minor releases,
counting from the one making the functionality obsolete.
Refer to the <a href="https://github.com/NordicSemiconductor/nrfx/wiki/API-change-procedure">API change procedure</a>
for more details regarding the process.

@section nrfx_additional_reqs Additional requirements

Nordic SoCs are based on ARM® Cortex™-M series processors. Before you can
Expand Down
2 changes: 1 addition & 1 deletion doc/nrfx.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ PROJECT_NAME = "nrfx"

### EDIT THIS ###

PROJECT_NUMBER = "3.1"
PROJECT_NUMBER = "3.2"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 6 additions & 0 deletions doc/sphinx/nrfx_api/ram_ctrl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Generic RAM control layer
=========================

.. doxygengroup:: nrfx_ram_ctrl
:project: nrfx
:members:
6 changes: 3 additions & 3 deletions drivers/include/nrf_bitmask.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern "C" {
#define BITMASK_BYTE_GET(abs_bit) ((abs_bit)/8)

/** @brief Macro for getting relative index of bit in byte. */
#define BITMASK_RELBIT_GET(abs_bit) ((abs_bit) & 0x00000007)
#define BITMASK_RELBIT_GET(abs_bit) ((abs_bit) & 0x7UL)

/**
* @brief Function for checking if bit in the multi-byte bit mask is set.
Expand Down Expand Up @@ -90,7 +90,7 @@ __STATIC_INLINE void nrf_bitmask_bit_set(uint32_t bit, void * p_mask)
uint8_t * p_mask8 = (uint8_t *)p_mask;
uint32_t byte_idx = BITMASK_BYTE_GET(bit);
bit = BITMASK_RELBIT_GET(bit);
p_mask8[byte_idx] |= (1 << bit);
p_mask8[byte_idx] |= (uint8_t)(1U << bit);
}

/**
Expand All @@ -104,7 +104,7 @@ __STATIC_INLINE void nrf_bitmask_bit_clear(uint32_t bit, void * p_mask)
uint8_t * p_mask8 = (uint8_t *)p_mask;
uint32_t byte_idx = BITMASK_BYTE_GET(bit);
bit = BITMASK_RELBIT_GET(bit);
p_mask8[byte_idx] &= ~(1 << bit);
p_mask8[byte_idx] &= (uint8_t)~(1U << bit);
}

/**
Expand Down
10 changes: 10 additions & 0 deletions drivers/include/nrfx_adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ typedef void (*nrfx_adc_event_handler_t)(nrfx_adc_evt_t const * p_event);
* @param[in] event_handler Event handler provided by the user.
*
* @retval NRFX_SUCCESS Initialization was successful.
* @retval NRFX_ERROR_ALREADY The driver is already initialized.
* @retval NRFX_ERROR_INVALID_STATE The driver is already initialized.
* @deprecated Use @ref NRFX_ERROR_ALREADY instead.
*/
nrfx_err_t nrfx_adc_init(nrfx_adc_config_t const * p_config,
nrfx_adc_event_handler_t event_handler);
Expand All @@ -160,6 +162,14 @@ nrfx_err_t nrfx_adc_init(nrfx_adc_config_t const * p_config,
*/
void nrfx_adc_uninit(void);

/**
* @brief Function for checking if the ADC driver is initialized.
*
* @retval true Driver is already initialized.
* @retval false Driver is not initialized.
*/
bool nrfx_adc_init_check(void);

/**
* @brief Function for enabling an ADC channel.
*
Expand Down
22 changes: 18 additions & 4 deletions drivers/include/nrfx_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ typedef void (*nrfx_clock_event_handler_t)(nrfx_clock_evt_type_t event);
* After initialization, the module is in power off state (clocks are not started).
*
* @param[in] event_handler Event handler provided by the user.
* Must not be NULL.
* If not provided, driver works in blocking mode.
*
* @retval NRFX_SUCCESS The procedure is successful.
* @retval NRFX_ERROR_ALREADY_INITIALIZED The driver is already initialized.
* @retval NRFX_SUCCESS The procedure is successful.
* @retval NRFX_ERROR_ALREADY The driver is already initialized.
*/
nrfx_err_t nrfx_clock_init(nrfx_clock_event_handler_t event_handler);

Expand All @@ -90,6 +90,14 @@ void nrfx_clock_disable(void);
/** @brief Function for uninitializing the clock module. */
void nrfx_clock_uninit(void);

/**
* @brief Function for checking if the clock driver is initialized.
*
* @retval true Driver is already initialized.
* @retval false Driver is not initialized.
*/
bool nrfx_clock_init_check(void);

/**
* @brief Function for starting the specified clock domain.
*
Expand Down Expand Up @@ -220,9 +228,10 @@ NRFX_STATIC_INLINE void nrfx_clock_hfclkaudio_config_set(uint16_t freq_value);
* @return Current value of FREQ_VALUE for HFCLKAUDIO.
*/
NRFX_STATIC_INLINE uint16_t nrfx_clock_hfclkaudio_config_get(void);

#endif

#if (NRF_CLOCK_HAS_CALIBRATION && NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED)) || \
defined(__NRFX_DOXYGEN__)
/**
* @brief Function for starting the calibration of internal LFCLK.
*
Expand All @@ -245,6 +254,8 @@ nrfx_err_t nrfx_clock_calibration_start(void);
*/
nrfx_err_t nrfx_clock_is_calibrating(void);

#if (NRF_CLOCK_HAS_CALIBRATION_TIMER && NRFX_CHECK(NRFX_CLOCK_CONFIG_CT_ENABLED)) || \
defined(__NRFX_DOXYGEN__)
/**
* @brief Function for starting calibration timer.
*
Expand All @@ -254,6 +265,9 @@ void nrfx_clock_calibration_timer_start(uint8_t interval);

/** @brief Function for stopping the calibration timer. */
void nrfx_clock_calibration_timer_stop(void);
#endif
#endif /* (NRF_CLOCK_HAS_CALIBRATION && NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED)) || \
defined(__NRFX_DOXYGEN__) */

/**
* @brief Function for returning a requested task address for the clock driver module.
Expand Down
14 changes: 12 additions & 2 deletions drivers/include/nrfx_comp.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef struct
*/
#define NRFX_COMP_DEFAULT_CONFIG(_input) \
{ \
.reference = NRF_COMP_REF_INT_1V8, \
.reference = NRF_COMP_REF_INT_1V2, \
.main_mode = NRF_COMP_MAIN_MODE_SE, \
.threshold = NRFX_COMP_CONFIG_TH, \
.speed_mode = NRF_COMP_SP_MODE_HIGH, \
Expand All @@ -143,7 +143,9 @@ typedef struct
* Must not be NULL.
*
* @retval NRFX_SUCCESS Initialization was successful.
* @retval NRFX_ERROR_INVALID_STATE The driver has already been initialized.
* @retval NRFX_ERROR_ALREADY The driver is already initialized.
* @retval NRFX_ERROR_INVALID_STATE The driver is already initialized.
* @deprecated Use @ref NRFX_ERROR_ALREADY instead.
* @retval NRFX_ERROR_BUSY The LPCOMP peripheral is already in use.
* This is possible only if @ref nrfx_prs module
* is enabled.
Expand Down Expand Up @@ -173,6 +175,14 @@ nrfx_err_t nrfx_comp_reconfigure(nrfx_comp_config_t const * p_config);
*/
void nrfx_comp_uninit(void);

/**
* @brief Function for checking if the COMP driver is initialized.
*
* @retval true Driver is already initialized.
* @retval false Driver is not initialized.
*/
bool nrfx_comp_init_check(void);

/**
* @brief Function for setting the analog input.
*
Expand Down
22 changes: 17 additions & 5 deletions drivers/include/nrfx_egu.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ typedef void (*nrfx_egu_event_handler_t)(uint8_t event_idx, void * p_context);
* @param[in] p_context Context passed to the event handler.
*
* @retval NRFX_SUCCESS Initialization was successful.
* @retval NRFX_ERROR_INVALID_STATE Driver is already initialized.
* @retval NRFX_ERROR_ALREADY The driver is already initialized.
* @retval NRFX_ERROR_INVALID_STATE The driver is already initialized.
* @deprecated Use @ref NRFX_ERROR_ALREADY instead.
*/
nrfx_err_t nrfx_egu_init(nrfx_egu_t const * p_instance,
uint8_t interrupt_priority,
Expand Down Expand Up @@ -149,6 +151,16 @@ void nrfx_egu_trigger(nrfx_egu_t const * p_instance, uint8_t event_idx);
*/
void nrfx_egu_uninit(nrfx_egu_t const * p_instance);

/**
* @brief Function for checking if the EGU driver instance is initialized.
*
* @param[in] p_instance Pointer to the driver instance structure.
*
* @retval true Instance is already initialized.
* @retval false Instance is not initialized.
*/
bool nrfx_egu_init_check(nrfx_egu_t const * p_instance);

/**
* @brief Macro returning EGU interrupt handler.
*
Expand Down Expand Up @@ -181,11 +193,11 @@ NRFX_STATIC_INLINE uint32_t nrfx_egu_event_address_get(nrfx_egu_t const * p_inst
* A specific interrupt handler for the driver instance can be retrieved by using
* the NRFX_EGU_INST_HANDLER_GET macro.
*
* Here is a sample of using the NRFX_EGU_INST_HANDLER_GET macro to directly map
* an interrupt handler in a Zephyr application:
* Here is a sample of using the NRFX_EGU_INST_HANDLER_GET macro to map an interrupt handler
* in a Zephyr application:
*
* IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_EGU_INST_GET(\<instance_index\>)), \<priority\>,
* NRFX_EGU_INST_HANDLER_GET(\<instance_index\>), 0);
* IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_EGU_INST_GET(\<instance_index\>)), \<priority\>,
* NRFX_EGU_INST_HANDLER_GET(\<instance_index\>), 0, 0);
*/
NRFX_INSTANCE_IRQ_HANDLERS_DECLARE(EGU, egu)

Expand Down
Loading

0 comments on commit 7ef620b

Please sign in to comment.