"Matrix" (by WordWeb Dictionary meaning)
- An enclosure within which something originates or develops
At the start a lot of confusion engulfed me on the many tools available for the kit. I have recently been using Raspberry pi (with Kali Os installed) and diving into the cypress and MBED website had me sit upright (24/7) having deep thought on how to find my way around. Remember in my earlier blogs I did stress on the challenges and in this blog I would be discussing on some of it
(a) Setup (on tools, code-examples, drivers etc) and
(b) hands-on with the kit (code flashing options, flash and execute a sample program)
and guess what (being from an engineering background) I manage to find my way through with some difficulty (will discuss what i mean by it).
This has been my starting point and develop my understanding of the Pioneer kit and IDE tools as I went along.
PSoC® 6 WiFi-BT Pioneer Kit (CY8CKIT-062-WiFi-BT)
I also download the ISO image "cy8ckit062wifibt_RevSS.iso" which has all the relevant files for the Pioneer kit.
Diving through the cypress.com website I found the necessary tools installation required by me (i always prefer to have more than one options as a fallback).
Given that there is a lot online help/guide I would not dwell into each of the IDE instead just touch upon at the high-level discussion only.
IDE Installation (windows)
For some reason Wireless Connectivity feature is not integrated into PSoC-Creator or ModustoolBox and so for any development w.r.t. Wireless Connectivity use this IDE.
User can use this IDE to develop Wireless Connectivity applications
CE222494 - PSoC 6 WICED WiFi Demo application is the default application Pre-programmed into the Pioneer kit i.e. PSoC® 6 WiFi-BT Pioneer Kit (CY8CKIT-062-WiFi-BT)
a. Installer: "WICED-Studio-220.127.116.11-IDE-Installer"
b. Code-example: "CE222494 - PSoC 6 WICED WiFi Demo"
2. PSoC Creator
Use this IDE to develop, build, debug, program (flash) the Pioneer Kit.
also use this IDE to fetch/refer to code-examples.
IDE installs PDL (driver libraries) and Programmer tool.
a. PDLSetup3.1.2 Installer
install via "Cypress Update Manager" > update manager > PDLSetup > <download and install manually>
b. PSoC Programmer 3.28.7
update/install via "Cypress Update Manager" > update manager > PSoC Programmer
3. PSoC Programmer IDE
Installer: PSoC Programmer 3.28.7.exe
if you wish to play with code-example pre-build binaries then I would recommend installing this tool and no-other.
You can't do any development, code-build, debug with this tool.
if you have pre-build HEX binaries and wish to try run/execute then use this tool to program the Pioneer kit.
Another important feature i like about this tool is you can toggle on/off the Pioneer Kit without having to remove/disconnect the USB cable (which power the Kit).
This tool also show at what voltage the kit is config/operating in for e.g. 3.3V.
Figure-1: PSoC Programmer after firmware update.
Use this tool to upgrade to Firmware v1.01.158, This firmware only supported modes kp3-hid & kp3-bulk.
kp3-daplink (also known as mass-storage) is not supported in this firmware.
To support daplink mode, use the fw-loader.exe tool to upgrade to Firmware v1.21.707 (supports mode kp3-hid/bulk/bootloader/daplink),
Pioneer kit must be (in bootloader mode) plugged-in via USB cable to the laptop/desktop when upgrading.
Use this IDE to develop, build, debug, program the Pioneer Kit.
also use this IDE to fetch/refer to code-examples.
also contain Board-Support-Package (BSP) available via github.
5. MBED CLI (Command Line non IDE) based installer.
a. Installer: Mbed_installer_v0.4.10.exe
b. install python module,
pip install mbed-cli mbedls mbed pyocd
We will try to download, build code-example "mbed-os-example-blinky", and flash .hex to pioneer kit.
- Download mbed-os + mbed-blinky source code to local repository.
mbed import mbed-os-example-blinky
- Check if tool-chain is supported by our pioneer kit.
mbed compile -S
- Compile/build (mbed-os.lib + mbed-os-example-blinky.hex)
<mbed compile -m TARGET -t TOOLCHAIN>
mbed compile -m CY8CKIT_062_WIFI_BT -t GCC_ARM
Memory layout in Pioneer Kit
1. Custom application
- Code-examples, .HEX binary are programmed into the custom application region.
for e.g. SW4 can be used to trigger this region ???
Upgrade to the most recent firmware via PSoC-Programmer tool or via FW-Loader (CLI) tool,
a. Firmware v1.01.158, is up-gradable using PSoC Programmer, (support modes kp3-hid/bulk)
b. Firmware v1.21.707, is up-gradable using fw-loader tool, (support modes kp3-hid/bulk/bootloader/daplink)
Can upgrade firmware from kitprog2 (--update-kp2) to kitprog3 (--update-kp3) or downgrade from kitprog3 (--update-kp3) to kitprog2 (--update-kp2) depending on your kit or requirement. Pioneer kit must be in boot-loader mode to update/upgrade new firmware.
Pioneer kit is pre-programmed with these (default) modes,
i. BULK is used for Programming/Debugging, CMSIS-DAP (BULK), kp3-bulk,
ii. HID offers slower communication, CMSIS-DAP (HID), kp3-hid,
Not supported, require to upgrade to new firmware 1.21.707 to support this mode.
iii. Bootloader is to upgrade a new firmware, kp3-bootloader
iv. DAPLINK, kp3-daplink
- also known as Mass-Storage enumerated device.
- This mode allows programming the Pioneer kit with custom application very easy. Build the code offline and then copy the .HEX binary into the drive enumerated by this mode, for e.g. "d:" drive is enumerated. When the .HEX file is copied, the kit is program with the binary and reboot triggered.
- List of drivers shown in Device Manager
Figure-2: daplink drivers for Mass Storage
Use the SW3 to switch between these modes kp3-bulk/hid/bootloader/daplink. If you are using fw-loader tool, make sure to close PSoC Programmer tool, otherwise the device will not be found.
Refer to this file "fw-loader(Guide).txt" as attachment to understand how to run fw-loader.exe tool to switch mode.
Refer to the file KitProg3 User Guide.pdf (section 7-Troubleshooting),
KitProg3 uses industry-standard CMSIS-DAP V2.0.0 and V1.2.0 as the Bulk and HID endpoints transport.
If your DAPLink drivers get messed up (as it did for me when unknowingly I installed mbedWinSerial_16466.exe drivers namely "mbed Composite Device" & "mbed Serial COM" as seen in device manager under DAPLink CMSIS-DAP). In order to fix such driver issues follow the troubleshooting steps and viola things were back to normal and using SW3 switch I could toggle between BUIL/HID/Bootloader/DAPLink endpoint modes.
If you see a yellow triangle against “CMSIS-DAP v2" and “WebUSB: CMSIS-DAP", it means that your drivers are messed up and more than one version of incompatible drivers are present. You need to find those incompatible drivers and remove/uninstall/delete it. For me I had installed mbedWinSerial_16466.exe and so had to uninstall and delete both "mbed Composite Device" & "mbed Serial COM".
Use winusbcompat.zip (5.55 KB) to manually install driver from Device Manager for “CMSIS-DAP v2" and “WebUSB: CMSIS-DAP". I shared this link because its hard to find them and not available in Microsoft site,
- Is used to update/upgrade to a new firmware.
- two ways to enter into boot-loader mode
a. press sw3 while plug-in the pioneer kit via usb to laptop/desktop, release sw3 after 2sec.
b. use fw-loader tool (CLI based),
plug-in the pioneer kit,
open command window,
switch to directory containing fw-loader.exe
fw-loader.exe kp3-bootloader ; enter boot-loader mode
fw-loader.exe --update-kp3 ; upgrade to new firmware
All the above IDE can be used to build code-examples to generate HEX binary. IDE have debug capabilities as well.
Note: Unsure if the HEX binary built by one IDE can be program into device using another !!!
https://os.mbed.com/teams/mbed-os-examples/ ; contains exhaustive list of sample projects.
- Cypress website
- PSoC Creator
- MBED CLI
https://github.com/cypresssemiconductorco (projects starts with string "mtb-")
IDE: (contains link to code-examples)
With the above exercise My goal is to get an hands-on with programming (flashing) a code-example (.hex) file into the Pioneer kit and I was able to also build setup MBED-Blinky code-example and see it work on the pioneer kit. My next task would be to tailor a sample application from the source code from PSoC-6-MCU-BLE-Connectivity-Designs
and to build my application over this.i.e.
1. Advertising, to share the Tx-Power
2. Connectable, to connect with client devices.
3. Connect to AWS Cloud.
Resources or the hardware kit I have with me is very limited and not what i initially planned.
2. Raspberry Pi 4 Model-B (use as a BLE client device), I would need more than one (at-least 4)
3. LG V20 phone (use as a BLE client device)
I had initially planned to order 4-5 in numbers, BLE v4.1 greater USB dongles which can work in dual mode and is programmable however due to lock-down local markets are shut.
something similar to this image, programmable via AT-Commands and a couple of them I can use as RFID Card (BLE Enabled). Unfortunately I couldn't find any.
PREV Blog NEXT Blog