AN91162 RAMTRON | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 43
Technical content
www.cypress.com Document No. 001-91162 Rev. *A 1 AN91162 Creating a BLE Custom Profile Author: Rohit Kumar Associated Project: Yes Associated Kit: CY8CKIT -042-BLE Associated Part Family : CY 8C4XXX-BL, CYBL10XXX Software Version: CySmart PC Tool , PSoC® Creator™ 3.2 Related Application Notes: For a complete list of the related application notes, click here To get the latest version of this application note, or the associated project file, please visit http://www.cypress.c om/go/AN91162 . AN91162 describes the methodology for developing a Bluetooth ® Low Energy (BLE) application with PSoC 4 BLE or PRoC BLE devices using a custom BLE profile. It provides an overview of custom profile s and services and the procedure to build an application with PSoC 4 BLE using RGB LED control as an example. This application note also applies to the PRoC BLE part.
Contents
Bluetooth Low Energy (BLE) is an ultra -low-power wireless standard introduced by the Bluetooth Special Interest Group ( SIG) for short -range communication. The BLE physical layer, protocol stack, and profile architecture are designed and optimized to minimize power consumption. Similar to Classic Bluetooth, BLE operates in the 2.4 -GHz ISM band but with a lower bandwidth of 1 Mbps. Cypress PSoC 4 BLE is a programmable embedded system-on-chip (SoC), integrating BLE along with programmable analog and digital peripheral functions, memory, and an ARM ® Cortex®-M0 microcontroller on a single chip. This application note demonstrates how to easily use the BLE Component GUI to create a custom BLE profile. You will define the structure of the custom profile. The tool will auto-generate APIs and event codes that are to be used. You will then test the custom profile on Cypress’s CY8CKIT-042-BLE Pioneer Kit.
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 2 This application note assumes that you have a basic understanding of the BLE architecture and terms. If you are new to either BLE or PSoC, refer to the application note AN91267 - Getting Started with PSoC 4 BLE. For an understanding of the structure of the BLE Component in the PSoC Creator environment, and to learn how to develop applications based on standard BLE services, refer to the application note AN91184 - PSoC 4 BLE Designing BLE Applications. For complete details on the BLE specification, visit the BLE Developer Portal. Install the latest BLE Pioneer Kit software from the kit webpage, which provides related tools for BLE application development and debugging . CY8CKIT-042 BLE or BLE Pioneer Kit is a BLE development kit from Cypress that supports both PSoC 4 BLE and PRoC BLE family of devices. This kit comprises pluggable PSoC 4 BLE (and PRoC BLE) modules that connect to a pioneer baseboard. This kit will be used for demonstrating the example project provided with this application note. The kit comprises a set of BLE example projects and documentation that help you get started with developing your own BLE applications. PSoC Resources Cypress provides a wealth of data at www.cypress.com to help you to select the right PSoC device and quickly and effectively integrate it into your design. For a comprehensive list of resources, see KBA86521, How to Design with PSoC 3, PSoC 4, and PSoC 5LP. Following is an abbreviated list for PSoC 4 BLE: Overview: PSoC Portfolio, PSoC Roadmap Product Selectors: PSoC 1, PSoC 3, PSoC 4, or PSoC 5LP. In addition, PSoC Creator includes a device selection tool. Datasheets: Describe and provide electrical specifications for the PSoC 41XX-BL and PSoC 42XX- BL device families. Application Notes and Code Examples : Cover a broad range of topics , from basic to advanced level. Many of the application notes include code examples. PSoC Creator provides additional code examples—see Code Examples. Technical Reference Manuals (T RMs): Provide detailed descriptions of the architecture and regi sters in each PSoC 4 BLE device family. CapSense Design Guide : Learn how to design capacitive touch-sensing applications with the PSoC 4 BLE family of devices. Development Tools CY8CKIT-042-BLE Bluetooth Low Energy (BLE) Pioneer Kit is an easy-to-use and inexpensive development platform for BLE. This kit includes connectors for Arduino™ compatible shields and Digilent® Pmod™ daughter cards. CySmart BLE Host Emulation Tool for Windows, iOS, and Android is an easy -to-use GUI that enables you to test and debug your BLE Peripheral applications. Technical Support Frequently Asked Questions (FAQs) : Learn more about our BLE ecosystem BLE Forum : See if your question is already answered by fellow developers on the PSoC 4 BLE and PRoC BLE forums. Cypress support: Still no luck? Visit our support page and create a technical support case or contact a local sales representative. If you are in the United States, you can talk to our technical support team by calling our toll -free number : +1-800-541-4736. Select option 8 at the prompt.
- Drag and drop Components to build your hardware
system design in the main design workspace.
- Co-design your application firmware with the PSoC
- Configure the Components using configuration tools.
- Explore the library of more than 100 Components.
- Review the Component datasheets.
Figure 1. PSoC Creator Schematic Entry and Components how to configure and use PSoC Creator Components. unique features of PSoC 4 BLE. describes the system functions provided by PSoC Creator. Datasheets page for a list of all PSoC 4 BLE Component datasheets. resources. To open the document manager, choose the menu item Help > Document Manager.
how to design a standard application using PSoC 4 BLE. these functions is represented by a custom service, which can then be used to obtain any data required. temperature. Figure 4 shows one such instance of an application, which defines custom services to implement three functions. Figure 4. Define Custom Services be 128-bit values for custom services. unsigned byte, signed byte, word, character string, and array. WriteWithoutResponse, Notify, Indicate, SignedWrite, and WritableAuxiliaries.
- Open PSoC Creator from Start > All Programs > Cypress > PSoC Creator 3.2 > PSoC Creator 3.2.
- Create a new project ( File > New > Project). Select the PSoC 4100 BLE / PSoC 4200 BLE Design template and select
CY8C4247LQI-BL483 as the device. Name the project AN91162 and save the workspace at your desired location. with 256K FLASH and 32K SRAM.
- Drag and drop a BLE Component from the C omponent Catalog (on the right-hand side of the PSoC Creator IDE) onto
Figure 9. BLE Component in Component Catalog
- Double-click the Component to open its configuration window. Change the instance name of the Component to BLE
Figure 19. Characteristic User Description for RGB LED Characteristic
- On the GAP Settings tab in the BLE Component configuration window, configure the parameters under General settings
per Table 2, and then click Apply. Table 2. General GAP Settings for the Peripheral Device Public Address 00A050-XXXXXX Specifies the 6-byte Bluetooth device address. This address is used during advertising. is selected. This must be a non-zero value per the BLE SIG. Note that 00A050 is the Company ID of Cypress Semiconductor. silicon. With this setting, each device will have a unique public address. Device Name CY Custom BLE Specifies the name of the device that you want the GATT client to see while scanning. Appearance Unknown Specifies the appearance of the device. For this custom service, leave it as Unknown. 0 (default) Specifies the radio TX power level while advertising data. 0 (default) Specifies the radio TX power level while sending data during connection.
- Click Advertisement settings under Peripheral role and configure the parameters per Table 3, and click Apply.
Table 3. Advertisement Settings Configuration receive connection requests from any Central device scanning it.
any Central device for both scan requests and connection requests. All channels Sets the Peripheral to advertise in all three advertising channels (37, 38, and 39). calculated using both minimum and maximum intervals. calculated using both minimum and maximum intervals. timing out and ceasing to advertise further. Slow advertising interval Uncheck Disables slow advertising.
- Click Advertisement packet under Peripheral role settings to specify the information in advertisement packets that
Figure 20. Advertisement Packet Settings
- Click Scan response packet under Peripheral role to specify the data that the Peripheral should send in response to
shown in Figure 21, and click Apply.
Figure 21. Scan Response Packet Settings for Peripheral
- Click Peripheral preferred connection parameters and set the parameters as shown in Table 4:
Table 4. Peripheral preferred connection parameters lower minimum interval means faster data rate but more power consumption. For this project, no slave latency is required. this time, then the link is assumed broken, so devices disconnect.
- Click Security under Peripheral role to configure the security level of the BLE communication. This project does not
require security settings, so s et the I/O capabilities to No Input No Output and Bonding requirement to No Bonding. Keep the rest of the settings at their default values and click Apply, as shown in Figure 22.
Figure 22. Security Settings
- Click OK to save the changes and close the BLE Component configuration window.
Figure 34. Add a Source/Header File
- main.c/.h: These file s contain the main function that acts as the entry point for the system . It initializes the system,
including BLE, and regularly calls the function to process BLE events.
- BLEProcess.c/.h: These files contain the definitions of the functions for handling BLE event callbacks and updating
the RGB LED characteristic value in the GATT database.
- led.c/.h: These files contain the definitions of the function that handles the Component for displaying RGB LED colors
Initializes the Components and enable interrupts. Displays the color on the RGB LED when a new color data is received from the GATT client. be continuously called in the main function. This function has no argument. listed in Table 3). The argument defines if the advertisement is fast, slow, or custom. and advertising. This function has no argument.
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 25 main.h #define TRUE 0x01 #define FALSE 0x00 BLEProcess.h /* RGB LED Characteristic data length*/ #define RGB_CHAR_DATA_LEN 4 led.h /* LED Color and status related Macros */ #define RGB_LED_MAX_VAL 0xFF #define RGB_LED_OFF 0xFF #define RGB_LED_ON 0x00 /* Index values in array where respective color coordinates * are saved */ #define RED_INDEX 0x00 #define GREEN_INDEX 0x01 #define BLUE_INDEX 0x02 #define INTENSITY_INDEX 0x03 System Initialization The first step in firmware configuration is to initialize the Components in the system. The following function is called first after entering main.c. Open main.c by double-clicking on it in the Workspace Explorer window on the left -hand side of the PSoC Creator window. Add the following function definition in main.c: void InitializeSystem(void) /* Enable Global Interrupt Mask */ CyGlobalIntEnable; /* Start BLE stack and register the event callback function.*/ CyBle_Start(GeneralEventHandler); /* Start PrISM modules for LED control */ PrISM_1_Start(); PrISM_2_Start(); /* Switch off the RGB LEDs through PrISM modules */ PrISM_1_WritePulse0(RGB_LED_OFF); PrISM_1_WritePulse1(RGB_LED_OFF); PrISM_2_WritePulse0(RGB_LED_OFF); /* Set Drive modes of the output pins to Strong drive */ RED_SetDriveMode(RED_DM_STRONG); GREEN_SetDriveMode(GREEN_DM_STRONG); BLUE_SetDriveMode(BLUE_DM_STRONG);
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 26 Event Handler Registration Unlike other Components’ startup, the BLE Component requires the registering of an event callback function while starting the Component. This function is called to handle BLE events, including general events such as stack ON and events at the GAP/GATT layer such as connection, disconnection , and write command. The General event handler function is defined in BLEProcess.c in the example project. You can either place it in a separate file or in main.c. See Table 5 for a description of the events that are included in the switch statement. In the function definition shown below, each case is empty. We will add code to handle each event in the next section. void GeneralEventHandler(uint32 event, void * eventParam) /* Structure to store data written by Client */ CYBLE_GATTS_WRITE_REQ_PARAM_T *wrReqParam; /* 'RGBledData[]' is an array to store 4 bytes of RGB LED data*/ uint8 RGBledData[RGB_CHAR_DATA_LEN]; switch(event) case CYBLE_EVT_STACK_ON: /* This event is generated when BLE stack is ON */ break; case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP: /* This event is generated whenever Advertisement starts or stops */ break; case CYBLE_EVT_GAP_DEVICE_DISCONNECTED: /* This event is generated at GAP disconnection. */ break; case CYBLE_EVT_GATTS_WRITE_REQ: /* This event is generated when the connected Central */ /* device sends a Write request. */ /* The parameter ‘eventParam’ contains the data written */ break; case CYBLE_EVT_GATT_DISCONNECT_IND: /* This event is generated at GATT disconnection. */ break; default: break; These events are the basic events to be handled in the application to allow a successful BLE connection. These events are explained in Table 5. Other events that can be generated by the BLE Component are described in the BLE_Stack.h file in “CYBLE_EVENT_T” enum.
Table 5. BLE Events and Central device is disconnected. the Peripheral and a Central device. /* This event is generated whenever Advertisement starts or stops.
Figure 35. Attribute Handle Data Structure for Custom Services The RGB LED service supports both reads and writes on the same characteristic with the attribute handle of value 0x000E.
- The four bytes of data are extracted and stored in an array.
- The RGB LED update function (UpdateRGBLED) is called to update the onboard LED color.
- The RGB Control characteristic update function (UpdateRGBcharacteristic) is called to update the internal GATT
- Irrespective of whether the attribute handle matches RGB LED Control Characteristic handle , a write response is sent
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 29 /* Update the PrISM component density value to represent color */ UpdateRGBLED(RGBledData, sizeof(RGBledData)); /* Update the GATT DB for RGB LED read characteristics*/ UpdateRGBcharacteristic(RGBledData, sizeof(RGBledData), CYBLE_RGB_LED_RGB_LED_CONTROL_CHAR_HANDLE); /* Send the response to the write request received. */ CyBle_GattsWriteRsp(cyBle_connHandle); break; The UpdateRGBLED function calculates the brightness of each of the RGB LEDs using the four -byte (red, green, blue, intensity) values received. It then updates the density value of the PrISM Components to achieve the desired color. Place the following function in the project (defined in the led.c file of the associated project): void UpdateRGBLED(uint8* ledData, uint8 len) /* Local variables to store calculated color components */ uint8 calc_red; uint8 calc_green; uint8 calc_blue; /* Check if the array has length equal to expected length for * RGB LED data */ if(len == RGB_CHAR_DATA_LEN) /* True color to be displayed is calculated on basis of color * and intensity value received */ calc_red = (uint8) (((uint16)ledData[RED_INDEX]*ledData[INTENSITY_INDEX])/RGB_LED_MAX_VAL); calc_green = (uint8) (((uint16)ledData[GREEN_INDEX]*ledData[INTENSITY_INDEX])/RGB_LED_MAX_VAL); calc_blue = (uint8) (((uint16)ledData[BLUE_INDEX]*ledData[INTENSITY_INDEX])/RGB_LED_MAX_VAL); /* Update the density value of the PrISM module */ PrISM_1_WritePulse0(RGB_LED_MAX_VAL - calc_red); PrISM_1_WritePulse1(RGB_LED_MAX_VAL - calc_green); PrISM_2_WritePulse0(RGB_LED_MAX_VAL - calc_blue); Once the LED color is set, the GATT database has to be updated for the RGB LED characteristic so that the Client receives the latest RGB color set when it sends a Read request. The UpdateRGBcharacteristic function updates the attribute value for RGB LED color control. Add the following function in the project ( defined in BLEProcess.c file of the associated project).
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 30 void UpdateRGBcharacteristic(uint8* ledData, uint8 len, uint16 attrHandle) /* 'rgbHandle' stores RGB control data parameters */ CYBLE_GATT_HANDLE_VALUE_PAIR_T rgbHandle; /* Update RGB control handle with new values */ rgbHandle.attrHandle = attrHandle; rgbHandle.value.val = ledData; rgbHandle.value.len = len; /* Update the RGB LED attribute value. This will allow * Client device to read the existing color values over * RGB LED characteristic */ CyBle_GattsWriteAttributeValue(&rgbHandle, FALSE, &cyBle_connHandle, CYBLE_GATT_DB_LOCALLY_INITIATED); Handle BLE Disconnection When the device is disconnected from the GATT client , the RGB LED and GATT database should be reset before next connection. Place the following code snippet under the CYBLE_EVT_GATT_DISCONNECT_IND event in the general event callback function: case CYBLE_EVT_GATT_DISCONNECT_IND: /* This event is generated at GATT disconnection */ /* Reset the color values*/ RGBledData[RED_INDEX] = FALSE; RGBledData[GREEN_INDEX] = FALSE; RGBledData[BLUE_INDEX] = FALSE; RGBledData[INTENSITY_INDEX] = FALSE; /* Switch off LEDs */ UpdateRGBLED(RGBledData, sizeof(RGBledData)); /* Register the new color in GATT DB*/ UpdateRGBcharacteristic(RGBledData, sizeof(RGBledData), CYBLE_RGB_LED_RGB_LED_CONTROL_CHAR_HANDLE); break; Main Function With the general event callback function complete, we now modify the main function to initialize the Components in the project and process the BLE events. Modify the main function already provided in main.c as shown here: int main() /* Start the components */ InitializeSystem();
Figure 38. Program the PSoC 4 BLE Device After programming is complete, the BLE Pioneer Kit will start advertising.
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 38 Summary This application note demonstrated the steps to add custom BLE services in a PSoC 4 BLE project using the BLE Component, configuring the services, and reading and writing data from and to a BLE GATT client device. The method described here can be easily extended to any type and any number of BLE custom services in your PSoC 4 BLE project. Related Information AN91267 - Getting Started with PSoC 4 BLE AN91184 - PSoC 4 BLE Designing BLE Applications CY8CKIT-042-BLE Pioneer Kit BLE developer portal CySmart iOS App CySmart Android App About the Author Name: Rohit Kumar Title: Senior Applications Engineer
In addition to reading and writing from a characteristic, another important access that is commonly required is notifications. Using notifications, a GATT server can send new data to a GATT client without having the GATT client continuously poll for it. GATT client has enabled notifications on the GATT server, the GATT server cannot send data through notifications.
- In the BLE Component configuration window, select the characteristic on which notifications are to be enabled. Select the
in the attribute list, below the characteristic. Click OK. Figure 51. Select Notify Access in Component
- To enable notifications on the GATT server, the GATT client will write a value of 0x0001 to the CCCD. When
bits are the only allowed values that can be sent as part of write request on CCCD. c. If yes, then record the CCCD value in the GATT server.
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 40 if(CYBLE_CUSTOM_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_HANDLE == wrReqParam->handleValPair.attrHandle) /* Only the first and second lowest significant bit can be * set when writing on CCCD. If any other bit is set, then * send error code */ if(FALSE == (wrReqParam->handleValPair.value.val [CYBLE_CUSTOM_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_INDEX] & (~CCCD_VALID_BIT_MASK))) /* Set flag for application to know status of notifications. * Only one byte is read as it contains the set value. */ startNotification = wrReqParam->handleValPair.value.val [CYBLE_CUSTOM_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_INDEX]; /* Update GATT DB with latest CCCD value */ CyBle_GattsWriteAttributeValue(&wrReqParam->handleValPair, FALSE, &cyBle_connHandle, CYBLE_GATT_DB_LOCALLY_INITIATED); else /* Send error response for Invalid PDU against Write * request */ CYBLE_GATTS_ERR_PARAM_T err_param; err_param.opcode = CYBLE_GATT_WRITE_REQ; err_param.attrHandle = wrReqParam->handleValPair.attrHandle; err_param.errorCode = ERR_INVALID_PDU; /* Send Error Response */ (void)CyBle_GattsErrorRsp(cyBle_connHandle, &err_param); /* Return to main loop */ return; /* Send response to the Write request */ CyBle_GattsWriteRsp(connectionHandle); break; The error code ‘ERR_INVALID_PDU’ has a value of 0x04, as per BLE Core specification, Vol 3, Part F, section 3.4.1. Define following in your application code. #define ERR_INVALID_PDU 0x04 #define CCCD_VALID_BIT_MASK 0x03 #define NOTIFY_BIT_MASK 0x01
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 41 3. In the main application, send the data through a notification whenever data is available and notifications have been enabled from the GATT client. /* 'notificationHandle' is handle to store notification data parameters */ CYBLE_GATTS_HANDLE_VALUE_NTF_T notificationHandle; /* Check if the notification bit is set or not */ if(startNotification & NOTIFY_BIT_MASK) /* Update Notification handle with new data*/ notificationHandle.attrHandle = CYBLE_CUSTOM_CHAR_HANDLE; notificationHandle.value.val = &data; notificationHandle.value.len = dataLength; /* Report data to BLE component for sending data by notifications*/ CyBle_GattsNotification(connectionHandle, ¬ificationHandle);
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 42 Document History Document Title: AN91162 – Creating a BLE Custom Profile Document Number: 001-91162 Revision ECN Orig. of Change Submission Date Description of Change ** 4606922 ROIT 03/20/2015 New Application note *A 4767190 ROIT 05/20/2015 Updated project to PSoC Creator 3.2 Added support for PSoC 4 BLE 256K parts, CY8C4XX8-BL Updated BLE component v2.0 screenshots Updated CySmart Android App screenshots. Removed HandleStatusLed() function and usage Updated UpdateRGBcharacteristic() function definition Added GATT DB update and error response code for handling Notification in Appendix A1 Renamed UpdateRGBled() function to UpdateRGBLED() function
Creating a BLE Custom Profile www.cypress.com Document No. 001-91162 Rev. *A 43 Worldwide Sales and Design Support Cypress maintains a worldwide network of offices, solution centers, manufacturer’s representatives, and distributors. To find the office closest to you, visit us at Cypress Locations. Products Automotive cypress.com/go/automotive Clocks & Buffers cypress.com/go/clocks Interface cypress.com/go/interface Lighting & Power Control cypress.com/go/powerpsoc Memory cypress.com/go/memory PSoC cypress.com/go/psoc Touch Sensing cypress.com/go/touch USB Controllers cypress.com/go/usb Wireless/RF cypress.com/go/wireless PSoC® Solutions psoc.cypress.com/solutions PSoC 1 | PSoC 3 | PSoC 4 | PSoC 5LP Cypress Developer Community Community | Forums | Blogs | Video | Training Technical Support cypress.com/go/support PSoC is a registered trademark and PSoC Creator is a trademark of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are the property of their respective owners. Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709 Phone : 408-943-2600 Fax : 408-943-4730 Website : www.cypress.com © Cypress Semiconductor Corporation, 201 5. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, l ife saving, critical control or safety applications, unless pursuant to an express written agreeme nt with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life -support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress here by grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conj unction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of th is Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in lif e-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ produ ct in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement.