Challenge Kit Received
I received my Challenge Kit CY8CKIT-062S2-43012 via UPS Thursday afternoon (September 9th). Thank Infineon, the Element14 team, and danzima ! So I'm now set for the challenge.
Modus Toolbox 2.3.1 Installation on Ubuntu 20.04
Modus Toolbox requires 64-bit Win10. And I'm still running a 32-bit version of it. So I've decided to install it on my Ubuntu 20,04 box.
After I've downloaded the packages I've uncompressed it
tar xvf ModusToolbox_2.3.0.4276-linux-install.tar.gz tar xvf ModusToolbox_2.3.1.4663-linux-install.tar.gz
It unzipped the IDE 2.3 and the upgrade 2.3.1 into ./ModusToolbox/ide_2.3
As well its installed ARM GCC Toolchain 9.3.19.3.1 20200408
vlasov01@remote:~$ /home/vlasov01/ModusToolbox/tools_2.3/gcc/bin/arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q3-update) 9.3.1 20200408 (release) Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Creating the AnyCloud: Bluetooth LE Environmental Sensing Service project
Modus Toolbox 2.3.1 comes with several project samples. My project requires sending sensor data over BLE to an app I've selected the AnyCloud: Bluetooth LE Environmental Sensing Service template as a starting point.
I've filtered boards by the board type CY8CKIT-062S2-43012.
And then selected the AnyCloud: Bluetooth LE Environmental Sensing Service template:
I've read the documentation provided with the project and adjusted some variables.
Setting ARM Toolchain GCC path
As well I've checked fw-loader KitProg3 version.
And I've created a starting script for the IDE mtb.sh
cd ModusToolbox/ide_2.3/eclipse/ export TOOLCHAIN=/home/vlasov01/ModusToolbox/tools_2.3/gcc export CY_TOOLS_PATH=/home/vlasov01/ModusToolbox/tools_2.3/ ./ModusToolbox
Build
The build was relatively fast and completed without any errors or warnings.
And then I run the project, It did another build and uploaded binaries to the board. It was very fast and straightforward,
CySmart App in Action
After I've installed and open CySmart app I've got a list of devices, but the the board was not their. I've reset the board by pressing SW1 XRES button. This button is used to reset PSoC 6 MCU. And I've got a new device - Thermistor.
I've tried to pair the device, but it was not bonding.
I've pressed on the Termistor button and the User LED switched on.
I've selected Environmental Sensing Service and got the following prompt:
And I've got CySmart app GATT DB screen with simulated values of Temperature.
The app has a nice feature of data logging:
Once the connection to the board from the app got lost the LED switched off.
KitProg3 Update
I've got the following warnings during the firmware upload:
Info : KitProg3: FW version: 2.0.809 Warn : ******************************************************************************************* * KitProg firmware is out of date, please update to the latest version (2.21.1005) * using fw-loader tool which can be found in the following folder * /home/vlasov01/ModusToolbox/tools_2.3/fw-loader
So I've decided to fix it.
vlasov01@remote:~/ModusToolbox/tools_2.3/fw-loader/bin$ ./fw-loader --update-kp3 Cypress Firmware Updater, Version: 3.2.0.1003 (C) Copyright 2018-2021 by Cypress Semiconductor All Rights Reserved Info: Start API initialization Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 Info: Hardware initialization complete 505 ms Warning: The KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 device supports bridging over HID protocol only. The data transfer rate will be significantly higher if you upgrade to the newer firmware version with USB Bulk bridging enabled. Device 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' opened successfully Info: Kit FW is 'KitProg3' ver. 2.00 b809. Upgrade file is 'KitProg3' ver. 2.21 b1005. Info: Disconnected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 Error: CyBridge: Failed to get FW version - Cannot open Hid device with the path: /dev/hidraw1 Err = 13, Permission denied Info: Connected - KitProg Bootloader-A4000216140C2A94 Info: Bootloader Version: Major 1, Minor 1, Build 60 Info: FW Upgrade to version: 2.21 b1005 Info: Bootloading of KitProg FW... Info: Verifying of KitProg FW... Info: Bootloading of DAPLink... Info: Verifying of DAPLink... Error: upgradeFirmware failed - Hid write error Info: Disconnected - KitProg Bootloader-A4000216140C2A94 Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 FW update on 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' device failed
I've noticed permission errors. So I've rin it as a privileged user again:
vlasov01@remote:~/ModusToolbox/tools_2.3/fw-loader/bin$ sudo ./fw-loader --update-kp3 [sudo] password for vlasov01: Cypress Firmware Updater, Version: 3.2.0.1003 (C) Copyright 2018-2021 by Cypress Semiconductor All Rights Reserved Info: Start API initialization Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 Info: Hardware initialization complete 483 ms Device 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' opened successfully Info: Kit FW is 'KitProg3' ver. 2.21 b1005. Upgrade file is 'KitProg3' ver. 2.21 b1005. Info: Disconnected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 Info: Connected - KitProg3 Bootloader-A4000216140C2A94 Info: Bootloader Version: Major 1, Minor 1, Build 60 Info: FW Upgrade to version: 2.21 b1005 Info: Bootloading of KitProg FW... Info: Verifying of KitProg FW... Info: Bootloading of DAPLink... Info: Verifying of DAPLink... Error: upgradeFirmware failed - Hid write error Info: Disconnected - KitProg3 Bootloader-A4000216140C2A94 Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 FW update on 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' device failed
I've noticed on the line 12 that KitProg3 was already upgraded in my previous attempt. I've run another build. And this time it was clean without any warnings about the version of KitProg3 firmware.
New Challenge
Now I need to find out how to connect the ZMOD4510 Air Quality sensor to the CY8CKIT-062S2-43012 board.
ZMOD4510 Air Quality sensor ( US082-ZMOD4510EVZ ) provides a standard Pmod Type 6A (Extended I2C) connection. This new standard was introduced last year.
Some of Cypress boards have PMOD interfaces, but the CY8CKIT-062S2-43012 board doesn't have it. As I never worked with Pmod Extended I2C interface it will be an interesting challenge. I hope I'll apply to apply I2C examples for Modus Toolbox like https://github.com/Infineon/mtb-example-psoc6-i2c-master-ezi2c-slave .
Summary
The installation and patch process was very simple on Ubuntu 20.04. The demo project "AnyCloud: Bluetooth LE Environmental Sensing Service" is working as expected and is very well documented. The CySmart app is working well. It was able to connect to the board over BLE and retrieve simulated data.