Customer Training Workshop: Advanced BLE System Design - Tinkerer

Transcription

Customer Training Workshop:Advanced BLESystem DesignBLE Bluetooth Low EnergyRapidly Design Systems with Complex BLE FeaturesUsing the Industry’s First Full-Featured, Bluetooth 4.2 Solutions002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop1

Workshop Objectives and PrerequisitesBy the end of this workshop, you willLearn how to use PSoC Creator 1 to rapidly design BLE systems using:Over-the-air firmware upgrades2New Bluetooth 4.2 features3: Data Length Extension, Enhanced Security and Privacy 1.2Multi-Role4 BLE devicesWorkshop prerequisitesAttend the “Introduction to BLE System Design” workshop or watch the “PSoC 4 BLE Video Tutorial Series” onlineWorkshop resourcesVisit Cypress’s BLE Solutions webpage for product datasheets, development kits, App Notes, software downloads,example projects and demo videos12PSoC 3, PSoC 4, PSoC 5LP and PRoC BLE Integrated Design Environment (IDE)The process of replacing an existing firmware with a newer version over a wirelessinterface like BLE. Over-the-air firmware upgrade is described in theLab #1: Over-The-Air Firmware Upgrade section002-10983Rev **Owner: UTSV34Bluetooth 4.2 features are described in the Lab #2: Bluetooth 4.2 Features sectionRefers to multiple Generic Access Profile (GAP) roles described in the Lab #3: Multi-Role BLEDevices sectionAdvanced BLE System Design Customer Training Workshop2

Workshop AgendaTimePageTopic0:00 (15 min)4Set Up and Install Software0:15 (15 min)5PSoC and BLE Terms0:30 (20 min)8Cypress BLE Portfolio0:50 (30 min)13Demo: Upgrading to Bluetooth 4.21:20 (60 min)20Lab #1: Over-The-Air Firmware Upgrade12:20 (30 min)25Session Break2:50 (60 min)26Lab #2: Bluetooth 4.2 Features23:50 (60 min)33Lab #3: Multi-Role3 BLE Devices4:50 (10 min)37Wrap-up5:00End of Workshop1The process of replacing an existing firmware with a newer version over a wireless interface like BLE.Over-the-air firmware upgrade is described in the Lab #1: Over-The-Air Firmware Upgrade section2 Bluetooth 4.2 features are described in the Lab #2: Bluetooth 4.2 Features section3 Refers to multiple Generic Access Profile (GAP) roles described in the Lab #3: Multi-Role BLE Devices section002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop3

Set Up and Install SoftwareRequired software and initial stepsCopy the contents of the provided USB drive onto your laptop and install the software featured in the table belowFollow the on-screen instructions to complete the installation in approximately 15 minutesSoftwareVersionFile NamePSoC Creator1 Installer3.3 CP3 (or newer)“PSoCCreatorSetup 3.3 cp3 b9648.exe”CySmart2 Installer1.2 (or newer)“CySmartSetup 1.2.exe”BLE Pioneer Kit InstallerRevision ** (or newer)“CY8CKIT-042 BLE-A SetupOnlyPackage E Lab Exercise Files2.0“AdvancedBLEWorkshop 2.0.zip”Required hardware:BLE Pioneer Kit (CY8CKIT-042-BLE-A), shown at rightAndroid or iOS smartphone (not provided)Raise your hand if you need help!1PSoC 3, PSoC 4, PSoC 5LP and PRoC BLE Integrated Design Environment (IDE)A GUI-based software tool that installs on your PC to test and debug BLE functionality3 An open-source, free, terminal emulator software2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop4

PSoC TermsPSoCPSoC is the world’s only programmable embedded system-on-chip integrating an MCU core, Programmable Analog Blocks,Programmable Digital Blocks, Programmable Interconnect and Routing1 and CapSense Programmable Analog BlockA hardware block that is configured using PSoC Components2 to createAnalog Front Ends (AFEs), signal conditioning circuits with opamps and filtersIncludes Continuous Time Blocks, analog-to-digital converters (ADCs) anddigital-to-analog converters (DACs)Illustration of a PSoC Device Being FlexiblyConfigured by Plugging in PSoC Components2100 Components2availableContinuous Time Block (CTB)A Programmable Analog Block that is used to implement continuous timeanalog circuits such as opamps and programmable gain amplifiers (PGAs)Programmable Digital BlockA hardware block that is configured using PSoC Components2 to implementcustom digital peripherals and glue logicIncludes Universal Digital Blocks, Serial Communication Blocks (SCBs) and TCPWMs3Universal Digital Block (UDB)A PSoC Programmable Digital Block that contains two programmable logic devices (PLDs), one programmable datapath withan arithmetic logic unit (ALU), one status register and one control registerConfigured in PSoC Creator4 using PSoC Components2, or with the graphical UDB editor or using Verilog codeSerial Communication Block (SCB)A PSoC Programmable Digital Block that is configurable as a UART, SPI or I2C interface1 Connects32 Free4the Programmable Analog Blocks, Programmable Digital Blocks and I/Osembedded ICs represented by an icon in PSoC Creator software002-10983Rev **Owner: UTSVTimer/Counter/Pulse-Width ModulatorPSoC 3, PSoC 4, PSoC 5LP and PRoC BLE Integrated Design Environment (IDE)Advanced BLE System Design Customer Training Workshop5

PSoC TermsTimer/Counter/PWM (TCPWM) BlockA PSoC Programmable Digital Block that is configurable as a 16-bit Timer, Counter, PWM1 or quadrature decoderCapSense Cypress’s third-generation touch-sensing user interface solution that “just works” innoisy environments and in the presence of waterThe industry’s No. 1 solution in sales by 4x over No. 2Programmable Interconnect and RoutingConnects the Programmable Analog Blocks, Programmable Digital Blocks and I/OsEnables flexible connections of internal analog and digital signals to internalbuses and external I/OsPSoC Creator PSoC 3, PSoC 4, PSoC 5LP and PRoC BLE Integrated Design Environment (IDE)Software that installs on your PC that allows:Concurrent hardware and firmware design of PSoC systems, orPSoC hardware design followed by export to popular IDEsComponent IconComponent Configuration ToolComponentsFree embedded ICs represented by an icon in PSoC Creator softwareUsed to integrate multiple ICs and system interfaces into one PSoCDragged and dropped as icons to design systems in PSoC CreatorComponent Configuration ToolsSimple graphical user interfaces in PSoC Creator embedded in each ComponentUsed to customize Component parameters as shown to the right1 Pulse-Width002-10983Rev **modulatorOwner: UTSVAdvanced BLE System Design Customer Training Workshop6

BLE TermsBLE (Bluetooth Low Energy)A standard for short-range, low-power wireless applications that communicates state or control informationOperates in the 2.4-GHz ISM Band with GFSK modulation and supports a 1-Mbps over-the air data rateNot backward-compatible with Bluetooth ClassicBluetooth 4.0/4.1/4.2Bluetooth 4.0 (2010) is an upgraded Bluetooth Classic specification that adds BLEBluetooth 4.1 (2013) improves throughput and power consumptionBluetooth 4.2 (2014) increases packet length, and improves privacy and securityBLE Protocol StackFirmware that implements the Bluetooth 4.0/4.1/4.2 specification to provideBLE communicationPSoC 4 BLEA 32-bit, 48-MHz ARM Cortex -M0 PSoC device withProgrammable Analog and Digital Blocks, CapSense and BLEIncludes a royalty-free, Bluetooth 4.2-compliant BLE Protocol StackComponent IconComponent Configuration ToolPRoC BLE (Programmable Radio-on-Chip)A 32-bit, 48-MHz ARM Cortex -M0 connectivity MCU with peripherals:CapSense, ADC, SCBs and BLEIncludes a royalty-free, Bluetooth 4.2-compliant BLE Protocol StackBLE ComponentA Component that creates Bluetooth Smart1 products in minutesIncludes a Component Configuration Tool that makes the complex BLE Protocol Stackand Profiles2 simple to implement with a GUI1A brand of Bluetooth products that supports only BLE002-10983Rev **Owner: UTSV2A Bluetooth specification that describes a set of operations used by devices to communicate with one anotherAdvanced BLE System Design Customer Training WorkshopTerms of Art7

Advanced BLE System DesignCYPRESS BLE PORTFOLIO002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop8

Cypress’s BLE Product RoadmapMeets Evolving Market NeedsPSoC 4 BLEPSoC 4 BLEBluetooth 4.1Bluetooth 4.2November 2014August 2015December 2015July 2016Most IntegratedBLE ProductUltra-Thin CSP1For Credit CardsBluetooth 4.2 Features ForSecurity, Privacy and ThroughputSmaller Packages, Low-Cost andMulti-Protocol DevicesFeaturesPSoC 4 BLEBCM207374BCM207193,4CPUARM CM0ARM CM3ARM CM4Flash (KB/MB), RAM (KB)256KB, 32KBNA, 60KB1MB, 512KBSupply Voltage (V)1.9-5.5V1.62-3.63V1.62-3.6VUDBs, Opamps, Comparators, ADC, DAC4, 4, 2, 12-bit, No0, 0, 0, 16-bit, No0, 0, 0, 16-bit, NoCapSense YesNoNoMCU Active Current Slope (µA/MHz)2609630Rx Sensitivity2 (dBm)-91-93-96.5Avg. Current for 1-s interval (µA)17.8 30 9Integrated 32-kHz Crystal-Less OscillatorNoYesYesMulti-Master Multi-SlaveNoYes (1M, 3S)Yes (3M, 16S)AvailabilityNowNowSampling in Q4’16Cypress’s BLE portfolio is evolving to reduce power consumption and enhance best-in-class integration1Chip Scale Package002-10983Rev **Owner: UTSV2Pre-Balun in all cases3IntegratesTRIAC Control, IR RX/TX, Crypto block.Advanced BLE System Design Customer Training Workshop4UsesWICED IDE9

Cypress: Complete BLE SolutionCypress is your BLE solution provider with expertise in silicon, stack, module hardware and softwareBLE Module SuppliersPanasonicTDKMurataBLE SiliconSuppliers1Solution DisciplineCypressBLE Silicon Design BLE Wafer Fabrication BLE Silicon Package Assembly/Test BLE Stack Development Software (IDE) BLE Module Hardware Design BLE Module Manufacturing BLE Silicon DesignBLE Wafer FabricationBLE CSP Package2PSoC Creator SoftwareModule Hardware DesignEZ-BLE PRoC ModuleCypress is the end-to-end expert for all of your BLE needs1 Nordic,TI, CSR, Dialogpackage (CSP) manufactured by Cypress subsidiary Deca Technologies2 Chip-scale002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop10

Bluetooth Low Energy (BLE) PortfolioWICED PSoC Creator PRoC BLE (MCU Touch1)BLE MCUPSoC 4 BLE (MCU Touch Mixed-Signal)NEWQ416BCM20719CM42, SPI, UART, I2C3,IR TX/RX4, ADC, 6 PWM,KB Scanner5, Mouse QD6,Crypto7, 4 TRIAC Control,40 GPIO, 1MB Flash,512KB RAM, BT8 4.2,2 Mbps support, WICED SDK9Q316CYBL1117xCM0, DMA, 2 SCB, I2S4 TCPWM, 4 PWM, ADC,36 GPIO, 256KB Flash,32KB RAM, BT 4.2,PSoC CreatorNEWQ316Q316Q316CYBL1147x/57xCM0, DMA, 2 SCB, I2S2-Finger1, 4 TCPWM, 4 PWM,ADC, 36 GPIO, 256KB Flash,32KB RAM, BT 4.2,PSoC CreatorCY8C41x8-BL5xxCM0, DMA, 2 SCB, 4 Opamp,2 CMP, ADC, 4 TCPWM,36 GPIO, 256KB Flash,32KB RAM, BT 4.2,PSoC CreatorCY8C42x8-BL5xxCM0, DMA, 2 SCB, 4 Opamp,2 CMP, 4 UDB, ADC,4 TCPWM, 36 GPIO,256KB Flash, 32KB RAM,BT 4.2, PSoC CreatorCYBL1057xCM0, 2 SCB, I2S2-Finger, 4 TCPWM,4 PWM, ADC, 36 GPIO,256KB Flash, 32KB RAM,BT 4.1, PSoC CreatorCY8C41x8-BL4xxCM0, 2 SCB, ADC, 4 Opamp,2 CMP, 4 TCPWM, 36 GPIO,256KB Flash, 32KB RAM,BT 4.1, PSoC CreatorCY8C42x8-BL4xxCM0, 2 SCB, ADC, 4 Opamp,2 CMP, 4 UDB, 4 TCPWM,36 GPIO, 256KB Flash,32KB RAM, BT 4.1,PSoC CreatorCYBL1046x/57xCM0, 2 SCB, I2S, 2-Finger,4 TCPWM, 4 PWM, ADC,36 GPIO, 256KB Flash,32KB RAM, BT 4.2,PSoC CreatorCY8C41x7-BL4xxCM0, 2 SCB, ADC, 4 Opamp,2 CMP, 4 TCPWM, 36 GPIO,128KB Flash, 16KB RAM,BT 4.1, PSoC CreatorCY8C42x7-BL4xxCM0, 2 SCB, ADC, 4 Opamp,2 CMP, 4 UDB, 4 TCPWM,36 GPIO, 128KB Flash,16KB RAM, BT 4.1,PSoC CreatorNEWBCM20738CM3, SPI, UART, I2C,IR TX/RX, ADC, 4 PWM,KB Scanner, Mouse QD,40 GPIO, 60 KB RAM,BT 4.1, ADKBCM20737CM3, SPI, UART, I2C,IR TX/RX, ADC, 4 PWM,LE Audio, NFC15, Crypto,14 GPIO, 60KB RAM,BT 4.1, WICED SDKNEWNEWBCM20732CM3, SPI, UART, I2C,IR TX/RX, ADC, 4 PWM,14 GPIO, 60KB RAM, BT 4.0,WICED SDKBCM20736CM3, SPI, UART, I2C,IR TX/RX, ADC, A4WP16,4 PWM, 40 GPIO, 60KB RAM,BT 4.1, WICED SDKCYBL1016xCM0, 2 SCB, I2S, 4 TCPWM,4 PWM, ADC, 36 GPIO,128KB Flash, 16KB RAM,BT 4.2, PSoC CreatorIntegration and Flexibility1Touch-sensing technology with up to 2-fingergestures2 ARM Cortex -M0/M0 /M3/M43 Broadcom serial communications block4 Infrared transmit and receive5 Keyboard scanner6 Mouse quadrature decoder002-10983Rev **Owner: UTSV7Cryptographic accelerator block for security8 Bluetooth Specification9 Software development kit10 Direct memory access11 Serial communication block(SPI/I2C/UART)12 Comparator13Universal digital blockTimer/Counter/PWM15 Out-of-Band pairing with NFC16 Alliance for Wireless Power BLEProfile14Advanced BLE System Design Customer Training YYStatusAvailability11

EZ-BLETM Module PortfolioProgrammable Radio-on-Chip (EZ-BLETM PRoCTM)256KB Flash128KB Flash256KB FlashCYBLE-014008-00EZ-BLE PSoC Module BLE 4.14 Opamps, 1 CMP6, 4 UDBs7CM0, 2 SCB,, 25 GPIOs11 x 11 x 1.80 mm SMTCYBLE-214009-00 Q316EZ-BLE PSoC Module BLE 4.14 Opamps, 1 CMP, 4 UDBsCM0, 2 SCB,, 25 GPIOs11 x 11 x 1.80 mm SMTCYBLE-022001-00EZ-BLE PRoC Module BLE5 4.1CM03, 2 SCB416 GPIOs10 x 10 x 1.80 mm SMT8CYBLE-222005-00EZ-BLE PRoC Module BLE 4.1CM0, 2 SCB16 GPIOs10 x 10 x 1.80 mm SMTCYBLE-222014-01 Q316EZ-BLE PRoC Module BLE 4.2CM0, 2 SCB16 GPIOs10 x 10 x 1.80 mm SMTCYBLE-012011-00EZ-BLE PRoC Module BLE 4.1CM0, 2 SCB23 GPIOs14 x 19 x 2.00 mm SMTCYBLE-212019-00 Q316EZ-BLE PRoC Module BLE 4.1CM0, 2 SCB23 GPIOs14 x 19 x 2.00 mm SMTCYBLE-212020-01 Q316EZ-BLE PRoC Module BLE 4.2CM0, 2 SCB23 GPIOs14 x 19 x 2.00 mm SMTCYBLE-214015-01 Q316EZ-BLE PSoC Module BLE 4.24 Opamps, 1 CMP, 4 UDBsCM0, 2 SCB,, 25 GPIOs11 x 11 x 1.80 mm SMTCYBLE-012012-10EZ-BLE PRoC Module BLE 4.1CM0, 2 SCB23 GPIOs, NS10, NC1114 x 19 x 2.00 mm SMTCYBLE-212023-10 Q316EZ-BLE PRoC Module BLE 4.1CM0, 2 SCB23 GPIOs, NS10, NC1114 x 19 x 2.00 mm SMTCYBLE-202007-01 Q316EZ-BLE PRoC Module BT 4.2External Antenna via u.FLCM0, 2 SCB, PA9, 19 GPIOs15 x 23 x 2.0 mm SMTCYBLE-224110-00 Q316EZ-BLE PSoC XT/XR12 ModuleBLE 4.1, 4 Opamps, 1 CMP, PA94 UDBs, CM0, 2 SCB, 25 GPIOs9.5 x 15.4 x 1.80 mm SMTCYBLE-212006-01 Q316EZ-BLE PRoC Module BT 4.2PCB AntennaCM0, 2 SCB, PA9, 19 GPIOs15 x 23 x 2.0 mm SMTLong Range2Standard Range1128KB FlashProgrammable System-on-Chip (EZ-BLE PSoC )NEWCYBLE-202013-11 Q316EZ-BLE PRoC Module BT 4.2External Antenna via RF PinCM0, 2 SCB, PA9, 19 GPIOs15 x 23 x 2.0 mm SMTCYBLE-224116-01 Q316EZ-BLE PSoC XT/XR12 BLE 4.24 Opamps, 1 CMP, 4 UDBs, PA9CM0, 2 SCB, 25 GPIOs9.5 x 15.4 x 1.80 mm SMTIntegration1 Rangeup to 30 meter Line-of-Sight2 Range up to 400 meter Line-of-Sight3 ARM Cortex -M04 Serial communication block002-10983Rev **Owner: UTSV5 BLESpecification Version6 Comparator7 Universal Digital Block8 Surface mount technologyConcept9Power Amplifier10 NS No Shield11 NC No Certifications12 XT/XR Extended Temperature/Extended RangeAdvanced BLE System Design Customer Training sAvailability12

Advanced BLE System DesignDEMO: UPGRADING TO BLUETOOTH 4.2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop13

Upgrade Your BLE Pioneer Kit WithThree New Bluetooth 4.2 Add-OnsThe existing BLE Pioneer Kit (CY8CKIT-042-BLE) contains: BLE Pioneer Kit (CY8CKIT-042-BLE)BLE Pioneer Kit baseboardPlug-In Boards1BLE-USB bridge using PRoC BLEExample projectsCySmart2 softwareIt can be upgraded with two new BLE plug-in boards Plug into the existing BLE Pioneer Kit BaseboardUse new Bluetooth 4.2 PSoC 4 and PRoC devicesFeature 256KB flash, 32KB SRAM and an 8-channel DMA3controller, plus compatibility with existing devicesAnd one new BLE-USB bridge:PSoC 4 BLE Plug-In Board1 PRoC BLE Plug-In Board1(CY5676A)(CY8CKIT-143A)BLE-USB Bridge Using PRoC BLE (CY5677)Enables testing and debugging of new Bluetooth 4.2 features4Retains all existing functionalityUpgrade your Bluetooth designs with Cypress’s BLE Pioneer Kit and three new Bluetooth 4.2 add-ons1Production-ready, fully certified EZ-BLE modules with PSoC 4 or PRoC BLE devices are also available. Refer to the EZ-BLE Module Portfolio slide for more detailsA GUI-based software tool that installs on your PC to test and debug BLE functionality3 Direct memory access: A method to transfer data between hardware subsystems and main system memory without involving the main processor, typically implemented in a coprocessor4 Bluetooth 4.2 features are described in the Lab #2: Bluetooth 4.2 Features section2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop14

Upgrade Your PSoC Creator ProjectTo Use Bluetooth 4.2Objectives:Learn how to use PSoC Creator to upgrade an existing project to use a Bluetooth 4.2 device:Use the New Project GUI1 to open a code example2 for a Bluetooth 4.1 deviceUse the Device Selector GUI3 to upgrade to a Bluetooth 4.2 deviceUse the Component Update GUI4 to upgrade the ComponentsBuild and program your project onto your BLE Pioneer KitDevice Selector GUI3 in PSoC CreatorSoftware tool:PSoC Creator1The New Project GUI in PSOC Creator is used to create a new project or open an example project for any Cypress deviceAn example project available as part of PSoC Creator3 The Device Selector GUI in PSoC Creator is used to change the target device for a project4 The Component Update GUI in PSoC Creator is used to upgrade the Components in your PSoC Creator project2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop15

Advanced BLE System DesignLAB #1: OVER-THE-AIR FIRMWAREUPGRADE002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop16

Over-The-Air Firmware Upgrade1 UsingBootloader2 FunctionalityOver-the-air firmware upgrade1 allows firmware updates after the product has shippedEliminates the need for product recall to fix firmware issues and enables firmware enhancements for products in the fieldOver-the-air firmware upgrade1 requires a bootloader2Bootloaders are classified as external memory3, fixed stack4 and upgradeable stack5, based on features supportedBootloader2 FeaturesExternal Memory Bootloader3Fixed Stack Bootloader4Upgradeable Stack Bootloader5Does not require external memoryX Can upgrade BLE Protocol Stack X Can upgrade application-specific firmware Cypress’s BLE devices support all types of bootloaders2 including the upgradeable stack bootloader51The process of replacing existing firmware with a newer version over a wireless interface like BLEThe part of the firmware that is responsible for upgrading the internal memory of the device3 External memory bootloader is supported on Cypress BLE devices with 128 KB or 256 KB of flash.For external memory use the Cypress FRAM (FM24V10) on the BLE Pioneer Kit for prototyping and the Cypress NOR-Flash (S25FL and S25FS families) to reduce cost for mass production4 Fixed stack bootloader is supported on all Cypress BLE devices with 128 KB or 256 KB of flash5 Upgradeable stack bootloader is supported on all Cypress BLE devices with 256 KB of flash2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop17

Over-The-Air Firmware Upgrade1 UsingUpgradeable Stack Bootloader21The bootloader2 on the target device3 establishes aBLE connection with the host device4 using the oldBLE Protocol Stack2The bootloader2 uses the old BLE Protocol Stackto receive the new BLE Protocol Stack and overwrites theold application-specific firmwareTarget Device3Target Device3Internal Flash MemoryHost Device4Internal Flash MemoryHost Device4Upgradeable Stack Bootloader2New BLE Protocol StackBLENew Application-SpecificFirmware3Upgradeable Stack Bootloader2Old BLE Protocol StackNew BLE Protocol StackOld Application-SpecificFirmwareNew Application-SpecificFirmwareThe bootloader2 overwrites the old BLE Protocol Stackwith a copy of the new BLE Protocol Stack4BLENew BLE Protocol StackThe bootloader2 uses the new BLE Protocol Stack toreceive the new application-specific firmware andoverwrites the copy of the new BLE Protocol Stack made inStep 2. Over-the-air firmware upgrade1 is now completeTarget Device3Target Device3Internal Flash MemoryHost Device4Old BLE Protocol StackInternal Flash MemoryHost Device4Upgradeable Stack Bootloader2Upgradeable Stack Bootloader2BLEBLENew BLE Protocol StackNew BLE Protocol StackNew BLE Protocol StackNew BLE Protocol StackNew Application-SpecificFirmwareNew BLE Protocol StackNew Application-SpecificFirmwareNew Application-SpecificFirmware1The process of replacing existing firmware with a newer version over a wireless interface like BLEThe part of the firmware that is responsible for upgrading the internal memory of the device3 The device that needs to be upgraded using over-the-air firmware upgrade2002-10983Rev **Owner: UTSV4The host device is responsible for sending new firmware to the targetdevice that needs to be upgradedAdvanced BLE System Design Customer Training Workshop18

Prototyping Over-The-Air FirmwareUpgrade1The CySmart2 software with BLE-USB bridge emulates a host3 deviceThe BLE Component simplifies the addition of the over-the-air firmware upgrade1 feature to the targetdevice4 firmwareHost Device3: BLE-USB Bridge (CY5677)Target Device4: PSoC 4 BLE Plug-In Board (CY8CKIT-143A)BLECySmart2 (for host3)1BLE Component Configuration Tool (for target4)The process of replacing existing firmware with a newer version over a wireless interface like BLEA GUI-based software tool that installs on your PC to test and debug BLE functionality3 The host device is responsible for sending new firmware to the target device that needs to be upgraded4The device that needs to be upgraded using over-the-air firmware upgrade2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop19

Lab #1: Over-The-Air FirmwareUpgrade1Objectives:Understand the architecture of an upgradeable stack bootloader2Learn how to add over-the-air firmware upgrade1 feature to your project in PSoC CreatorLearn how to use the CySmart3 software and the BLE-USB bridge as a host4 to upgrade firmwareSoftware tools:PSoC CreatorCySmart3Bootloader2 Component IconBLE Component IconBootloadable5 Component IconComponents:BLE ComponentBootloader2 ComponentBootloadable5 ComponentLab 1: Block DiagramBLE Pioneer Kit (CY8CKIT-042-BLE)Windows PCPSoC 4 BLE (CY8CKIT-143A)P2[6],P3[6],P3[7]FlashCySmart3 Software3RGB LED4ARM Cortex -M01002-10983Rev **Owner: UTSVBLE32The process of replacing existing firmware with a newer version over a wireless interface like BLEpart of the firmware that is responsible for upgrading the internal memory of the target3 A GUI-based software tool that installs on your PC to test and debug BLE functionality2 TheUSBBLEBLE-USB BridgeWith PRoC BLE(CY5677)4 Thehost device is responsible for sending new firmware to the target device thatneeds to be upgraded5 The part of the firmware in the target device that needs to be upgradedAdvanced BLE System Design Customer Training Workshop20

Advanced BLE System DesignSESSION BREAK002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop21

Advanced BLE System DesignLAB #2: BLUETOOTH 4.2 FEATURES002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop22

Cypress’s BLE Solutions Support NewBluetooth 4.2 FeaturesBluetooth 4.2 FeaturesBenefitsData Length ExtensionFor Faster Data TransferIncreases payload from 27 bytes to 251 bytes2.6x higher throughput (up to 800 Kbps) than Bluetooth 4.1 (up to 300 Kbps)Implement bi-directional voice transferLeverage asymmetric bandwidth4 toimprove power consumptionEnhanced SecurityFor More Secure Payment SolutionsUses FIPS1-compliant ECDH2 for key-exchangeEnhanced encryption ensures industry standard security with interoperabilityTransfer passwords and financialinformation without worrying aboutbeing hackedPrivacy 1.2For Smarter BLE DevicesReduces power consumed during address resolution3Privacy prevents tracking of BLE devices and safeguards sensitive user dataPrevent unauthorized tracking of wearablesSafeguard personal health information12Federal Information Processing StandardsElliptic Curve Diffie-Hellman algorithm provides a mechanism to exchange keys over anunsecured channel.002-10652Rev *BOwner: UTSVTech lead: SASD3The process that derives the original address from encrypted random addressesbandwidth refers to different maximum throughput in TX and RXdirectionsPSoC 4 BLE II and PRoC BLE II New Product Introduction23Proof Source4 Asymmetric

Bluetooth 4.2: Data Length ExtensionData length extension enables 2.6x higher throughput ( 800 Kbps) than Bluetooth 4.1 ( 300 Kbps)Data length extension enables over-the-air packets to carry up to 251B of payload1 compared to 27B with Bluetooth 4.1Larger payload1 sizes result in lower transmission time and lower power consumptionPayload1 size can be negotiated and can be asymmetrical2 to ensure optimal throughput for the applicationBLE Data Transfer With Bluetooth 4.1RXT IFS3TX (27B)T IFS380 µs150 µs328 µs150 µsPayload1 Size 27B 216bTotal Time4 708 µsThroughput5 298 KbpsRXBLE Data Transfer With Bluetooth 4.2RXT IFS3TX (251B)T IFS380 µs150 µs2120 µs150 µsRXPayload1 Size 251B 2008bTotal Time4 2500 µsThroughput5 784 KbpsBLE Component Configuration Tool in PSoC Creator Makes Bluetooth 4.2’s Data Length Extension Feature Easy to Use1425The data contained in a packet excluding all overhead and meta-data added for transmission purposesTX and RX payloads can be set to different values. This enables throughput to be optimized based on application-specific requirements3 Inter-Frame Spacing Time: The time interval between RX and TX packets. This is defined as 150 µs by the Bluetooth Core Specification002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training WorkshopTime taken for 1 RX, 1 TX and 2 T IFSThroughput Payload Size/Total Time24

Bluetooth 4.2: Privacy 1.2Privacy prevents tracking of BLE devices and safeguards sensitive user dataBLE devices with privacy use a resolvable private address (RPA)1 that can be changed frequently to prevent trackingOnly peer devices that posses the identity resolving key (IRK)2 of the BLE device can connect to the BLE deviceThe Privacy 1.2 feature in Bluetooth 4.2 enables power-efficient BLE devicesAddress resolution3 is implemented in hardware, eliminating the need for CPU intervention during connection establishmentThe RPA1 can be changed at intervals of 1 second compared to 15 minutes in Bluetooth 4.1BLE Component Configuration Tool in PSoC Creator Makes Bluetooth 4.2’s Privacy 1.2 Feature Easy-To-Use1A 48-bit address generated by a BLE device using its identity resolving key (IRK)A 128-bit number used to generate and resolve the resolvable private address (RPA) of a BLE device3 The process that derives the original address from resolvable private address (RPA) for BLE communication2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop25

BLE Security ConceptsSecurity mechanisms in BLE ensure confidentiality and integrity of dataPairing: The process of authentication and key-exchange between two BLE devicesAssociation model1: A model that defines the method of pairing based on the input and output capabilities of the two BLE devicesAuthentication: The process of verifying the identity of a deviceKey-Exchange: The process of exchanging keys that will be used to encrypt future data exchanges between the two BLE devicesBonding: The process of storing the keys exchanged during the pairing process in internal flash memory. Bonding allows the BLEdevices to reconnect without the pairing processBLE Pairing And Bonding ProcedureDevice 2Device 1Pairing Request with I/O CapabilitiesPairing Response with I/O CapabilitiesDetermine Association ModelDetermine Association ModelAuthenticationEncrypt LinkEncrypt LinkKey ExchangeKey ExchangeThe pairing processinvolves authenticationand key-exchangebetween BLE devices.After pairing the BLEdevices must store thekeys to be bonded.PairedStore KeysStore KeysBonded1The types of association models and how to choose an association model based on device I/O capabilities are described in the Bluetooth Core Specification002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop26

Bluetooth 4.2: Enhanced SecurityBluetooth 4.2 enhances the protection against passive eavesdropping1 and MITM2 attacksA new secure connections feature, that uses the ECDH3 algorithm for key-exchange, to protect against passive eavesdropping1A new Numeric Comparison4 association model to protect against MITM2 attacks5Bluetooth 4.1’s legacy security mechanisms are supported for backward compatibilityBLE Component Configuration Tool in PSoC Creator Makes Bluetooth 4.2’s Enhanced Security Features Easy to Use1The process of monitoring the private communication between two BLE devicesMan-in-the-middle: An attack wherein the attacker monitors and alters the communication between two BLE devices. Both BLE devices believe they are directly communicating with each other3 Elliptic Curve Diffie-Hellman algorithm provides a mechanism to exchange keys over an unsecured channel. Refer to the Elliptic Curve Diffie-Hellman (ECDH) slide for details4 An association model that requires both BLE devices to have display and “Yes/No” input capability5 Passkey entry and out-of-band pairing association models also provide protection against man-in-the-middle attacks. Refer to the Bluetooth Core Specification for a complete description of these2002-10983Rev **Owner: UTSVAdvanced BLE System Design Customer Training Workshop27

Lab #2: Bluetooth 4.2 FeaturesObjectives:Learn how to implement Bluetooth 4.2 features on Cypress’s BLE devicesUnderstand how Bluetooth 4.2’s Data Length Extension feature provides higher throughput than Bluetooth 4.1Understand how Bluetooth 4.2’s Privacy 1.2 feature prevents the tracking of BLE devicesUnderstand how Bluetooth 4.2’s Numeric Comparison1 association model worksBLE Component IconUART Component IconSoftware tools:PSoC CreatorCySmart2TeraTerm3Lab 2: Block DiagramComponents:BLE ComponentUART ComponentBLE Pioneer Kit (CY8CKIT-042-BLE)Windows PCPSoC 4 BLE (CY8CKIT-143A)SWITCHP2[7]4TeraTerm3 SoftwareUARTP2[6],P3[6],P3[7]FlashUAR

Android or iOS smartphone (not provided) Raise your hand if you need help! Software Version File Name PSoC Creator1 Installer 3.3 CP3 (or newer) "PSoCCreatorSetup_3.3_cp3_b9648.exe" CySmart2 Installer 1.2 (or newer) "CySmartSetup_1.2.exe" BLE Pioneer Kit Installer Revision ** (or newer) "CY8CKIT-042_BLE-A_SetupOnlyPackage_RevSS.exe"