Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.60
Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.50

The Bluetooth Low Energy (BLE) middleware contains a comprehensive API to configure the BLE Stack and the underlying chip hardware.

The standalone BT Configurator is shipped in ModusToolbox to make it easy to configure PSoC 6 BLE Middleware.

Include cy_ble_common.h and cy_ble_event_handler.h to get access to all functions and other declarations in this library. If you are using the ModusToolbox BT Configurator, you can include cycfg_ble.h only.

The PSoC 6 BLE Middleware incorporates a Bluetooth Core Specification v5.0 compliant protocol stack. You may access the GAP, GATT and L2CAP layers of the stack using the API.

The API are broadly categorized as follows:

Features:

  • Multi-link supports for up to four simultaneous connections in any combination of roles
  • Bluetooth v5.0 compliant protocol stack
    • LE 2 Mbps
  • Generic Access Profile (GAP) features
    • Broadcaster, Observer, Peripheral and Central roles
    • User-defined advertising data
    • Bonding support for up to 128 devices
    • Security modes 1 and 2
  • Generic Attribute Profile (GATT) features
    • GATT Client and Server
    • 16-, 32-, and 128-bit UUIDs
  • Special Interest Group (SIG) adopted GATT-based Profiles and Services, and quick prototype of new profile design through intuitive BT Configurator Custom Profile development;
  • Security Manager features
    • Pairing methods: Just works, Passkey Entry, Out of Band, Numeric Comparison (LE Secure connections)
    • Authenticated man-in-the-middle (MITM) protection and data signing
  • Logical Link Control and Adaption Protocol (L2CAP) connection-oriented channel
  • Link Layer (LL) features
    • Master and Slave roles
    • 128-bit AES encryption
    • Low Duty Cycle Advertising
    • LE Ping
    • Privacy 1.2
    • Data length extension (DLE)

When to use the BLE

BLE is used in very low-power network and Internet of Things (IoT) solutions using low-cost battery operated devices that can quickly connect and form simple wireless links. Target applications include HID, remote controls, sports and fitness monitors, portable medical devices and smart phone accessories, among many others.

SIG adopted Profiles and Services

The BLE resource supports numerous SIG-adopted GATT-based Profiles and Services. Each of these can be configured for either a GATT Client or GATT Server. It generates all the necessary code for a particular Profile/Service operation, as configured in the BLE Configurator.

Custom Profiles

You can create custom Profiles that use existing Services, and you can create custom Services with custom Characteristics and Descriptors.

Debug Support

For testing and debugging, the PSoC 6 BLE Middleware can be configured to use Host Controller Interface (HCI) mode through a UART. Refer to Initialize and Enable PSoC 6 BLE Middleware in Controller-only Mode (HCI over Software API).

For over-the-air verification, the Cypress CySmart Central Emulation Tool can be used for generic Bluetooth host stack emulation.

PSoC 6 BLE Middleware Architecture

PSoC 6 BLE Middleware consists of the BLE Stack, BLE Profile, Hardware Abstraction Layer (HAL), and the Link Layer. The following figure shows the high-level architecture of the PSoC 6 BLE Middleware, illustrating the relationship between each of the layers and how the application interacts with the PSoC 6 BLE Middleware. Note that the application uses callback functions to handle BLE events, which you can use to build your state machine.

The following block diagram shows the architecture of PSoC 6 BLE Middleware under Complete BLE Protocol mode.

ble_architecture_single_cpu_mode.png

The following block diagram shows the architecture of PSoC 6 BLE Middleware under Controller Only mode (HCI over Software API).

ble_architecture_hci_mode.png

The following sub-sections give an overview of each of these layers.

BLE Stack

The BLE stack implements the core BLE functionality as defined in Bluetooth Core Specification 5.0. The stack is included as a pre-compiled library in the PSoC 6 BLE Middleware library. The BLE Stack implements the layered architecture of the BLE protocol stack as shown in the following figure.

ble_stack.png

Generic Access Profile (GAP)

The Generic Access Profile defines the procedures related to discovery of Bluetooth devices and the link- management aspects of connecting to Bluetooth devices. In addition, this profile includes common format requirements for parameters accessible on the user interface level.

The Generic Access Profile defines the following roles when operating over the LE physical channel:

  • Broadcaster role: A device operating in the Broadcaster role can send advertising events. It is referred to as a Broadcaster. It has a transmitter and may have a receiver.
  • Observer role: A device operating in the Observer role is a device that receives advertising events. It is referred to as an Observer. It has a receiver and may have a transmitter.
  • Peripheral role: A device that accepts an LE physical link using any of the connection establishment procedures is said to have a Peripheral role. A device operating in the Peripheral role will be in the "Slave role" in the Link Layer Connection State. A device operating in the Peripheral role is referred to as a Peripheral. A Peripheral has both a transmitter and a receiver.
  • Central role: A device that supports the Central role initiates the establishment of a physical connection. A device operating in the "Central role" will be in the "Master role" in the Link Layer Connection. A device operating in the Central role is referred to as a Central. A Central has a transmitter and a receiver.

Generic Attribute Profile (GATT)

The Generic Attribute Profile defines a generic service framework using the ATT protocol layer. This framework defines the procedures and formats of services and their characteristics. It defines the procedures for Service, Characteristic, and Descriptor discovery, reading, writing, notifying, and indicating Characteristics, as well as configuring the broadcast of Characteristics. GATT roles are:

  • GATT Client: This is the device that wants data. It initiates commands and requests to the GATT Server. It can receive responses, indications, and notifications data sent by the GATT Server.
  • GATT Server: This is the device that has the data and accepts incoming commands and requests from the GATT Client. It sends responses, indications, and notifications to a GATT Client. The BLE Stack can support both roles simultaneously.

Attribute Protocol (ATT)

The Attribute Protocol layer defines a Client/Server architecture above the BLE logical transport channel. The attribute protocol allows a device referred to as the GATT Server to expose a set of attributes and their associated values to a peer device referred to as the GATT Client. Attributes exposed by the GATT Server can be discovered, read, and written by a GATT Client, and can be indicated and notified by the GATT Server. All the transactions on attributes are atomic.

Security Manager Protocol (SMP)

The Security Manager Protocol defines the procedures and behavior to manage pairing, authentication, and encryption between the devices. These include:

  • Encryption and Authentication
  • Pairing and Bonding
    • Pass Key and Out of Band bonding
  • Key Generation for a device identity resolution, data signing, and encryption
  • Pairing method selection based on the IO capability of the GAP central and GAP peripheral device.

Logical Link Control Adaptation Protocol (L2CAP)

L2CAP provides a connectionless data channel. LE L2CAP provides the following features:

  • Channel multiplexing, which manages three fixed channels. Two channels are dedicated for higher protocol layers like ATT, SMP. One channel is used by the LE-L2CAP protocol signalling channel for its own use.
  • Segmentation and reassembly of packets whose size is up to the BLE Controller managed maximum packet size.
  • Connection-oriented channel over a specific application registered using the PSM (protocol service multiplexer) channel. It implements credit-based flow control between two LE L2CAP entities. This feature can be used for BLE applications that require transferring large chunks of data.

Host Controller Interface (HCI)

The HCI layer implements a command, event, and data interface to allow link layer access from upper layers such as GAP, L2CAP, and SMP.

Link Layer (LL)

The Link Layer implements a command, event, and data interface to allow link layer access from upper layers such as GAP, L2CAP, and SMP. The LL protocol manages the physical BLE connections between devices. It supports all LL states such as Advertising, Scanning, Initiating, and Connecting (Master and Slave). It implements all the key link control procedures such as LE Encryption, LE Connection Update, LE Channel Update, and LE Ping.

The Link Layer is a hardware-firmware co-implementation, where the key time critical LL functions are implemented in the LL hardware. The LL firmware maintains and controls the key LL procedure state machines. It supports all the BLE chip-specific low-power modes. The BLE Stack is a pre-compiled library. The appropriate configuration of the BLE Stack library is linked during a build process based on the application. The BLE Stack libraries are Arm Embedded Application Binary Interface (EABI) compliant and are compiled using Arm compiler version 5.03.

Profile Layer

In BLE, data is organized into concepts called Profiles, Services, and Characteristics.

  • A Profile describes how devices connect to each other to find and use Services. The Profile describes the type of application and the general expected behavior of that device. See the Parameter Configuration section of ModusToolbox Bluetooth Configurator Guide for configuring the PSoC 6 BLE Middleware.
  • A Service is a collection of data entities called Characteristics. A Service is used to define a certain function in a Profile. A Service may also define its relationship to other Services. A Service is assigned a Universally Unique Identifier (UUID). This is 16 bits for SIG adopted Services and 128 bits for custom Services. See the GATT Settings Tab section of ModusToolbox Bluetooth Configurator Guide for information about adding Services to a Profile.
  • A Characteristic contains a Value and the Descriptor that describes a Characteristic Value. It is an attribute type for a specific piece of information within a Service. Like a Service, each Characteristic is designated with a UUID; 16 bits for SIG adopted Characteristics and 128 bits for custom Characteristics. See the GATT Settings Tab section of ModusToolbox Bluetooth Configurator Guide for information about adding Characteristics and Descriptors. The following diagram shows the relationship between Profiles, Services, and Characteristics in a sample BLE heart rate monitor application using a Heart Rate Profile.
ble_profiles.png

The Heart Rate Profile contains a Heart Rate Service and a Device Information Service. Within the Heart Rate Service, there are three Characteristics, each containing different information. The device in the diagram is configured in the Sensor role, meaning that in the context of the Heart Rate Profile, the device is a GAP Peripheral and a GATT Server. These concepts are explained in the BLE Stack description.

The Profile layer is provided by PSoC 6 BLE Middleware using the parameter configurations specified in the Bluetooth Configurator. The Profile implements the Profile-specific attribute database and functions required for the application. You can choose to configure the standard SIG adopted Profile and generate a design, or define a Custom Profile required by an application.

Hardware Abstraction Layer (HAL)

The HAL implements the interface between the BLE stack and the underlying hardware. This layer is meant for the stack only and it is not advisable to modify it.

PSoC 6 BLE Middleware Changes

This section lists changes made to the PSoC 6 BLE Middleware.

VersionChangesReason for Change
3.60 Updated the procedure of processing the Write Request event from Stack. BLE middleware returns CY_BLE_EVT_GATTS_WRITE_REQ event twice for the Custom profile.
Updated Cy_BLE_Init function. Cy_BLE_Init() returns CY_BLE_ERROR_INVALID_PARAMETER when BLE configured as Observer or Broadcaster only.
Updated the BLE Stack to version 5.0.10.265. Refer to BLE Stack Changes.
3.50 Updated PILO part of BLESS MW HAL to be compatible with psoc6pdl 1.6.1.

Refer to section Configuring PILO for BLESS Deep Sleep Mode for details about the requirements for using the PILO as the LF clock source.
To support PILO on the PSoC 64 Secure device.
Added BLE Stack controller libraries with IPC communication (BLESS_CONTROLLER_IPC) for CM0+. Enable users to build their own CM0+ image with a BLE controller to operate in BLE Dual CPU mode.
Updated the procedure of processing the CY_BLE_EVT_GATTS_WRITE_REQ event: an error response (with reason INVALID_HANDLE) is sent, if the handle was processed neither by registered services nor an application BLE callback. Improved the handling of the CY_BLE_EVT_GATTS_WRITE_REQ event to allow operation with a custom GATT database.
Updated the CY_BLE_SFLASH_DIE_xxx macros (in cy_ble_gap.h) according to the PSoC 6 BLE production configuration. The silicon-generated "Company assigned" part of the device address has a high repetition rate of the generated MAC address.
Note
The silicon-generated "Company assigned" option does not guarantee a unique device address. For mass production, Cypress strongly suggests that the device address be programmed into the user area (Row 0) of the Sflash location via the SWD interface. Refer to section "Public device address" of ModusToolbox BT Configurator Guide for details
Added preprocessor expression to verify count of GATT database entries. BLE Stack supports maximum 512 entries of GATT database.
Documentation updates. Changed the code snippet for initial PILO trimming and updating the trim step-size in section Configuring PILO for BLESS Deep Sleep Mode.
Updated the BLE Stack to version 5.0.8.220.

Refer to BLE Stack Changes.

3.40 Added BLE Stack libraries for CM0+ core. Support BLE CM0+ Single CPU mode.
Updated the procedure of processing events to wait 10 ms on CY_BLE_EVT_SOFT_RESET_COMPLETE events. Ensure that the controller is completely reset before generating the event to the application. Refer to CY_BLE_EVT_SOFT_RESET_COMPLETE event documentation.
Updated the BLE Stack to version 5.0.7.196

Refer to BLE Stack Changes.

3.30 Updated the procedure of processing events to clear the cy_ble_pair_Status flags on CY_BLE_EVT_STACK_SHUTDOWN_COMPLETE and CY_BLE_EVT_SOFT_RESET_COMPLETE events. Cy_BLE_IsDevicePaired() falsely returned True prior to authentication after a radio reset.
Fixed the setting of a device address in handling the CY_BLE_EVT_STACK_ON event, if the BLE middleware is configured to operate only in the Broadcaster GAP role. With the BLE configured only as a broadcaster, the configuration for a BD address in the BLE customizer was not effective.
Documentation updates. Documentation update and clarification.
Updated the BLE Stack to version 5.0.6.161.

Refer to BLE Stack Changes.

3.20 Added support ARM Compiler 6.
The BLE libraries are built with the following options to be compatible with ModusToolbox:
-fshort-enums - set the size of an enumeration type to the smallest data type that can hold all enumerator values
-fshort-wchar - Set the size of wchar_t to 2 bytes
o operate in custom environments with ARM Compiler 6, apply the above mentioned build options.
Support Arm Compiler 6.
Added support for BLE dual CPU mode with pre-compiled CM0 image. Pre-compiled application images executed on Cortex M0+ core of the PSoC 6 dual-core MCU. The images are provided as C arrays ready to be compiled as part of the Cortex M4 application. The Cortex M0+ application code is placed to internal flash by the Cortex M4 linker script. CM0P_BLESS image is used for BLE dual CPU mode.
Fixed CY_BLE_ENABLE_PHY_UPDATE macros for enable "LE 2 Mbps" feature. "Enable LE 2 Mbps" feature does not work if it selects in BT Configurator.
The PSoC 6 BLE Middleware is re-organized for supporting MT2.0 make flow. Support new make flow. Refer to section Configuration Considerations for details.
Disable support HCI over UART in PSoC 6 BLE Middleware side. The SoC mode library was split into three libraries: host, controller and stack manager. The new organization structure allows usage of the same controller library with BLESS host, a UART application or any third party host, over a software HCI interface.
Updated the BLE Stack to version 5.0.5.110.

Refer to BLE Stack Changes.

3.10 Disabled support BLE dual CPU mode. The following Software components are no longer supported:
  • BLE dual CPU mode, controller on CM0+ only, Soft FP prebuilt library,
  • BLE dual CPU mode, host on CM4 only, Soft FP prebuilt library,
  • BLE dual CPU mode, host on CM4 only, Hard FP prebuilt library.
Refer to ModusToolbox 1.1 Release Notes.
Added the new SW component "BLE OTA with code sharing, Profile only". Updated documentation. Enable the PSoC 6 BLE Middleware to support OTA with code sharing.
Fixed the Cy_BLE_HAL_BlessStart() function of the PSoC 6 BLE Middleware: removed the BLE ECO reset before BLESS initialization. Fix ModusToolbox 1.0 errata.
Updated the BLE Stack to version 5.0.4.946.

Refer to BLE Stack Changes.

3.0 The PSoC 6 BLE Middleware is re-organized, so that it can be built as a device agnostic immutable library.
Enable the PSoC 6 BLE Middleware to be built as a device agnostic immutable library.
Updated the RAM memory calculation (macros CY_BLE_GATT_MTU_BUFF_COUNT) Decreased the RAM usage by PSoC 6 BLE Middleware
Decreased the ACT_LDO startup time from 4 to 10. Support for the 10uF capacitor on VDCDC.
Updated the config structures cy_stc_ble_config_t. Added the pointer to the configuration parameter structure for the Radio PA calibration (field paCalConfig). Enabling the user to override the BLE radio's default TX power configurations.
Documentation updates. Documentation update and clarification.
Updated the BLE Stack to version 5.0.3.935.

Refer to BLE Stack Changes.

2.20 Added support for PILO. PSoC 6 BLE supports Precision ILO (PILO) which can be used as an LF clock source. Refer to LFCLK Configuration for BLESS Deep Sleep Mode for more details.
Updated the Cy_BLE_RegisterAppHostCallback() functionality. Added support for BLE single CPU mode.
Updated Write Request events handler in PSoC 6 BLE Middleware. Return CY_BLE_GATT_ERR_INVALID_HANDLE if the attribute handle is out of database range. Handling invalid range of attribute handle during Write Request event.
Updated flash memory calculation for Bonded device list The function Cy_BLE_StackInit() returned CY_BLE_ERROR_INVALID_PARAMETER when the Resolving list parameter is set to 1.
Documentation updates. Documentation update and clarification. Removed the Errata section.
Updated the BLE Stack to version 5.0.2.917.

Refer to BLE Stack Changes.

2.10 Added return value CY_BLE_ERROR_FLASH_WRITE_NOT_PERMITED for following functions: Cy_BLE_StoreAppData()
Cy_BLE_StoreBondingData()
Added assertion in Cy_BLE_HAL_NvramWrite() to catch failure (CY_SYSPM_INVALID_STATE) during increasing core voltage from 0.9V to 1.1V for flash operation.
Flash operation is not permitted with protection context (PC) value > 0 and core voltage 0.9V, because of a preproduction hardware limitation.
Documentation updates.

Documentation update and clarification.

2.0
Production
Added the BLE user configuration file cy_ble_config.h. To make the BLE configuration more flexible. Allows redefining the configuration define(s) generated by the BLE customizer and default BLE clock defines (from cy_ble_clk.h).
Updated the BLE Interrupt Notification Feature. Added support for BLE dual CPU mode.
Updated the Cy_BLE_GATTS_ReadAttributeValueLocal() and Cy_BLE_GATTS_ReadAttributeValuePeer() functions. Those functions have the wrong Locally/Peer initiate operation flag.
The following defined values for the CY_BLE_STACK_MODE configuration parameter were deprecated:
CY_BLE_STACK_HOST_ONLY
CY_BLE_STACK_HOST_CONTR_UART
CY_BLE_STACK_HOST_IPC.
The following defined values were renamed:
CY_BLE_STACK_DEBUG to CY_BLE_STACK_MODE_SINGLE_SOC
CY_BLE_STACK_RELEASE to CY_BLE_STACK_MODE_DUAL_IPC.
Deprecated not supported (debug) modes.
The defines CY_BLE_CONFIG_STACK_DEBUG and CY_BLE_CONFIG_STACK_RELEASE were renamed to have more meaningful name.
The BLE Stack was updated to version 5.0.0.898.

Refer to BLE Stack Changes.

2.0
BETA#2
Added new API:
Cy_BLE_IsDevicePaired(),
Cy_BLE_GetDeviceRole(),
Cy_BLE_IsPeerConnected(),
Cy_BLE_GATTS_WriteAttributeValuePeer(),
Cy_BLE_GATTS_WriteAttributeValueLocal(),
Cy_BLE_GATTS_ReadAttributeValuePeer(),
Cy_BLE_GATTS_ReadAttributeValueLocal(),
Cy_BLE_GATTS_IsIndicationEnabled(),
Cy_BLE_GATTS_SendIndication(),
Cy_BLE_GATTS_IsNotificationEnabled(),
Cy_BLE_GATTS_SendNotification(),
Cy_BLE_GATTS_SendErrorRsp(),
Cy_BLE_GATTC_SendConfirmation().
Improve usability
The BLE Stack was updated to version 5.0.0.855.

Refer to BLE Stack Changes.

2.0
BETA#1
Renamed API:
Cy_BLE_GAP_UpdateAdvScanData() to Cy_BLE_GAPP_UpdateAdvScanData();
Cy_BLE_SetConnectionPriority() to Cy_BLE_GAP_SetConnectionPriority().
Consistent API naming scheme
Made the maximum number of connections configurable. SRAM consumption reducing when extra connections are not used.
Added new options for the CPU Core parameter. Support of single-core devices.
The BLE Stack was updated to version 5.0.0.785.

Refer to BLE Stack Changes.

1.0 Initial version.

BLE Stack Changes

This section lists changes made to the BLE Stack.

VersionChanges

Reason for Change

5.0.10.265 Updated BLE Stack ATT and GATT. Updated to fix incorrect return code in error messages.
Updated BLE Controller. Added changes required to qualify for BLE Spec. 5.2.
Updated channel map indication handler. Optimized the Low-Power-Mode (LPM) performance of PSoC 6 BLE Controller.
Updated Radio TX Power Change Handling Procedure. The radio TX power change handler was incorrectly being called from interrupt context whereas the ideal location for the same is from the task context.
Enhanced GATT Server implementation. Updated the GATT server implementation to handle large data base (> 512 entries).
Re-factored Shutdown code for Dual CPU mode.

Improved the handling of Cy_BLE_StackShutdown API to avoid timing-sensitive bugs.

5.0.8.220 Updated BLE ISR for SoC mode. Enhanced the BLE ISR to handle LL Channel Map in interrupt context for SoC mode.
Updated low-power mode API. Updated Cy_BLE_ControllerEnterLPM API for handling a scenario where wake-up is initiated by the hardware.
Re-factored Shutdown code for Dual CPU mode.

Improved the handling of Cy_BLE_StackShutdown API to avoid timing-sensitive bugs.

5.0.7.196 Updated the APIs to handle the interrupt locking. A better locking mechanism to avoid potential timing-sensitive bugs.
Re-factored the radio initialization sequence. It was observed that on customer boards, re-factoring the radio initialization sequence provided an improved stability to the reset sequence.
Fix for CVE-2019-16336.

Enforced the length check on incoming LL PDUs to protect against buffer overflows caused by malicious packets. Malformed Data packets will be dropped in the LL. Malformed Control packets will be replied with LL_UNKNOWN_RSP. For detail, refer to the CVE-2019-16336 vulnerability page.

5.0.6.161 Updated the radio configuration. To support the new packages: QFN68 and BGA124.
Added checks for Malformed LL PDUs. LL PDUs with the incorrect length must be replied with LL_UNKNOWN_RSP per latest BLE spec. Also, this prevents against any unknown behavior triggered due to malicious LL PDUs.
Documentation update.

Updated the documentation for the CY_BLE_EVT_RADIO_TEMPERATURE and CY_BLE_EVT_RADIO_VOLTAGE_LEVEL events.

5.0.5.110 Optimized the ACL TX path for a better throughput. The throughput was observed to be low when the stack libraries were linked with MDK libraries.
Added support for autonomous feature exchange on connection complete. Few mobile phone (eg. Droid Turbo) negotiate DLE with TX octets > 27 bytes but do not actually support the DLE feature. This leads to interoperability issues with such phones. An autonomous feature exchange will be triggered when the PSoC 6 device is in master role, and the DLE and PHY update negotiations will be triggered only if the peer supports DLE/PHY update feature. In case PSoC 6 is in a slave role, DLE/PHY update negotiations will not be triggered till the peer initiates a feature exchange procedure and hence exchanges it's feature set.
Added support for configurable PA LDO settings. It was observed that on customer boards, the output RF TX power was sub-optimal, when the factory settings for PA LDO were used. To fine tune the PA LDO settings at the customer end, the same were now exposed via the paCalConfig member of stackConfig input structure to the Cy_BLE_StackInit API.
Updated RSSI formula. With the previous formula, there existed a non-linearity in the measured value of RSSI at ~ -50dBm.
The SoC mode library was split into three libraries: host, controller and stack manager. The new organization structure allows usage of the same controller library with BLESS host, a UART application or any third party host, over a software HCI interface.
Fixed issue with disconnection. If an LL procedure is on-going, and a disconnect command is issued, the Terminate PDU is not transmitted over the air even after the procedure completes.
Updated Cy_BLE_StackInit API to check that if DLE is disabled, max TX and RX octets must be set to 27 Bytes.

The check for the DLE parameters was not correct for the case when DLE is disabled.

5.0.4.946 Fix for CVE-2019-17061. Updated the handling of LL PDU with LLID 0 to prevent corruption in subsequently received LL PDUs. Such packets will be dropped in the LL, but the peer will be acked for the packet. For detail, refer to the CVE-2019-17061 vulnerability page.
Enabled the RSSI reading after the CRC has been received. The RSSI value was not being updated if deep sleep was enabled in the controller.
Optimized the ACL TX path for a better throughput. In BLE dual CPU mode, with CM0p running at 25 MHz, the BLE throughput was observed to be sub-optimal.
Added support for the PDL APIs to calculate temperature and Battery monitor output.

New APIs were added to the PDL to calculate the absolute values of the die temperature and radio voltage, using the raw values from the radio.

5.0.3.935 1.Added the option to override the paCal table and LoBuff table from the application.
2.Added the option to set lobuflimit and calvallimit from the application.
3.Updated the PA LDO settings to use the settings recommended by the designers.
Additional flexibility is provided to obtain an optimal output power at the user's board.
The new PA LDO setting recommended by the designers results in the ~ 1dBm higher output power (measured using Cypress 001 kits) at the 4dBm setting.
The local SCA with PILO is enabled to be set to 500 ppm. The PILO frequency accuracy is of the order of 500 ppm.
The BLE SMP pairing vulnerability fix:
1.Added the public key validation check for the remote key.
2.Updated the documentation for the Cy_BLE_GAP_GenerateSetLocalP256Keys() API, to recommend the application to update the private key as mentioned in the BLE Core spec 5.0 Vol. 3 Part H, Section 2.3.6.
3.Added the feature bit mask for the remote public key validation.
The update to comply with BLE Core Specification Errata 10734.

1.When none of the BLE hardware engines are active, disable the hardware auto wakeup feature before entering deep sleep mode.
2.Re-enable the hardware auto wakeup feature before entering deep sleep if any of the BLE hardware blocks are active.

The fix for a spurious interrupt triggered by the link layer hardware when the firmware continuously enters/exits deep sleep mode.

5.0.2.917 Added a new BLE event - CY_BLE_EVT_GAP_ADV_TX, which is triggered on transmission of an ADV packet (if this feature is enabled). Support for BLE mesh.
Dual CPU mode: Stack Shutdown sequence modified to shut down controller before sending CY_BLE_EVT_STACK_SHUTDOWN_COMPLETE event. The controller was shut-down after informing the application that shutdown had been completed.
Updated the Cy_BLE_HAL_BlessInterruptHandler API to return status.

This return parameter indicates that user should call Cy_BLE_ProcessEvents() to process pending BLE Stack events.

5.0.1.906 Added check for any pending real time procedures before allowing autonomous PHY update request. Autonomous PHY update request was being initiated without a check for "LL control procedure collision".
Fixed memory allocation failure issue observed when initializing buffer pool for ACL Rx Packet. Memory allocation failure was observed when DLE Rx Octet < TxOctet.
Added support to disconnect LE link whenever there is real-time LL procedure collision. Consistent with BLE Spec 5.0 erratum 7106
Added support for PILO.

PSoC 6 BLE supports a Precision ILO which can be used as an LF clock source instead of the WCO.

5.0.0.898 Enhancement is done to rerun the scheduler on close CE, if the event about to be scheduled is in past. Blocking flash write operation blocks the CPU from executing any interrupts (including BLESS isr) for > 17ms, Due to this, if the CI for connection is smaller than 17ms, the BLE link will disconnect.
The calibration target value for the Max output power level is modified under the user-defined condition.

The enhancement to support the 5dBm Tx power in the BLE stack.

5.0.0.855 Changed the input parameter for the Cy_BLE_SetCustomEventMask() API from (uint8* mask) to (uint32 mask). Consistent with the bit mask scheme.
1.The timer context was never reset, it is made to reset during the Stack shutdown.
2.The timer context was not freed even when the timer start failed. It is made free when the timer start fails due to any reason.
The Cy_BLE_GAPC_StopScan() function returns CY_BLE_ERROR_MAX when the Cy_BLE_GAPC_StopScan() function is called to stop a previously-initiated scanning procedure. This issue occurs only when the authentication procedure is occurring and the application tries to stop the scan
1.The DLE control procedure timer is started only if the queuing Data Length Request in the Hardware FIFO is successful.
2.Added checks to handle the race condition between the ACK processing and Handling data PDU's from the Host.

Unexpected disconnection due to an LMP Response timeout in the embedded stress application. This issue is due to:
1.The DLE control procedure timer was started even if the sending Data Length Request PDU failed when queuing it in the Hardware FIFO.
2.Due to the race condition between the ACK processing and Handling data PDU's from the Host.

5.0.0.785 Initial BLE Stack version.