diff --git a/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.0_release-notes.pdf b/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.0_release-notes.pdf deleted file mode 100644 index fff6b2d1e..000000000 Binary files a/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.0_release-notes.pdf and /dev/null differ diff --git a/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.0_license-agreement.txt b/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.1_license-agreement.txt similarity index 100% rename from third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.0_license-agreement.txt rename to third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.1_license-agreement.txt diff --git a/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.1_release-notes.pdf b/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.1_release-notes.pdf new file mode 100644 index 000000000..4d50bcb41 Binary files /dev/null and b/third_party/NordicSemiconductor/softdevice/s140/doc/s140_nrf52_6.1.1_release-notes.pdf differ diff --git a/third_party/NordicSemiconductor/softdevice/s140/headers/ble.h b/third_party/NordicSemiconductor/softdevice/s140/headers/ble.h index da1a06bbc..76a432bfd 100644 --- a/third_party/NordicSemiconductor/softdevice/s140/headers/ble.h +++ b/third_party/NordicSemiconductor/softdevice/s140/headers/ble.h @@ -123,6 +123,7 @@ enum BLE_COMMON_OPTS BLE_COMMON_OPT_PA_LNA = BLE_OPT_BASE + 0, /**< PA and LNA options */ BLE_COMMON_OPT_CONN_EVT_EXT = BLE_OPT_BASE + 1, /**< Extended connection events option */ BLE_COMMON_OPT_EXTENDED_RC_CAL = BLE_OPT_BASE + 2, /**< Extended RC calibration option */ + BLE_COMMON_OPT_ADV_SCHED_CFG = BLE_OPT_BASE + 3, /**< Advertiser role scheduling configuration option */ }; /** @} */ @@ -146,6 +147,12 @@ enum BLE_COMMON_OPTS offsetof(ble_evt_t, evt.gattc_evt.params.prim_srvc_disc_rsp.services) + ((ATT_MTU) - 1) / 4 * sizeof(ble_gattc_service_t) \ ) +/** @defgroup ADV_SCHED_CFG Advertiser Role Scheduling Configuration + * @{ */ +#define ADV_SCHED_CFG_DEFAULT 0 /**< Default advertiser role scheduling configuration. */ +#define ADV_SCHED_CFG_IMPROVED 1 /**< Improved advertiser role scheduling configuration in which the housekeeping time is reduced. */ +/** @} */ + /** @defgroup BLE_USER_MEM_TYPES User Memory Types * @{ */ #define BLE_USER_MEM_TYPE_INVALID 0x00 /**< Invalid User Memory Types. */ @@ -303,12 +310,23 @@ typedef struct uint8_t enable : 1; /**< Enable extended RC calibration, enabled by default. */ } ble_common_opt_extended_rc_cal_t; +/** + * @brief Configuration of BLE advertiser role scheduling. + * + * @note @ref sd_ble_opt_get is not supported for this option. + */ +typedef struct +{ + uint8_t sched_cfg; /**< See @ref ADV_SCHED_CFG. */ +} ble_common_opt_adv_sched_cfg_t; + /**@brief Option structure for common options. */ typedef union { ble_common_opt_pa_lna_t pa_lna; /**< Parameters for controlling PA and LNA pin toggling. */ ble_common_opt_conn_evt_ext_t conn_evt_ext; /**< Parameters for enabling extended connection events. */ ble_common_opt_extended_rc_cal_t extended_rc_cal; /**< Parameters for enabling extended RC calibration. */ + ble_common_opt_adv_sched_cfg_t adv_sched_cfg; /**< Parameters for configuring advertiser role scheduling. */ } ble_common_opt_t; /**@brief Common BLE Option type, wrapping the module specific options. */ diff --git a/third_party/NordicSemiconductor/softdevice/s140/headers/ble_gap.h b/third_party/NordicSemiconductor/softdevice/s140/headers/ble_gap.h index a130d7b51..c434fefb3 100644 --- a/third_party/NordicSemiconductor/softdevice/s140/headers/ble_gap.h +++ b/third_party/NordicSemiconductor/softdevice/s140/headers/ble_gap.h @@ -876,8 +876,10 @@ typedef struct the bitfield indicates the PHYs the scanner will use for scanning on primary advertising channels. The scanner will accept @ref BLE_GAP_PHYS_SUPPORTED as secondary advertising channel PHYs. - - When used with @ref sd_ble_gap_connect, the - bitfield indicates the PHYs on where a connection may be initiated. + - When used with @ref sd_ble_gap_connect, the bitfield indicates + the PHYs the initiator will use for scanning on primary advertising + channels. The initiator will accept connections initiated on either + of the @ref BLE_GAP_PHYS_SUPPORTED PHYs. If scan_phys contains @ref BLE_GAP_PHY_1MBPS and/or @ref BLE_GAP_PHY_2MBPS, the primary scan PHY is @ref BLE_GAP_PHY_1MBPS. If scan_phys also contains @ref BLE_GAP_PHY_CODED, the primary scan @@ -2610,6 +2612,9 @@ SVCALL(SD_BLE_GAP_PHY_UPDATE, uint32_t, sd_ble_gap_phy_update(uint16_t conn_hand * @note If the application uses @ref BLE_GAP_DATA_LENGTH_AUTO for one or more members of * p_dl_params, the SoftDevice will choose the highest value supported in current * configuration and connection parameters. + * @note If the link PHY is Coded, the SoftDevice will ensure that the MaxTxTime and/or MaxRxTime + * used in the Data Length Update procedure is at least 2704 us. Otherwise, MaxTxTime and + * MaxRxTime will be limited to maximum 2120 us. * * @param[in] conn_handle Connection handle. * @param[in] p_dl_params Pointer to local parameters to be used in Data Length Update diff --git a/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52/nrf_mbr.h b/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52/nrf_mbr.h index 1b248749a..389cc377d 100644 --- a/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52/nrf_mbr.h +++ b/third_party/NordicSemiconductor/softdevice/s140/headers/nrf52/nrf_mbr.h @@ -64,9 +64,22 @@ extern "C" { #define MBR_PAGE_SIZE_IN_WORDS (1024) /** @brief The size that must be reserved for the MBR when a SoftDevice is written to flash. -This is the offset where the first byte of the SoftDevice hex file is written.*/ +This is the offset where the first byte of the SoftDevice hex file is written. */ #define MBR_SIZE (0x1000) +/** @brief Location (in the flash memory) of the bootloader address. */ +#define MBR_BOOTLOADER_ADDR (0xFF8) + +/** @brief Location (in UICR) of the bootloader address. */ +#define MBR_UICR_BOOTLOADER_ADDR (&(NRF_UICR->NRFFW[0])) + +/** @brief Location (in the flash memory) of the address of the MBR parameter page. */ +#define MBR_PARAM_PAGE_ADDR (0xFFC) + +/** @brief Location (in UICR) of the address of the MBR parameter page. */ +#define MBR_UICR_PARAM_PAGE_ADDR (&(NRF_UICR->NRFFW[1])) + + /** @} */ /** @addtogroup NRF_MBR_ENUMS Enumerations @@ -129,25 +142,29 @@ typedef struct /**@brief This command copies a new BootLoader. * - * With this command, destination of BootLoader is always the address written in - * NRF_UICR->BOOTADDR. + * The MBR assumes that either @ref MBR_BOOTLOADER_ADDR or @ref MBR_UICR_BOOTLOADER_ADDR is set to + * the address where the bootloader will be copied. If both addresses are set, the MBR will prioritize + * @ref MBR_BOOTLOADER_ADDR. * - * Destination is erased by this function. + * The bootloader destination is erased by this function. * If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased. * - * This function will use the flash protect peripheral (BPROT or ACL) to protect the flash that is + * This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set, + * see @ref sd_mbr_command. + * + * This command will use the flash protect peripheral (BPROT or ACL) to protect the flash that is * not intended to be written. * - * On success, this function will not return. It will start the new BootLoader from reset-vector as normal. + * On success, this function will not return. It will start the new bootloader from reset-vector as normal. * * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. - * @retval ::NRF_ERROR_FORBIDDEN if NRF_UICR->BOOTADDR is not set. + * @retval ::NRF_ERROR_FORBIDDEN if the bootloader address is not set. * @retval ::NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area. - * @retval ::NRF_ERROR_NO_MEM if no parameter page is provided (see SoftDevice Specification for more info) + * @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command. */ typedef struct { - uint32_t *bl_src; /**< Pointer to the source of the Bootloader to be be copied.*/ + uint32_t *bl_src; /**< Pointer to the source of the bootloader to be be copied.*/ uint32_t bl_len; /**< Number of 32 bit words to copy for BootLoader. */ } sd_mbr_command_copy_bl_t; @@ -156,15 +173,22 @@ typedef struct * Once this function has been called, this address is where the MBR will start to forward * interrupts to after a reset. * - * To restore default forwarding this function should be called with @ref address set to 0. The - * MBR will then start forwarding interrupts to the address in NFR_UICR->BOOTADDR or to the - * SoftDevice if the BOOTADDR is not set. + * To restore default forwarding, this function should be called with @ref address set to 0. If a + * bootloader is present, interrupts will be forwarded to the bootloader. If not, interrupts will + * be forwarded to the SoftDevice. + * + * The location of a bootloader can be specified in @ref MBR_BOOTLOADER_ADDR or + * @ref MBR_UICR_BOOTLOADER_ADDR. If both addresses are set, the MBR will prioritize + * @ref MBR_BOOTLOADER_ADDR. + * + * This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set, + * see @ref sd_mbr_command. * * On success, this function will not return. It will reset the device. * * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. * @retval ::NRF_ERROR_INVALID_ADDR if parameter address is outside of the flash size. - * @retval ::NRF_ERROR_NO_MEM if no parameter page is provided (see SoftDevice Specification for more info) + * @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command. */ typedef struct { @@ -213,19 +237,21 @@ typedef struct * * The @ref SD_MBR_COMMAND_COPY_BL and @ref SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET requires * parameters to be retained by the MBR when resetting the IC. This is done in a separate flash - * page provided by the application. The UICR register UICR.NRFFW[1] must be set to an address - * corresponding to a page in the application flash space. This page will be cleared by the MBR and - * used to store the command before reset. When the UICR.NRFFW[1] field is set the page it refers - * to must not be used by the application. If the UICR.NRFFW[1] is set to 0xFFFFFFFF (the default) - * MBR commands which use flash will be unavailable and return @ref NRF_ERROR_NO_MEM. + * page. The location of the flash page should be provided by the application in either + * @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR. If both addresses are set, the MBR + * will prioritize @ref MBR_PARAM_PAGE_ADDR. This page will be cleared by the MBR and is used to + * store the command before reset. When an address is specified, the page it refers to must not be + * used by the application. If no address is provided by the application, i.e. both + * @ref MBR_PARAM_PAGE_ADDR and @ref MBR_UICR_PARAM_PAGE_ADDR is 0xFFFFFFFF, MBR commands which use + * flash will be unavailable and return @ref NRF_ERROR_NO_MEM. * * @param[in] param Pointer to a struct describing the command. * - * @note For return values, see ::sd_mbr_command_copy_sd_t, ::sd_mbr_command_copy_bl_t, - * ::sd_mbr_command_compare_t, ::sd_mbr_command_vector_table_base_set_t, - * ::sd_mbr_command_irq_forward_address_set_t + * @note For a complete set of return values, see ::sd_mbr_command_copy_sd_t, + * ::sd_mbr_command_copy_bl_t, ::sd_mbr_command_compare_t, + * ::sd_mbr_command_vector_table_base_set_t, ::sd_mbr_command_irq_forward_address_set_t * - * @retval ::NRF_ERROR_NO_MEM if UICR.NRFFW[1] is not set (i.e. is 0xFFFFFFFF). + * @retval ::NRF_ERROR_NO_MEM No MBR parameter page provided * @retval ::NRF_ERROR_INVALID_PARAM if an invalid command is given. */ SVCALL(SD_MBR_COMMAND, uint32_t, sd_mbr_command(sd_mbr_command_t* param)); diff --git a/third_party/NordicSemiconductor/softdevice/s140/headers/nrf_sdm.h b/third_party/NordicSemiconductor/softdevice/s140/headers/nrf_sdm.h index 282e762e0..5dfbb287f 100644 --- a/third_party/NordicSemiconductor/softdevice/s140/headers/nrf_sdm.h +++ b/third_party/NordicSemiconductor/softdevice/s140/headers/nrf_sdm.h @@ -73,7 +73,7 @@ extern "C" { #define SD_MINOR_VERSION (1) /** @brief The bugfix version for the SoftDevice binary distributed with this header file. */ -#define SD_BUGFIX_VERSION (0) +#define SD_BUGFIX_VERSION (1) /** @brief The SoftDevice variant of this firmware. */ #define SD_VARIANT_ID 140