Skip to content

Commit

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

Signed-off-by: Rubin Ingwer Gerritsen <rubin.gerritsen@nordicsemi.no>
  • Loading branch information
rugeGerritsen committed Apr 22, 2024
1 parent 6d10bf7 commit 2e6b874
Show file tree
Hide file tree
Showing 30 changed files with 184 additions and 71 deletions.
11 changes: 11 additions & 0 deletions softdevice_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ 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).
* Vendor-specific HCI command to configure the scanner and initiator to either accept or reject extended advertising packets.
See :c:func:`sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set` (DRGN-21755).

Changes
=======
Expand All @@ -28,6 +30,15 @@ Changes
* 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)
* The application can now configure the amount of RAM allocated for the RX ISO SDUs.
The |controller| now uses the field ``rx_sdu_buffer_size`` in ``sdc_cfg_iso_buffer_cfg_t``.
The macro :c:macro:`SDC_MEM_ISO_RX_SDU_POOL_SIZE` has been changed to take the maximum RX SDU size as an input.
This change does not affect applications developed in the |NCS| context. (DRGN-21650)
* The application can now configure the amount of RAM allocated for the TX ISO SDUs.
The fields ``tx_sdu_buffer_count`` and ``tx_sdu_buffer_size`` in ``sdc_cfg_iso_buffer_cfg_t`` are added.
The fields ``tx_hci_buffer_count`` and ``tx_hci_buffer_size`` in ``sdc_cfg_iso_buffer_cfg_t`` are removed.
The macros :c:macro:`SDC_MEM_ISO_TX_PDU_POOL_SIZE` and :c:macro:`SDC_MEM_ISO_TX_SDU_POOL_SIZE` replace :c:macro:`SDC_MEM_ISO_TX_POOL_SIZE`.
This change does not affect applications developed in the |NCS| context. (DRGN-21650)

Bug fixes
=========
Expand Down
35 changes: 2 additions & 33 deletions softdevice_controller/include/sdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,9 @@ extern "C" {
/** @brief Default ISO RX SDU buffer size. */
#define SDC_DEFAULT_ISO_RX_SDU_BUFFER_SIZE 251

/** @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

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

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

Expand Down Expand Up @@ -301,9 +295,6 @@ extern "C" {
#define SDC_MEM_ISO_RX_PDU_POOL_PER_STREAM_SIZE(rx_pdu_buffer_per_stream_count, cis_count, bis_sink_count) \
(__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_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. */
Expand All @@ -323,18 +314,6 @@ extern "C" {
* @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.
* 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. */
#define SDC_MEM_ISO_TX_POOL_SIZE(tx_hci_buffer_count, tx_pdu_buffer_per_stream_count, cis_count, bis_source_count) \
(((tx_hci_buffer_count) > 0 && (tx_pdu_buffer_per_stream_count) > 0) ? \
(__MEM_PER_ISO_TX_HCI_BUFFER(tx_hci_buffer_count) \
+ (__MEM_PER_ISO_PDU_POOL(tx_pdu_buffer_per_stream_count) * ((cis_count) + (bis_source_count))) \
) : 0)

/** @} end of sdc_mem_defines */

/** @brief Function prototype for the fault handler.
Expand Down Expand Up @@ -472,21 +451,11 @@ typedef struct

typedef struct
{
/** Configures the number of shared HCI TX buffers allocated for ISO.
*
* 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.
Expand Down
114 changes: 107 additions & 7 deletions softdevice_controller/include/sdc_hci_cmd_le.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ enum sdc_hci_opcode_le
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_subrate_request(). */
SDC_HCI_OPCODE_CMD_LE_SUBRATE_REQUEST = 0x207e,
/** @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 @@ -1610,6 +1612,17 @@ typedef __PACKED_STRUCT
uint16_t supervision_timeout;
} sdc_hci_cmd_le_set_default_subrate_t;

/** @brief LE Subrate Request command parameter(s). */
typedef __PACKED_STRUCT
{
uint16_t conn_handle;
uint16_t subrate_min;
uint16_t subrate_max;
uint16_t max_latency;
uint16_t continuation_number;
uint16_t supervision_timeout;
} sdc_hci_cmd_le_subrate_request_t;

/** @brief LE Set Periodic Advertising Subevent Data command parameter(s). */
typedef __PACKED_STRUCT
{
Expand Down Expand Up @@ -6977,18 +6990,18 @@ uint8_t sdc_hci_cmd_le_set_data_related_address_changes(const sdc_hci_cmd_le_set
* 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 HCI_LE_Set_Default_Subrate command is used by the Host to set the ini-
* tial values for the acceptable parameters for subrating requests, as defined by
* the HCI_LE Subrate_Request command (see 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.
* 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.
*
Expand All @@ -6998,6 +7011,93 @@ uint8_t sdc_hci_cmd_le_set_data_related_address_changes(const sdc_hci_cmd_le_set
*/
uint8_t sdc_hci_cmd_le_set_default_subrate(const sdc_hci_cmd_le_set_default_subrate_t * p_params);

/** @brief LE Subrate Request.
*
* The description below is extracted from Core_v5.4,
* Vol 4, Part E, Section 7.8.124
*
* The HCI_LE_Subrate_Request command is used by a Central or a Peripheral
* to request a change to the subrating factor and/or other parameters (see [Vol 6]
* Part B, Section 4.5.1) applied to an existing connection using the Connection
* Subrate Update procedure.
*
* The Subrate_Min and Subrate_Max parameters specify the range of accept-
* able subrating factors being requested.
*
* The Max_Latency parameter specifies the maximum Peripheral latency in units
* of subrated connection events. The same maximum shall apply irrespective of
* the subrating factor actually chosen.
*
* The Continuation_Number parameter specifies the number of underlying con-
* nection intervals to remain active after a packet (other than an empty packet) is
* transmitted or received.
*
* The Supervision_Timeout parameter specifies the link supervision timeout for
* the connection. The Supervision_Timeout, in milliseconds, shall be greater
* than 2 × current connection interval × Subrate_Max × (Max_Latency + 1).
*
* If this command is issued on the Central, the following rules shall apply when
* the Controller initiates the Connection Subrate Update procedure (see [Vol 6]
* Part B, Section 5.1.19):
* • The Peripheral latency shall be less than or equal to Max_Latency.
* • The subrate factor shall be between Subrate_Min and Subrate_Max.
* • The continuation number shall be equal to the lesser of Continuation_-
* Number and (subrate factor - 1).
* • The connection supervision timeout shall be equal to Supervision_Timeout.
*
* If this command is issued on the Central, it also sets the acceptable parame-
* ters for requests from the Peripheral (see [Vol 6] Part B, Section 5.1.20). The
* acceptable parameters set by this command override those provided via the
* HCI_LE_Set_Default_Subrate command or any values set by previous uses of
* this command on the same connection.
* If this command is issued on the Central before the devices have performed
* the Feature Exchange procedure, then the Controller shall complete that pro-
* cedure before initiating the Connection Subrate Update procedure.
*
* If this command is issued on the Peripheral, the following rules shall apply
* when the Controller initiates the Connection Subrate Request procedure:
* • The Peripheral latency shall be less than or equal to Max_Latency.
* • The minimum and maximum subrate factors shall be between Subrate_Min
* and Subrate_Max.
* • The continuation number shall be equal to the lesser of Continuation_-
* Number and (maximum subrate factor - 1).
* • The connection supervision timeout shall be equal to Supervision_Timeout.
*
* If the Connection_Handle parameter does not identify a current ACL connec-
* tion, the Controller shall return the error code Unknown Connection Identifier
* (0x02).
*
* If the Host issues this command with parameters such that Subrate_Max ×
* (Max_Latency + 1) is greater than 500 or the current connection interval ×
* Subrate_Max × (Max_Latency + 1) is greater than or equal to half the
* Supervision_Timeout parameter, the Controller shall return the error code
* Invalid HCI Command Parameters (0x12).
*
* If the Host issues this command with Subrate_Max less than Subrate_Min, the
* Controller shall return the error code Invalid HCI Command Parameters (0x12).
*
* If the Host issues this command with Continuation_Number greater than or
* equal to Subrate_Max, then the Controller shall return the error code Invalid
* HCI Command Parameters (0x12).
*
* If the Central's Host issues this command when the Connection Subrating
* (Host Support) bit is not set in the Peripheral's FeatureSet, the Controller shall
* return the error code Unsupported Remote Feature (0x1A).
*
* Event(s) generated (unless masked away):
* When the Controller receives the HCI_LE_Subrate_Request command, the
* Controller sends the HCI_Command_Status event to the Host. An HCI_LE_-
* Subrate_Change event shall be generated when the Connection Subrate
* Update procedure has completed.
*
* @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_subrate_request(const sdc_hci_cmd_le_subrate_request_t * p_params);

/** @brief LE Set Periodic Advertising Subevent Data.
*
* The description below is extracted from Core_v5.4,
Expand Down
35 changes: 34 additions & 1 deletion softdevice_controller/include/sdc_hci_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ enum sdc_hci_opcode_vs
/** @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,
SDC_HCI_OPCODE_CMD_VS_SCAN_CHANNEL_MAP_SET = 0xfd1b,
/** @brief See @ref sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set(). */
SDC_HCI_OPCODE_CMD_VS_SCAN_ACCEPT_EXT_ADV_PACKETS_SET = 0xfd1c,
};

/** @brief VS subevent Code values. */
Expand Down Expand Up @@ -201,6 +203,7 @@ typedef __PACKED_STRUCT
uint8_t cig_reserved_time_set : 1;
uint8_t cis_subevent_length_set : 1;
uint8_t scan_channel_map_set : 1;
uint8_t scan_accept_ext_adv_packets_set : 1;
} sdc_hci_vs_supported_vs_commands_t;

/** @brief Zephyr Static Address type. */
Expand Down Expand Up @@ -711,6 +714,13 @@ typedef __PACKED_STRUCT
uint8_t channel_map[5];
} sdc_hci_cmd_vs_scan_channel_map_set_t;

/** @brief Scan accept extended advertising packets set command parameter(s). */
typedef __PACKED_STRUCT
{
/** @brief Set to 1 to accept or 0 to ignore extended advertising packets. */
uint8_t accept_ext_adv_packets;
} sdc_hci_cmd_vs_scan_accept_ext_adv_packets_set_t;

/** @} end of HCI_COMMAND_PARAMETERS */

/**
Expand Down Expand Up @@ -1607,6 +1617,29 @@ uint8_t sdc_hci_cmd_vs_cis_subevent_length_set(const sdc_hci_cmd_vs_cis_subevent
*/
uint8_t sdc_hci_cmd_vs_scan_channel_map_set(const sdc_hci_cmd_vs_scan_channel_map_set_t * p_params);

/** @brief Scan accept extended advertising packets set.
*
* This command enables or disables reception of extended advertising packets when extended scanner
* or extended initiator HCI commands are used.
*
* When reception of extended advertising packets is disabled, the scanner may be able to receive
* more legacy advertising packets.
* Reception of extended advertising packets should only be disabled when the application knows it
* is not interested in reports from extended advertisers.
*
* After HCI Reset, reception of extended advertising packets is enabled.
*
* 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_accept_ext_adv_packets_set(const sdc_hci_cmd_vs_scan_accept_ext_adv_packets_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: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x21BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x21BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:35:11Z'
timestamp: '2024-04-19T10:50:51Z'
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: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x11BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x11BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:34:03Z'
timestamp: '2024-04-19T10:49:37Z'
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: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x11BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x11BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:34:03Z'
timestamp: '2024-04-19T10:49:37Z'
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: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x11BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x11BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:34:03Z'
timestamp: '2024-04-19T10:49:37Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x41BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x41BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:37:13Z'
timestamp: '2024-04-19T10:53:25Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x41BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x41BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:37:13Z'
timestamp: '2024-04-19T10:53:25Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x41BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x41BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:37:13Z'
timestamp: '2024-04-19T10:53:25Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x31BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x31BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:38:17Z'
timestamp: '2024-04-19T10:54:49Z'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: SoftDevice Controller
git_revision: 11bdc9a50cf9b58c1c75fad164c3caadbdfbae72
ll_subversion_number: '0x31BA'
git_revision: 89cef72a786f96b8f2b144abb6e47aff4fc34efb
ll_subversion_number: '0x31BC'
ll_version_number: '0x0D'
timestamp: '2024-04-17T10:38:17Z'
timestamp: '2024-04-19T10:54:49Z'
Binary file not shown.
Loading

0 comments on commit 2e6b874

Please sign in to comment.