Skip to content

Commit

Permalink
softdevice_controller: rev 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
Browse files Browse the repository at this point in the history
CHANGELOG.rst contains the list of changes.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
  • Loading branch information
olivier-le-sage committed Apr 17, 2024
1 parent 422133d commit ad7d4d5
Show file tree
Hide file tree
Showing 31 changed files with 161 additions and 44 deletions.
6 changes: 6 additions & 0 deletions softdevice_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ Added
=====

* Experimental support for scanning and initiating at the same time. (DRGN-19050)
* Vendor-specific HCI command to set the channel map for scanning and initiating.
See :c:func:`sdc_hci_cmd_vs_scan_channel_map_set` (DRGN-19730).

Changes
=======

* Scan windows are no longer limited to 16 seconds. (DRGN-19050)
* The deprecated functions :c:func:`rand_prio_low_get` and :c:func:`rand_prio_high_get` have been removed.
This change does not affect applications developed in the |NCS| context. (DRGN-20473)
* The HCI commands used to configure a scanner or initiator no longer return ``BT_HCI_ERR_INVALID_PARAM`` when the sum of scan windows is greater than the scan interval.
Now the controller will truncate the scan windows so that the sum of the windows fit within the scan interval. (DRGN-21710)
* The vendor-specific Set Connection Event Trigger command can now be used with advertising sets. (DRGN-21665)

Bug fixes
=========
Expand All @@ -35,6 +39,8 @@ Bug fixes
This issue would not occur if the supervision timeout was set to a value smaller than the onces mentioned above (DRGN-21619).
* Fixed an issue where the peripheral waited for a link to time out when tearing down the connection.
This happened when the central would acknowledge ``TERMINATE_IND`` in the same event as it was being sent (DRGN-21637).
* Fixed an issue where the |controller| would accept the HCI LE Set Random Address command while passive scanning had been enabled.
The |controller| now returns the error code ``0x0D`` in this case. (DRGN-19050)

nRF Connect SDK v2.6.0
**********************
Expand Down
47 changes: 41 additions & 6 deletions softdevice_controller/include/sdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,15 @@ extern "C" {
/** @brief Default HCI ISO TX buffer count. */
#define SDC_DEFAULT_ISO_TX_HCI_BUFFER_COUNT 0

/** @brief Default ISO SDU TX buffer count. */
#define SDC_DEFAULT_ISO_TX_SDU_BUFFER_COUNT 0

/** @brief Default HCI ISO TX buffer size. */
#define SDC_DEFAULT_ISO_TX_HCI_BUFFER_SIZE 251

/** @brief Default ISO SDU TX buffer size. */
#define SDC_DEFAULT_ISO_TX_SDU_BUFFER_SIZE 247

/** @brief Default ISO TX PDU buffer per stream count. */
#define SDC_DEFAULT_ISO_TX_PDU_BUFFER_PER_STREAM_COUNT 0

Expand All @@ -148,8 +154,8 @@ extern "C" {
*/

/** @brief Auxiliary defines, not to be used outside of this file. */
#define __MEM_MINIMAL_CENTRAL_LINK_SIZE 996
#define __MEM_MINIMAL_PERIPHERAL_LINK_SIZE 1124
#define __MEM_MINIMAL_CENTRAL_LINK_SIZE 1004
#define __MEM_MINIMAL_PERIPHERAL_LINK_SIZE 1132
#define __MEM_TX_BUFFER_OVERHEAD_SIZE 15
#define __MEM_RX_BUFFER_OVERHEAD_SIZE 14

Expand Down Expand Up @@ -207,8 +213,8 @@ extern "C" {
#define SDC_MEM_FAL(max_num_entries) ((max_num_entries) > 0 ? (4 + (max_num_entries) * 8) : 0)

/** @brief Auxiliary defines, not to be used outside of this file. */
#define __MEM_PER_ADV_SET_LOW(max_adv_data) ((4752+(max_adv_data)*18)/10)
#define __MEM_PER_ADV_SET_HIGH(max_adv_data) (665+(max_adv_data))
#define __MEM_PER_ADV_SET_LOW(max_adv_data) ((4833+(max_adv_data)*18)/10)
#define __MEM_PER_ADV_SET_HIGH(max_adv_data) (671+(max_adv_data))
#define __MEM_PER_PERIODIC_ADV_SET_LOW(max_adv_data) ((2658+(max_adv_data)*18)/10)
#define __MEM_PER_PERIODIC_ADV_SET_HIGH(max_adv_data) (457+(max_adv_data))

Expand Down Expand Up @@ -296,11 +302,30 @@ extern "C" {
(__MEM_PER_ISO_PDU_POOL(rx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_sink_count)))

/** @brief Maximum memory required for the ISO RX path SDUs. */
#define SDC_MEM_ISO_RX_SDU_POOL_SIZE(count) ((count) > 0 ? (8 + (count) * 272) : 0)
#define SDC_MEM_ISO_RX_SDU_POOL_SIZE_DEPRECATED(count) ((count) > 0 ? (8 + (count) * 272) : 0)

/** @brief Maximum memory required for the ISO RX path SDUs.
* @param[in] count Number of shared SDUs allocated for the RX path.
* @param[in] size Maximum size of SDUs being used. */
#define SDC_MEM_ISO_RX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (8 + (count) * ((size) + 21)) : 0)

/** @brief Maximum memory required for the ISO TX PDU pool.
* @param[in] tx_pdu_buffer_per_stream_count Number of TX PDU buffers allocated for each BIS or CIS stream.
* For BIS, this value determines the number of pretransmission that can be stored.
* @param[in] cis_count The number of supported CIS streams.
* @param[in] bis_source_count The number of supported source BIS streams. */
#define SDC_MEM_ISO_TX_PDU_POOL_SIZE(tx_pdu_buffer_per_stream_count, cis_count, bis_source_count) \
((tx_pdu_buffer_per_stream_count) > 0 ? \
__MEM_PER_ISO_PDU_POOL(tx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_source_count)) : 0)

/** @brief Maximum memory required for the ISO TX path SDUs.
* @param[in] count Number of shared SDUs allocated for the TX path.
* @param[in] size Maximum size of SDUs being used. */
#define SDC_MEM_ISO_TX_SDU_POOL_SIZE(count, size) ((count) > 0 ? (12 + (count) * ((size) + 53)) : 0)

/** @brief Maximum memory required for the ISO TX pool.
* @param[in] tx_hci_buffer_count Number of HCI ISO TX buffers.
* @param[in] tx_pdu_buffer_per_stream_count Number of TX PDU buffers allocated for each BIS or CIS stream. Minimum of 1.
* @param[in] tx_pdu_buffer_per_stream_count Number of TX PDU buffers allocated for each BIS or CIS stream.
* For BIS, this value determines the maximum supported pretransmission offset.
* @param[in] cis_count The number of supported CIS streams.
* @param[in] bis_source_count The number of supported source BIS streams. */
Expand Down Expand Up @@ -452,11 +477,21 @@ typedef struct
* Default: @ref SDC_DEFAULT_ISO_TX_HCI_BUFFER_COUNT.
*/
uint8_t tx_hci_buffer_count;
/** Configures the number of shared SDU TX buffers allocated for ISO.
*
* Default: @ref SDC_DEFAULT_ISO_TX_SDU_BUFFER_COUNT.
*/
uint8_t tx_sdu_buffer_count;
/** Configures the size of shared HCI TX buffers allocated for ISO.
*
* Default: @ref SDC_DEFAULT_ISO_TX_HCI_BUFFER_SIZE.
*/
uint16_t tx_hci_buffer_size;
/** Configures the size of shared SDU TX buffers allocated for ISO.
*
* Default: @ref SDC_DEFAULT_ISO_TX_SDU_BUFFER_SIZE.
*/
uint16_t tx_sdu_buffer_size;
/** Configures the number of TX PDU buffers allocated per ISO stream.
*
* This is the number of maximum size (251 bytes) PDU buffers. When PDU size is smaller
Expand Down
38 changes: 38 additions & 0 deletions softdevice_controller/include/sdc_hci_cmd_le.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ enum sdc_hci_opcode_le
SDC_HCI_OPCODE_CMD_LE_SET_TRANSMIT_POWER_REPORTING_ENABLE = 0x207a,
/** @brief See @ref sdc_hci_cmd_le_set_data_related_address_changes(). */
SDC_HCI_OPCODE_CMD_LE_SET_DATA_RELATED_ADDRESS_CHANGES = 0x207c,
/** @brief See @ref sdc_hci_cmd_le_set_default_subrate(). */
SDC_HCI_OPCODE_CMD_LE_SET_DEFAULT_SUBRATE = 0x207d,
/** @brief See @ref sdc_hci_cmd_le_set_periodic_adv_subevent_data(). */
SDC_HCI_OPCODE_CMD_LE_SET_PERIODIC_ADV_SUBEVENT_DATA = 0x2082,
/** @brief See @ref sdc_hci_cmd_le_set_periodic_adv_response_data(). */
Expand Down Expand Up @@ -1598,6 +1600,16 @@ typedef __PACKED_STRUCT
} change_reasons;
} sdc_hci_cmd_le_set_data_related_address_changes_t;

/** @brief LE Set Default Subrate command parameter(s). */
typedef __PACKED_STRUCT
{
uint16_t subrate_min;
uint16_t subrate_max;
uint16_t max_latency;
uint16_t continuation_number;
uint16_t supervision_timeout;
} sdc_hci_cmd_le_set_default_subrate_t;

/** @brief LE Set Periodic Advertising Subevent Data command parameter(s). */
typedef __PACKED_STRUCT
{
Expand Down Expand Up @@ -6960,6 +6972,32 @@ uint8_t sdc_hci_cmd_le_set_transmit_power_reporting_enable(const sdc_hci_cmd_le_
*/
uint8_t sdc_hci_cmd_le_set_data_related_address_changes(const sdc_hci_cmd_le_set_data_related_address_changes_t * p_params);

/** @brief LE Set Default Subrate.
*
* The description below is extracted from Core_v5.4,
* Vol 4, Part E, Section 7.8.123
*
* The HCI_LE_Set_Default_Subrate command is used by the Host to set the initial
* values for the acceptable parameters for subrating requests, as defined by the
* HCI_LE Subrate_Request command (see [Vol 4] Section 7.8.124), for all future ACL
* connections where the Controller is the Central. This command does not affect any
* existing connection.
*
* The parameters have the same meanings and restrictions as those in the
* HCI_LE_Subrate_Request command.
*
* Event(s) generated (unless masked away):
* When the Controller receives the HCI_LE_Set_Default_Subrate command, the Controller
* sends the HCI_Command_Complete event to the Host.
*
* @param[in] p_params Input parameters.
*
* @retval 0 if success.
* @return Returns value between 0x01-0xFF in case of error.
* See Vol 2, Part D, Error for a list of error codes and descriptions.
*/
uint8_t sdc_hci_cmd_le_set_default_subrate(const sdc_hci_cmd_le_set_default_subrate_t * p_params);

/** @brief LE Set Periodic Advertising Subevent Data.
*
* The description below is extracted from Core_v5.4,
Expand Down
51 changes: 46 additions & 5 deletions softdevice_controller/include/sdc_hci_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ enum sdc_hci_opcode_vs
SDC_HCI_OPCODE_CMD_VS_CIG_RESERVED_TIME_SET = 0xfd19,
/** @brief See @ref sdc_hci_cmd_vs_cis_subevent_length_set(). */
SDC_HCI_OPCODE_CMD_VS_CIS_SUBEVENT_LENGTH_SET = 0xfd1a,
/** @brief See @ref sdc_hci_cmd_vs_scan_channel_map_set(). */
SDC_HCI_OPCODE_CMD_VS_SCAN_CHANNEL_MAP_SET = 0xfd20,
};

/** @brief VS subevent Code values. */
Expand Down Expand Up @@ -143,6 +145,8 @@ enum sdc_hci_vs_conn_event_trigger_role
SDC_HCI_VS_CONN_EVENT_TRIGGER_ROLE_INIT = 0x02,
/** @brief Connection event trigger for connections (Central or Peripheral). */
SDC_HCI_VS_CONN_EVENT_TRIGGER_ROLE_CONN = 0x03,
/** @brief Connection event trigger for the Advertiser. */
SDC_HCI_VS_CONN_EVENT_TRIGGER_ROLE_ADV = 0x04,
};

/** @brief Peripheral latency disable/enable modes. */
Expand Down Expand Up @@ -196,6 +200,7 @@ typedef __PACKED_STRUCT
uint8_t big_reserved_time_set : 1;
uint8_t cig_reserved_time_set : 1;
uint8_t cis_subevent_length_set : 1;
uint8_t scan_channel_map_set : 1;
} sdc_hci_vs_supported_vs_commands_t;

/** @brief Zephyr Static Address type. */
Expand Down Expand Up @@ -695,6 +700,17 @@ typedef __PACKED_STRUCT
uint32_t cis_subevent_length_us;
} sdc_hci_cmd_vs_cis_subevent_length_set_t;

/** @brief Set the channel map for scanning and initiating. command parameter(s). */
typedef __PACKED_STRUCT
{
/** @brief This parameter contains 40 1-bit fields. The nth such field (in the range 0 to 39)
* contains the value for the Link Layer channel index n. Set the bit to 1 to enable the
* channel. Only channel index 37, 38 and 39 are supported. The remaining bits shall be
* set to 1.
*/
uint8_t channel_map[5];
} sdc_hci_cmd_vs_scan_channel_map_set_t;

/** @} end of HCI_COMMAND_PARAMETERS */

/**
Expand Down Expand Up @@ -1326,28 +1342,32 @@ uint8_t sdc_hci_cmd_vs_central_acl_event_spacing_set(const sdc_hci_cmd_vs_centra
* When used for connections, the connection event trigger can be configured to trigger
* every N connection events starting from a given connection event counter.
*
* Disabling scanning or disconnecting the connection will reset the connection event
* trigger configuration.
* Disabling scanning, removing the advertising set, or disconnecting the connection will reset the
* connection event trigger configuration.
*
* If the selected (D)PPI channel is reserved by the controller, the controller will
* return the error code Invalid HCI Command Parameters (0x12).
*
* If enabling/disabling the connection event trigger and the trigger is already
* enabled/disabled, the controller will return the error code Command Disallowed (0x0C).
*
* If the specified role is not currently active, the controller will return the error code
* Command Disallowed (0x0C).
* If the role is 0x1, 0x2, or 0x4, and the role is not currently active,
* the controller will return the error code Command Disallowed (0x0C).
*
* If the role is 0x3 and conn_handle does not refer to an active connection, the controller
* will return the error code Unknown Connection Identifier (0x02).
*
* If the role is 0x4 and legacy advertising is used, conn_handle must be set to 0.
* If extended advertising is used, conn_handle must refer to an active advertising set.
* Otherwise, the controller will return the error code Unknown Advertising Identifier (0x42).
*
* If the role is 0x3 and conn_evt_counter_start has already passed, the controller will return
* the error code Command Disallowed (0x0C).
*
* If the role is 0x3 and period_in_events is zero, the controller will return the error code
* Invalid HCI Command Parameters (0x12).
*
* If the role is 0x1 or 0x2 and conn_evt_counter_start or period_in_events is non-zero,
* If the role is 0x1, 0x2, or 0x4 and conn_evt_counter_start or period_in_events is non-zero,
* the controller will return the error code Invalid HCI Command Parameters (0x12).
*
* Event(s) generated (unless masked away):
Expand Down Expand Up @@ -1566,6 +1586,27 @@ uint8_t sdc_hci_cmd_vs_cig_reserved_time_set(const sdc_hci_cmd_vs_cig_reserved_t
*/
uint8_t sdc_hci_cmd_vs_cis_subevent_length_set(const sdc_hci_cmd_vs_cis_subevent_length_set_t * p_params);

/** @brief Set the channel map for scanning and initiating.
*
* This command sets the RF channels that should be used for scanning and initiating
* on the primary advertising channels. The channel map will be used for subsequent
* commands to start scanning or to create connections. Scanning and initiating
* that was started before issuing this command is not affected.
*
* The default behavior is to listan on all primary advertising channels.
* The default behavior is restored when issuing the HCI Reset command.
*
* Event(s) generated (unless masked away):
* When the command has completed, an HCI_Command_Complete event shall be generated.
*
* @param[in] p_params Input parameters.
*
* @retval 0 if success.
* @return Returns value between 0x01-0xFF in case of error.
* See Vol 2, Part D, Error for a list of error codes and descriptions.
*/
uint8_t sdc_hci_cmd_vs_scan_channel_map_set(const sdc_hci_cmd_vs_scan_channel_map_set_t * p_params);

/** @} end of HCI_VS_API */

/** @} */
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x21B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x21BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:12:58Z'
timestamp: '2024-04-17T10:35:11Z'
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions softdevice_controller/lib/cortex-m4/hard-float/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x11B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x11BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:11:56Z'
timestamp: '2024-04-17T10:34:03Z'
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions softdevice_controller/lib/cortex-m4/soft-float/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x11B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x11BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:11:56Z'
timestamp: '2024-04-17T10:34:03Z'
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x11B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x11BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:11:56Z'
timestamp: '2024-04-17T10:34:03Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x41B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x41BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:15:29Z'
timestamp: '2024-04-17T10:37:13Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x41B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x41BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:15:29Z'
timestamp: '2024-04-17T10:37:13Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x41B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x41BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:15:29Z'
timestamp: '2024-04-17T10:37:13Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x31B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x31BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:16:53Z'
timestamp: '2024-04-17T10:38:17Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x31B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x31BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:16:53Z'
timestamp: '2024-04-17T10:38:17Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 02284f1ed0a4a2db75e775996ce59b8911ab0ab2
ll_subversion_number: '0x31B1'
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x31BA'
ll_version_number: '0x0D'
timestamp: '2024-04-08T12:16:53Z'
timestamp: '2024-04-17T10:38:17Z'
3 changes: 0 additions & 3 deletions softdevice_controller/limitations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ DRGN-11297: Maximum connection interval of 10 ms before entering LLPM-mode
* A first update to 10 ms connection interval.
* A second update to 1 ms connection interval.

DRGN-10305: Scan window is limited to 16 seconds
If the scanner is configured with a scan window larger than 16 seconds, the scanner will truncate the scan window to 16 seconds.

DRGN-8569: SEVONPEND flag must not be modified
Applications must not modify the SEVONPEND flag in the SCR register when running in priority levels higher than 6 (priority level numerical values lower than 6), as this can lead to undefined behavior.

Expand Down

0 comments on commit ad7d4d5

Please sign in to comment.