1.. _cy8ckit_062_ble: 2 3INFINEON PSoC63 BLE Pioneer Kit 4############################### 5 6Overview 7******** 8 9The PSoC 6 BLE Pioneer Kit (CY8CKIT-062-BLE) is a hardware platform that 10enables design and debug of the Cypress PSoC 63 BLE MCU. 11 12The PSoC 6 BLE Pioneer Kit features the PSoC 63 MCU: a dual-core MCU, with a 13150-MHz Arm Cortex-M4 as the primary application processor and a 100-MHz Arm 14Cortex-M0+ that supports low-power operations, 1MB of Flash, 288KB of SRAM, 15an integrated BLE 4.2 radio, 78 GPIO, 7 programmable analog blocks, 12 16programmable digital blocks, and capacitive-sensing with CapSense. 17 18The PSoC 6 BLE Pioneer board offers compatibility with Arduino shields, a 19512-Mb NOR flash, onboard programmer/debugger (KitProg2), USB Type-C power 20delivery system (EZ-PD™ CCG3), 5-segment CapSense slider, two CapSense 21buttons, one CapSense proximity sensing header, an RGB LED, two user LEDs, 22and one push button. 23 24The CY8CKIT-062-BLE package includes a CY8CKIT-028-EPD E-INK Display Shield 25that contains a 2.7-inch E-INK display, a motion sensor, a thermistor, and a 26PDM microphone. The kit package also contains a CY5677 CySmart BLE 4.2 USB 27Dongle that is factory-programmed to emulate a BLE GAP Central device, 28enabling you to emulate a BLE host on your computer. 29 30The Cortex-M0+ is a primary core on the board's SoC. It starts first and 31enables the CM4 core. 32 33.. image:: img/cy8ckit-062-ble.jpg 34 :align: center 35 :alt: CY8CKIT_062_BLE 36 371. Battery charging indicator (LED6) 382. USB PD output voltage availability indicator (LED7) 393. KitProg2 USB Type-C connector (J10) 404. Cypress EZ-PD™ CCG3 Type-C Port Controller with PD (CYPD3125-40LQXI, U3) 415. KitProg2 programming mode selection button (SW3) 426. KitProg2 I/O header (J6)1 437. KitProg2 programming/custom application header (J7)1 448. External power supply connector (J9) 459. PSoC 6 BLE user button (SW2) 4610. KitProg2 application selection button (SW4) 4711. Digilent® Pmod™ compatible I/O header (J14)1 4812. Power LED (LED4) 4913. KitProg2 status LEDs (LED1, LED2, and LED3) 5014. PSoC 6 reset button (SW1) 5115. PSoC 6 I/O header (J18, J19 and J20) 5216. Arduino™ Uno R3 compatible power header (J1) 5317. PSoC 6 debug and trace header (J12) 5418. Arduino Uno R3 compatible PSoC 6 I/O header (J2, J3 and J4) 5519. PSoC 6 program and debug header (J11) 5620. KitProg2 programming target selection switch (SW6) 5721. CapSense slider and buttons 5822. CapSense proximity header (J13) 5923. PSoC 6 BLE VDD selection switch (SW5) 6024. PSoC 6 BLE power monitoring jumper (J8)2 6125. Arduino Uno R3 compatible ICSP header (J5)1 6226. PSoC 6 user LEDs (LED8 and LED9) 6327. RGB LED (LED5) 6428. Cypress 512-Mbit serial NOR Flash memory (S25FL512S, U4) 6529. Cypress serial Ferroelectric RAM (U5)1 6630. VBACKUP and PMIC control selection switch (SW7)2 6731. Cypress PSoC 6 BLE (CY8C6347BZI-BLD53, U1) 6832. BLE Antenna 6933. U.FL connector for external antenna (J17)1 7034. Cypress main voltage regulator (MB39C022G, U6) 7135. KitProg2 (PSoC 5LP) programmer and debugger(CY8C5868LTI-LP039, U2) 7236. Battery connector (J15)1,2 7337. USB PD output voltage (9V/12V) connector (J16) 74 75Hardware 76******** 77 78For more information about the PSoC 63 BLE MCU SoC and CY8CKIT-062-BLE board: 79 80- `PSoC 63 BLE MCU SoC Website`_ 81- `PSoC 63 BLE MCU Datasheet`_ 82- `PSoC 63 BLE MCU Architecture Reference Manual`_ 83- `PSoC 63 BLE MCU Register Reference Manual`_ 84- `CY8CKIT-062-BLE Website`_ 85- `CY8CKIT-062-BLE User Guide`_ 86- `CY8CKIT-062-BLE Schematics`_ 87 88Supported Features 89================== 90 91The board configuration supports the following hardware features: 92 93+-----------+------------+-----------------------+ 94| Interface | Controller | Driver/Component | 95+===========+============+=======================+ 96| NVIC | on-chip | nested vectored | 97| | | interrupt controller | 98+-----------+------------+-----------------------+ 99| SYSTICK | on-chip | system clock | 100+-----------+------------+-----------------------+ 101| GPIO | on-chip | gpio | 102+-----------+------------+-----------------------+ 103| PINCTRL | on-chip | pin control | 104+-----------+------------+-----------------------+ 105| SPI | on-chip | spi | 106+-----------+------------+-----------------------+ 107| UART | on-chip | serial port-polling; | 108| | | serial port-interrupt | 109+-----------+------------+-----------------------+ 110 111 112The default configurations can be found in the Kconfig 113:zephyr_file:`boards/arm/cy8ckit_062_ble/cy8ckit_062_ble_m0_defconfig` for 114Cortex-M0+ and on the Kconfig 115:zephyr_file:`boards/arm/cy8ckit_062_ble/cy8ckit_062_ble_m4_defconfig` for 116Cortex-M4 117 118System Clock 119============ 120 121The PSoC 63 BLE MCU SoC is configured to use the internal IMO+FLL as a source for 122the system clock. CM0+ works at 50MHz, CM4 - at 100MHz. Other sources for the 123system clock are provided in the SOC, depending on your system requirements. 124 125Serial Port 126=========== 127 128The PSoC 63 BLE MCU SoC has 8 SCB blocks and each one can be configured as 129UART/SPI/I2C interfaces for serial communication. At the moment UART5 on SCB5 130and UART6 on SCB6 are configured. SCB5 is connected to the onboard KitProg2's 131USB-UART Bridge working as a serial console interface. SCB6 to P13_0, P13_1 132pins on the J3 of the Arduino Uno R3 compatible PSoC6 I/O header for general 133purposes. 134 135OpenOCD Installation 136==================== 137 138To get the OpenOCD package, it is required that you 139 1401. Download the software ModusToolbox 3.1. https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolbox 1412. Once downloaded add the path to access the Scripts folder provided by ModusToolbox 142 export PATH=$PATH:/path/to/ModusToolbox/tools_3.1/openocd/scripts 1433. Add the OpenOCD executable file's path to west flash/debug. 1444. Flash using: west flash --openocd path/to/infineon/openocd/bin/openocd 1455. Debug using: west debug --openocd path/to/infineon/openocd/bin/openocd 146 147Programming and Debugging 148************************* 149 150The CY8CKIT-062-BLE includes an onboard programmer/debugger (KitProg2) with 151mass storage programming to provide debugging, flash programming, and serial 152communication over USB. There are also PSoC 6 program and debug headers J11 153and J12 that can be used with Segger J-Link [default]. 154A watchdog timer is enabled by default. To disable it call Cy_WDT_Unlock() and 155Cy_WDT_Disable(). 156 157#. Build the Zephyr kernel and the :ref:`hello_world` sample application: 158 159 .. zephyr-app-commands:: 160 :zephyr-app: samples/hello_world 161 :board: cy8ckit_062_ble_m0 162 :goals: build 163 :compact: 164 165#. Run your favorite terminal program to listen for output. Under Linux the 166 terminal should be :code:`/dev/ttyACM0`. For example: 167 168 .. code-block:: console 169 170 $ minicom -D /dev/ttyACM0 -o 171 172 The -o option tells minicom not to send the modem initialization 173 string. Connection should be configured as follows: 174 175 - Speed: 115200 176 - Data: 8 bits 177 - Parity: None 178 - Stop bits: 1 179 180#. To flash an image: 181 182 .. zephyr-app-commands:: 183 :zephyr-app: samples/hello_world 184 :board: cy8ckit_062_ble_m0 185 :goals: flash 186 :compact: 187 188 You should see "Hello World! cy8ckit_062_ble_m0" in your terminal. 189 190Running on Dual Core 191******************** 192 193#. Build the Zephyr kernel and the :zephyr:code-sample:`button` sample application: 194 195 .. zephyr-app-commands:: 196 :zephyr-app: samples/basic/button 197 :board: cy8ckit_062_ble_m4 198 :goals: build 199 :compact: 200 201#. If you have a USB-Serial adapter, you can connect SBC[UART]-6 on Arduino 202 header. Schematic should be checked for connections. Run your favorite 203 terminal program again now listen for another output. Under Linux the 204 terminal should be :code:`/dev/ttyUSB0`. For example: 205 206 .. code-block:: console 207 208 $ minicom -D /dev/ttyUSB0 -o 209 210 The -o option tells minicom not to send the modem initialization 211 string. Connection should be configured as follows: 212 213 - Speed: 115200 214 - Data: 8 bits 215 - Parity: None 216 - Stop bits: 1 217 218#. To flash an image: 219 220 .. zephyr-app-commands:: 221 :zephyr-app: samples/basic/button 222 :board: cy8ckit_062_ble_m4 223 :goals: flash 224 :compact: 225 226#. Configure Cortex-M0+ to enable Cortex-M4: 227 228 The last step flash the M4 image on the flash. However, Cortex-M0 by default 229 doesn't start the M4 and nothing will happen. To enable Cortex-M4 CPU, 230 repeat the steps on programming and debug and add the following parameter 231 when performing the build process. 232 233 .. zephyr-app-commands:: 234 :zephyr-app: samples/hello_world 235 :board: cy8ckit_062_ble_m0 236 :goals: build flash 237 :gen-args: -DCONFIG_SOC_PSOC6_M0_ENABLES_M4=y 238 :compact: 239 240 Now you can press button SW-2 and see LED-9 blink at same time you have the 241 "Hello World! cy8ckit_062_ble_m0" in the your terminal. 242 243Board Revision 244************** 245 246The CY8CKIT-062-BLE KitProg2 shares connections with Arduino-R3 header. This 247connections may not allow the correct use of shields. The default board 248revision (0.0.0) allows use of default connections. The use of Arduino headers 249are only possible after rework the board and using the revision 1.0.0. 250 251#. Build the Zephyr kernel and the :ref:`hello_world` sample application for 252 board revision 1.0.0: 253 254 .. zephyr-app-commands:: 255 :zephyr-app: samples/hello_world 256 :board: cy8ckit_062_ble_m0@1.0.0 257 :goals: build 258 :compact: 259 260#. The differences from version 0.0.0 to 1.0.0: 261 262+-------------+------------+------------+ 263| Connection | 0.0.0 | 1.0.0 | 264+=============+============+============+ 265| CDC-COM RX | P5_0 | P9_0 | 266+-------------+------------+------------+ 267| CDC-COM TX | P5_1 | P9_1 | 268+-------------+------------+------------+ 269| R77 | X | | 270+-------------+------------+------------+ 271| R78 | | X | 272+-------------+------------+------------+ 273 274 275The P9 pins are available at J2. Those signals should be routed to J6. 276 277J2-2 to J6-14 278J2-4 to J6-13 279 280The most complex part is short circuit pins 14 and 15 from U13. That connect 281UART_RTS with UART_CTS from KitProg2. 282 283References 284********** 285 286.. _PSoC 63 BLE MCU SoC Website: 287 https://www.cypress.com/products/32-bit-arm-cortex-m4-cortex-m0-psoc-63-connectivity-line 288 289.. _PSoC 63 BLE MCU Datasheet: 290 https://www.cypress.com/documentation/datasheets/psoc-6-mcu-psoc-63-ble-datasheet-programmable-system-chip-psoc 291 292.. _PSoC 63 BLE MCU Architecture Reference Manual: 293 https://www.cypress.com/documentation/technical-reference-manuals/psoc-6-mcu-psoc-63-ble-architecture-technical-reference 294 295.. _PSoC 63 BLE MCU Register Reference Manual: 296 https://www.cypress.com/documentation/technical-reference-manuals/psoc-6-mcu-cy8c63x6-cy8c63x7-cy8c63x6-cy8c63x7-registers 297 298.. _CY8CKIT-062-BLE Website: 299 https://www.cypress.com/documentation/development-kitsboards/psoc-6-ble-pioneer-kit-cy8ckit-062-ble 300 301.. _CY8CKIT-062-BLE User Guide: 302 https://www.cypress.com/file/390496/download 303 304.. _CY8CKIT-062-BLE Schematics: 305 https://www.cypress.com/file/417021/download 306