Skip to content

Commit

Permalink
Update Cordio host & controller stack to 21.04
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisswinchatt-arm committed Jul 19, 2021
1 parent cf54d36 commit 8afb1c5
Show file tree
Hide file tree
Showing 287 changed files with 11,474 additions and 5,042 deletions.
10 changes: 9 additions & 1 deletion connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h
Expand Up @@ -24,6 +24,7 @@
#include "ble/common/BLETypes.h"
#include "ble/driver/CordioHCITransportDriver.h"
#include "ble/common/blecommon.h"
#include "hal/ticker_api.h"

// FIXME: make this invisible!
#include "wsf_buf.h"
Expand Down Expand Up @@ -145,7 +146,14 @@ class CordioHCIDriver {
*
* Any call to write signals to the driver that the host stack is active.
*/
virtual void on_host_stack_inactivity();
virtual void on_host_stack_inactivity();

/**
* React to host stack preparing to enter deep sleep.
*
* \param[in] wakeTimeMs The amount of time in which to wake.
*/
virtual void on_deep_sleep(timestamp_t wakeTimeMs) {}

/* BLE Tester commands */

Expand Down
131 changes: 131 additions & 0 deletions connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/CHANGES.md
@@ -0,0 +1,131 @@
Change Log
r21.04

Improvements:

FW-3921 Deprecate power management API
FW-3996 Improve interoperability with connection establishment when LL_OP_MODE_FLAG_ENA_FEAT_LLCP_STARTUP is enabled
FW-4045 Relocate CIS Audio codec decode to end of CIS ISO event
FW-4047 CIS Should change RTE parameters if it cannot honor host-requested value

Defects fixed:

FW-3851 HCI_LE_CIS_Established event has MAX_PDUs fields zero on both Master and Slave
FW-3879 Incorrect AuxOffsetPtr value with large skip values
FW-3890 Master may not synchronize with PAST
FW-3981 HCI_LE_Setup_ISO_Data_Path for a BIS may incorrectly return success when clearing
FW-3982 HCI_LE_Read_Remote_Features may return bits not in controller-to-controller mask
FW-3986 HCI_Disconnect for CIS should return HCI_ERR_LOCAL_TERMINATED
FW-3987 CIS ISO test Rx mode incorrectly counts successful packets
FW-3989 Framed CIS test Rx mode will hang when receiving a data packet
FW-3995 HCI_LE_Read_Remote_Features with LL_OP_MODE_FLAG_ENA_FEAT_LLCP_STARTUP enabled may be disallowed
FW-3997 HCI_LE_Set_Address_Resolution_Enable set to FALSE may prevents controller from generating RPA for peer
FW-3998 HCI_LE_Set_Address_Resolution_Enable set to FALSE may incorrectly continue to resolve RPA packets
FW-3999 HCI_LE_ISO_Receive_Test for BIS does not receive when datapath is disabled
FW-4004 HCI_LE_Transmit_Power_Reporting not generated when delta is 0
FW-4005 Flushing of a PDU when a framed assembly has not started will discard the next valid PDU
FW-4020 Allow payload with SYNC_INFO when synchronizing with Periodic Advertiser
FW-4021 Periodic Synchronizer may use incorrect Aux Offset
FW-4028 IAL BIS case times out before able to complete test procedure
FW-4035 LL initialization directives are multiply defined
FW-4039 LL_FEAT_ISO_SYNC feature bit not set
FW-4042 CIS has MIC failure if two data packets are sent in same ISO event
FW-4044 Peripheral CIS is not able to be schedule after a connection update
FW-4046 CIS acknowledgement scheme does not work correctly
FW-4048 Peripheral CIS may not advance payloads even after central acknowledges them

Known limitations:

FW-3789 ISO timestamps and packet counters may not be aligned in certain scenarios
FW-3886 DLE max packet time should cap at 1M PHY when LE Coded PHY is disabled
FW-4063 HCI_LE_Advertising_Set_Terminated may report incorrect Num_Completed_Extended_Advertising_Events with ExtAdv using LE Coded PHY

r21.02

Improvements:

FW-3988 LeSetCigParams defensive coding for zero-division

Known limitations:

FW-3981 HCI_LE_Setup_ISO_Data_Path for a BIS may incorrectly return success when clearing
FW-3982 HCI_LE_Read_Remote_Features may return bits not in controller-to-controller mask
FW-3986 HCI_Disconnect for CIS should return HCI_ERR_LOCAL_TERMINATED
FW-3789 ISO timestamps and packet counters may not be aligned in certain scenarios
FW-3851 HCI_LE_CIS_Established event has MAX_PDUs fields zero on both Master and Slave
FW-3879 Incorrect AuxOffsetPtr value with large skip values
FW-3886 DLE max packet time should cap at 1M PHY when LE Coded PHY is disabled
FW-3890 Master may not synchronize with PAST
FW-3987 CIS ISO test Rx mode incorrectly counts successful packets
FW-3989 Framed CIS test Rx mode will hang when receiving a data packet
FW-3995 HCI_LE_Read_Remote_Features with LL_OP_MODE_FLAG_ENA_FEAT_LLCP_STARTUP enabled may be disallowed
FW-3997 HCI_LE_Set_Address_Resolution_Enable set to FALSE may prevents controller from generating RPA for peer
FW-3998 HCI_LE_Set_Address_Resolution_Enable set to FALSE may incorrectly continue to resolve RPA packets
FW-3999 HCI_LE_ISO_Receive_Test for BIS does not receive when datapath is disabled
FW-4004 HCI_LE_Transmit_Power_Reporting not generated when delta is 0
FW-4005 Flushing of a PDU when a framed assembly has not started will discard the next valid PDU

r20.12

Improvements:

FW-3385 Non-blocking scheme for PAL flash
FW-3728 Packetcraft Audio Cape for PCA10056
FW-3838 Token monitor utility script
FW-3848 CIS and BIS recombination of SDUs
FW-3862 BV32 codec integrated on nRF52840
FW-3864 Write flash between radio events on nRF52840
FW-3865 Nordic secure bootloader updates firmware from internal flash
FW-3876 Tester should have a way to sequentially queue ISO Packets
FW-3899 Controller should queue up disconnect commands for multiple CIS
FW-3905 Change BIS datapath to use generic functions
FW-3907 ITM SWO trace diagnostics
FW-3931 Power control monitor improvements
FW-3943 Sydney erratta: CIS RTE max removed (0x0F -> 0xFF)
FW-3949 LL_OP_MODE_FLAG_FORCE_CIS_CODED_PHY_S2 force CIS to use Coded PHY S2 option

Defects fixed:

FW-3263 Scanner may not filter AdvReport events when Filter Policy is 0x02 and RPA is used
FW-3781 Some broadcaster BIS PTO combinations may fail
FW-3821 BIS broadcaster may corrupt transmitted ISO SDUs
FW-3822 HCI_LE_BIG_Create_Sync does not filter on BIS[i]
FW-3831 HCI_GetVersion does not report build number
FW-3837 Incorrect BIS length will prevent adjacent BIS from receive
FW-3839 CIS interleaved uses incorrect channels on subevent 3+
FW-3841 Timer may expire early
FW-3845 CIS and ACL are using wrong channel parameters
FW-3846 BIS encryption may use incorrect packet counter
FW-3849 Command complete for setting CIG params will always return CIG=0
FW-3850 Disconnecting ACL with CIS does not return a terminated event for CIS
FW-3856 BIS should send lost packet SDUs to the host if no PDU is received
FW-3857 BIS Framed PDUs are not sent in consecutive subevents
FW-3858 Unframed BIS may send duplicate Data PDUs when BN > 1
FW-3868 LE_REMOVE_CIG command doesn't have CIG ID field.
FW-3869 Radio scheduler may operate on list out of order
FW-3870 PHY incorrect when using CIS encryption that differs in PHY with ACL
FW-3872 Removing CIS output data path returns command disallowed
FW-3873 Closing and re-opening the same CIS will not properly establish the second CIS
FW-3875 Controller will not send LLCP anymore if receiving UNKNOWN_RSP for a power control LLCP
FW-3877 LhciRegisterSendTrCompleteHandler() callback does not persist after HCI_Reset
FW-3878 Inline decryption does not filter encrypted packets that are NACK'ed
FW-3881 CIS may attempt transmission after a failed receive
FW-3882 CIS may receive on incorrect PHY when encrypted
FW-3883 CIS rx timeout will cause the whole ISO event to be canceled
FW-3884 CIS Slave encryption will not transmit correctly when bn StoM>0 and NSE>1
FW-3894 CIS Slave will not respond to ACL events if CIS is disconnected
FW-3895 CIS will not pass up lost or invalid SDUs to host
FW-3896 MIC failure upon establishing 2 CIS
FW-3906 Radio scheduler may overlap reservations
FW-3908 Periodic Advertising may not send SyncInfo when restarting
FW-3937 CIS MIC error returns two discconnection events
FW-3941 Advertising while scanning may skip first advertising event
FW-3942 CIS may duplicate packets when using codec datapath

Known limitations:

FW-3789 ISO timestamps and packet counters may not be aligned in certain scenarios
FW-3851 HCI_LE_CIS_Established event has MAX_PDUs fields zero on both Master and Slave
FW-3879 Incorrect AuxOffsetPtr value with large skip values
FW-3886 DLE max packet time should cap at 1M PHY when LE Coded PHY is disabled
FW-3890 Master may not synchronize with PAST
Expand Up @@ -350,6 +350,24 @@ void BbBleGetPerScanStats(BbBlePerScanPktStats_t *pStats);
/*************************************************************************************************/
void BbBleGetConnStats(BbBleDataPktStats_t *pStats);

/*************************************************************************************************/
/*!
* \brief Get CIS packet statistics.
*
* \param pStats CIS data statistics.
*/
/*************************************************************************************************/
void BbBleGetCisStats(BbBleDataPktStats_t *pStats);

/*************************************************************************************************/
/*!
* \brief Get BIS packet statistics.
*
* \param pStats BIS data statistics.
*/
/*************************************************************************************************/
void BbBleGetBisStats(BbBleDataPktStats_t *pStats);

/*************************************************************************************************/
/*!
* \brief Get test mode packet statistics.
Expand Down Expand Up @@ -404,15 +422,6 @@ void BbBleBisMasterInit(void);
/*************************************************************************************************/
void BbBleBisSlaveInit(void);

/*************************************************************************************************/
/*!
* \brief Get CIS packet statistics.
*
* \param pStats CIS data statistics.
*/
/*************************************************************************************************/
void BbBleGetCisStats(BbBleDataPktStats_t *pStats);

/*! \} */ /* BB_API_BLE */

#ifdef __cplusplus
Expand Down
Expand Up @@ -6,7 +6,7 @@
*
* Copyright (c) 2016-2019 Arm Ltd. All Rights Reserved.
*
* Copyright (c) 2019-2020 Packetcraft, Inc.
* Copyright (c) 2019-2021 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -99,6 +99,15 @@ typedef void (*BbBleTxAdvSetup_t)(BbOpDesc_t *pBod, uint32_t advTxTime);
/*! \brief Chain indication PDU transmit setup call signature. */
typedef uint32_t (*BbBleTxAuxSetup_t)(BbOpDesc_t *pBod, bool_t isChainInd);

/*! \brief Aux Rx setup call signature. Returns TRUE if Scan was programmed. */
typedef bool_t (*BbBleRxAuxSetup_t)(BbOpDesc_t *pBod, uint32_t refTime, uint32_t remScanDur);

/*! \brief Aux Tx complete call signature. Returns TRUE if BOD is complete. */
typedef bool_t (*BbBleAuxTxComp_t)(BbOpDesc_t *pBod, uint8_t status);

/*! \brief Aux Rx complete call signature. Returns TRUE if BOD is complete. */
typedef bool_t (*BbBleAuxRxComp_t)(BbOpDesc_t * const pCur, uint8_t status, int8_t rssi, uint32_t crc, uint32_t timestamp, uint8_t rxPhyOptions);

/*! \brief Returns TRUE if an scan request/response required. */
typedef bool_t (*BbBleAdvComp_t)(BbOpDesc_t *pBod, const uint8_t *pBuf);

Expand Down Expand Up @@ -152,6 +161,13 @@ typedef struct
BbBleAdvComp_t txReqCback; /*!< Scan request completion callback. */
BbBleAdvComp_t rxRspCback; /*!< Scan response completion callback. */

/* Aux Scan BOD link */
BbOpDesc_t *auxScanBod; /*!< Pointer to the Aux Scan BOD */
BbBleRxAuxSetup_t auxScanCheckCback; /*!< Setup an Aux Scan that needs to be programmed ASAP. */
BbBleAuxTxComp_t auxScanTxCompCback; /*!< Aux Scan Tx complete. */
BbBleAuxRxComp_t auxScanRxCompCback; /*!< Aux Scan Rx complete. */
bool_t auxScanOpRunning; /*!< Informs if an Aux Scan operation is running in the context of the Ext Scan BOD. */

uint8_t txReqLen; /*!< Scan request buffer length. */

uint8_t scanChMap; /*!< Scan channel map. */
Expand Down Expand Up @@ -202,6 +218,7 @@ typedef struct
uint8_t *pTxAuxReqBuf; /*!< Scan request buffer. */

BbBleAdvComp_t rxAuxAdvCback; /*!< Advertising completion callback. */
BbBleAdvPost_t rxAuxAdvPostCback; /*!< Advertising completion post callback. */
BbBleAdvComp_t rxAuxRspCback; /*!< Scan response completion callback. */
BbBleRxChain_t rxAuxChainCback; /*!< Chain completion callback. */
BbBleRxChainPost_t rxAuxChainPostCback;/*!< Chain completion post callback. */
Expand Down Expand Up @@ -291,13 +308,14 @@ typedef struct
/*! \brief CIS master event operation data (\ref BB_BLE_OP_MST_CIS_EVENT). */
typedef struct
{
BbBleCisCheckContOp_t checkContOpCback; /*!< Check whether to continue current operation callback. */
BbBleExec_t execCback; /*!< Execute callback. */
BbBleExec_t contExecCback; /*!< Continue execute callback. */
BbBleCisPostExec_t postSubEvtCback; /*!< Post subevent callback. */
BbBleCancel_t cancelCback; /*!< Cancel callback. */
BbBleTxDataComp_t txDataCback; /*!< Transmit completion callback. */
BbBleCisRxDataComp_t rxDataCback; /*!< Receive completion callback. */
BbBleCisCheckContOp_t checkContOpCback; /*!< Check whether to continue current operation callback. */
BbBleCisCheckContOp_t checkContOpPostCback; /*!< Check whether to continue current operation callback. */
BbBleExec_t execCback; /*!< Execute callback. */
BbBleExec_t contExecCback; /*!< Continue execute callback. */
BbBleCisPostExec_t postSubEvtCback; /*!< Post subevent callback. */
BbBleCancel_t cancelCback; /*!< Cancel callback. */
BbBleTxDataComp_t txDataCback; /*!< Transmit completion callback. */
BbBleCisRxDataComp_t rxDataCback; /*!< Receive completion callback. */
/* Return parameters. */
int8_t rssi; /*!< RSSI of the last received packet. */
uint8_t rxPhyOptions; /*!< Rx PHY options. */
Expand All @@ -306,13 +324,14 @@ typedef struct
/*! \brief CIS slave event operation data (\ref BB_BLE_OP_SLV_CIS_EVENT). */
typedef struct
{
BbBleCisCheckContOp_t checkContOpCback; /*!< Check whether to continue current operation callback. */
BbBleExec_t execCback; /*!< Execute callback. */
BbBleExec_t contExecCback; /*!< Continue execute callback. */
BbBleCisPostExec_t postSubEvtCback; /*!< Post subevent callback. */
BbBleCancel_t cancelCback; /*!< Cancel callback. */
BbBleTxDataComp_t txDataCback; /*!< Transmit completion callback. */
BbBleRxDataComp_t rxDataCback; /*!< Receive completion callback. */
BbBleCisCheckContOp_t checkContOpCback; /*!< Check whether to continue current operation callback. */
BbBleCisCheckContOp_t checkContOpPostCback; /*!< Check whether to continue current operation callback. */
BbBleExec_t execCback; /*!< Execute callback. */
BbBleExec_t contExecCback; /*!< Continue execute callback. */
BbBleCisPostExec_t postSubEvtCback; /*!< Post subevent callback. */
BbBleCancel_t cancelCback; /*!< Cancel callback. */
BbBleTxDataComp_t txDataCback; /*!< Transmit completion callback. */
BbBleRxDataComp_t rxDataCback; /*!< Receive completion callback. */

/* Return parameters. */
bool_t isFirstTs; /*!< True for the first timestamp. */
Expand Down Expand Up @@ -490,6 +509,49 @@ void BbBleBisRxData(uint8_t *pBuf, uint16_t len, uint32_t nextPduTime, PalBbBleC
/*************************************************************************************************/
void BbBleBisRxDataReAcq(uint32_t syncTime, PalBbBleChan_t *pChan);

/*************************************************************************************************/
/*!
* \brief Execute auxiliary scanning master BOD.
*
* \param pBod Pointer to the BOD to execute.
* \param pBle BLE operation parameters.
*/
/*************************************************************************************************/
void BbMstExecuteLinkedAuxScanOp(BbOpDesc_t *pBod, BbBleData_t *pBle);

/*************************************************************************************************/
/*!
* \brief Tx completion for auxiliary scanning master operation.
*
* \param status Completion status.
* \param pBod Pointer to the BOD
*
* Setup for next action in the operation or complete the operation.
*
* \return TRUE if BOD is complete, FALSE otherwise.
*/
/*************************************************************************************************/
bool_t BbMstAuxScanTxCompHandler(BbOpDesc_t * const pBod, uint8_t status);

/*************************************************************************************************/
/*!
* \brief Rx completion for auxiliary scanning master operation.
*
* \param pCur Pointer to the BOD
* \param status Reception status.
* \param rssi RSSI value.
* \param crc CRC value.
* \param timestamp Start of packet timestamp in microseconds.
* \param rxPhyOptions Rx PHY options.
*
* Setup for next action in the operation or complete the operation.
*
* \return TRUE if BOD is complete, FALSE otherwise.
*/
/*************************************************************************************************/
bool_t BbMstAuxScanRxCompHandler(BbOpDesc_t * const pCur, uint8_t status, int8_t rssi, uint32_t crc,
uint32_t timestamp, uint8_t rxPhyOptions);

/*! \} */ /* BB_API_BLE */

#ifdef __cplusplus
Expand Down
Expand Up @@ -6,7 +6,7 @@
*
* Copyright (c) 2016-2018 Arm Ltd. All Rights Reserved.
*
* Copyright (c) 2019-2020 Packetcraft, Inc.
* Copyright (c) 2019-2021 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,6 +44,10 @@ extern "C" {
/*! \brief Set a flag. */
#define BB_BLE_PDU_FILT_SET_FLAG(pFilt, flag) (pFilt)->flags |= BB_BLE_PDU_FILT_FLAG_##flag;

/*! \brief Clear a flag. */
#define BB_BLE_PDU_FILT_CLR_FLAG(pFilt, flag) (pFilt)->flags &= ~(BB_BLE_PDU_FILT_FLAG_##flag);


/*! \brief PDU filtering flags. */
enum
{
Expand Down
Expand Up @@ -76,6 +76,7 @@ void LhciBisSlaveInit(void);
void LhciBisMasterInit(void);
void LhciIsoInit(void);
void LhciPowerControlInit(void);
void LhciEnhConnUpdateInit(void);
void LhciVsExtInit(lhciCmdHandler_t decodeCmd);
void LhciHandlerInit(wsfHandlerId_t handlerId);
void LhciHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
Expand Down

0 comments on commit 8afb1c5

Please sign in to comment.