Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Blogs - Page 24

icon

Blogs

thumbnail
I previously wrote about using the New Application wizard in ModusToolbox and showed you the BlinkyLED project. Now I want to show you another template that I believe will be more useful to you in the long run. It is called PioneerKitApp and it supports both the PSoC 6 Pioneer kits - CY8CKIT-062-BLE and CY8CKIT-062-WIFI-BT. When you highlight the template in the wizard it tells you the following about the project.Basic peripheral configuration for the PSoC 6 Pioneer kits (CY8CKIT-062-*). Debug is enabled and platform clocks are set for high performance (144MHz CLK_FAST for CM4 core and 72MHz CLK_SLOW for CM0+) but with a peripheral-friendly CLK_PERI frequency (72MHz). In addition the user LEDs and switch, KitProg3 UART and I2C bridges, and CapSense buttons and slider are configured.My job involves creating a lot of projects and almost every one of them blinks an LED or prints a message to the UART at some point. Depending upon how well my day is going the message might be "PSoC Rocks!" or, if things aren't going so well, something a little less repeatable! But I digress, the point is that I get really fed up of configuring pins and UARTs every day. So I created a template and my boss told I should share it with you.When you create the application ModusToolbox opens up the file setup_readme.txt automatically. This file describes all the settings I made in the configurator tools... clocks, pins, UART, I2C and CapSense. This means I can start programming without even opening the configurators. For example, here is a program to print a message and toggle an LED. I wrote this code immediately after creating the application without worrying about configuring peripherals, adding middleware (to support printf), picking libraries, choosing part numbers, setting include paths, or any of that nonsense.#include "cy_device_headers.h"#include "cycfg.h"#include "cycfg_capsense.h"#include "stdio.h" int main(void){ int count = 0; cy_stc_scb_uart_context_t uart_context; init_cycfg_all(); __enable_irq(); Cy_SCB_UART_Init( KIT_UART_HW, &KIT_UART_config, &uart_context ); Cy_SCB_UART_Enable( KIT_UART_HW ); for(;;) { Cy_GPIO_Inv( KIT_LED1_PORT, KIT_LED1_PIN ); printf( "Message #%d\r\n", ++count ); Cy_SysLib_Delay( 500 ); }}Let's dig in a little. First of all, notice that I am using printf(), which is defined in the usual C stdio.h header file. This is supported by the retarget_io middleware package that adds three files to the application - retarget_io.c, stdio_user.c and stdio_user.h - which you can see highlighted in the project here.The "user" files are placed into the Source folder because they are intended to be user-modifiable. In the template I already did that to choose the serial block for the KitProg3 serial-USB bridge (so I can see the output in a PC terminal emulator like teraterm). Here are the settings I made in stdio_user.h.#include "cycfg.h"/* Must remain uncommented to use this utility */#define IO_STDOUT_ENABLE#define IO_STDIN_ENABLE#define IO_STDOUT_UART KIT_UART_HW#define IO_STDIN_UART KIT_UART_HWWhere did that KIT_UART_HW macro come from? Or the KIT_LED_PORT macro for that matter? Well, they got set up in the device configurator. Here is a screenshot of the device configurator, where I have called the serial communication block #3 "KIT_UART" and given it the personality UART_v1.0 (I could have used I2C or SPI instead).The configurator generates the KIT_UART_HW macro and the KIT_UART_config variable automatically, so writing the code is easy and fast. I did a similar thing for the LEDs, giving the orange LED the alias "KIT_LED1" so that the tool generates the PORT and PIN macros for me.Next time, I'll show you a variation of this template that sets up FreeRTOS for you so you can get multi-tasking in no time at all.
thumbnail
A few weeks ago I announced that ModusToolbox 1.0 was released and available for download. I think it's time to start posting some pointers on how to use the product effectively. I think a good place to start that is to explain the options you have when creating new projects.First of all, I recommend you resist the temptation to use the "File->New" dialog to create a C or C++ project. We have created a shortcut for you, with the catchy name "ModusToolbox IDE Application" that is a lot easier to use than starting the project from scratch. You *can* create your own project but you'll have to figure out how to handle the PDL libraries, and code for the CM0+ core in the PSoC 6, and the generated configuration files and, all in all, it is just way easier to use the shortcut! Just click on the shortcut in the Quick Panel or the New Project dialog. Our wizard walks you through the selection of the target and a starter template for the application. You can either pick a board or choose a specific target part number. The "Custom Hardware" option is really intended for users going to market and using their own hardware. Given that ModusToolbox was released two weeks ago I am going to make the wild guess that most of you are just starting out and have one of our kits. The "Dev/Eval Kit" path is for us.Here is the list of supported kits - not too many today but we are busy working on new kits and shall be adding support for them in the future.I have a CY8CKIT-062-WIFI-BT kit, but I think many of you will have the 062-BLE version, because that has been on sale for a while longer. Either way, pick your board and follow along - the process is the same whichever board you have. You then get a list of applications for the kit.These are typically not full-blown reference products but rather examples of useful things to do and good places to just get started. I strongly recommend creating your own projects with a few of them - to get a feel for the tools and try out some cool stuff. The ones that are prefixed with CE are Code Examples from our Applications team so they are thoroughly tested and meticulously documented.Most of the others are a little less formal and just show off a feature or function as quickly as possible. Let's start with "BlinkyLED", as I have in the above image. Here is the generated application.The first thing you'll see is that there are actually 5 projects in an application - I'll try to be consistent in using "application" to refer to whole shooting match and "project" when I mean a specific Eclipse project. The 5 projects are as follows:BlinkyLED_mainapp - this contains the code that runs on the CM4 core (your project)BlinkLED_mainapp_psoc6pdl - this contains the driver code from the PDL which will be built for the CM4 coreBlinkyLED_config - this project contains the generated source code from the ModusToolbox configurator tools (more on this next time)BlinkLED_mainapp_cm0p - this contains the code that runs on the CM0+ cor​eBlinkLED_mainapp_cm0p_psoc6pdl - this contains the driver code from the PDL which will be built for the CM0+ coreOur application - and almost certainly all of your's too - is in the BlinkyLED_mainapp project. In the source folder, double-click the main.c file to see the code we are going to run. Connect you board to the USB port of your PC and, in the Quick Panel, press "BlinkyLED Program (KitProg3)" (or change the prefix for whatever you named your application).If all is well you will build the application, program it, and see the blinking LED. You are now ready to start modifying the code to get used to the IDE and also trying out a few more of the examples. In my next post I'll talk about some of these templates in more detail and show you everything they automate in the generated applications.
thumbnail
Hello embedded designers. Thanks for your interest in ModusToolbox. As this is a new release/platform, we would like to hear your feedback about your download/install experience. While we have a number of machine/OS configurations that we test, there's nothing like hearing from users in the field. Comments on the Installation Guide are also welcome.--Matt
thumbnail
WPA2-Personal is vulnerable to a standard dictionary attack using a captured successful “4-way handshake”. Recently, it was demonstrated that a similar dictionary style attack can be done with a captured Pairwise Master Key Identifier (PMKID) instead of a successful 4-way handshake (see: https://hashcat.net/forum/thread-7717.html). Public visibility of a PMKID is by design and is not considered a security risk/flaw in the protocol. The availability of the PMKID does not significantly affect the effort needed to perform the dictionary attack.
thumbnail
On July 23, 2018 the security vulnerability CVE-2018-5383 was released. This CVE states that Bluetooth implementations may not sufficiently validate elliptic curve parameters during Diffie-Hellman key exchange.Because these threats have dependencies on software configuration and usage, we have prepared this document to help Cypress Bluetooth customers understand how we patched our software to address the errata as well as to provide guidance on how to remove the vulnerability.
thumbnail
Excelon™, Cypress’ next-generation Ferroelectric RAM (F-RAM), delivers industry’s highest-performance mission-critical non-volatile memory by combining high-speed low-pin-count interfaces, low-power operation, unlimited read/write cycle endurance and instant non-volatility. This makes Excelon the highest-reliability data-logging memory for smart connected factories and the automobiles of tomorrow. Please find additional details here.The Excelon™ Ultra is a 4-Mbit, 108-MHz Quad SPI F-RAM that supports a rich command set making it compatible with the industry standard Quad SPI peripheral command set. With the industry moving towards low pin count interfaces, a wide variety of micro-controllers have started supporting Quad SPI interface natively. To enable the evaluation of our latest Quad SPI F-RAM in conjunction with industry standard platforms, we will be providing simple driver support for a few of these platforms through Cypress Community. These drivers can be used as-is or with minor modification by embedded systems engineers to get a headstart in adding a high-speed, low-power data-logging memory in the system.The attached files contain a user guide for the code, a sample test project in Keil µVision 5 and LPCExpresso. The sample project contains revision 1.0 of API library files which covers all the important device access features. Sample project files are also available in GitHub repository, click here.Follow this blog to get updates on release of support for more micro-controllers!
thumbnail
WICED-Studio 5.2.1 Installer (Windows)WICED-Studio-5.2.1 (OSX)WICED-Studio-5.2.1 (Linux 64-bit)WICED-Studio-5.2.1 (Linux 32-bit)Release Notes: WICED Studio 5.2.1New WLAN firmware (5.90.230.22) added for 43362 platform with KRACK WPA2 fixesNew WLAN firmware (7.45.98.38) added for 43364/43438/4343W platforms with KRACK WPA2 fixesNew WLAN firmware (7.15.168.101) added for 4390x/54907 platform with KRACK WPA2 fixesNew WLAN firmware (6.49.22) added for 43340 platform with KRACK WPA2 fixes
thumbnail
mifo​We have a product with the CYW43362 chipset based on SDK version 3.1.2. We would like to provide OTA patches for the KRACK vulnerabilities. Based on the previously released WPA2-KRACK-HACK-statement, we’re subject to the group 2 CVEs. Can you shed light on what is the best path to patch our product? Will there be updates for SDK 3.2.1? Or is it possible to OTA upgrade SDK 3.2.1 based field hardware with SDK 6.0. The latter is a less preferred method for us and I ask because in the past upgrading SDK 2.X with SDK 3.X based firmware was not possible over-the-air.My firmware version information is under:WLAN Firmware : wl0: Nov 7 2014 16:03:45 version 5.90.230.12 FWID 01-e36c94fdThanks
thumbnail
WICED Studio 4.1.3 IDE Installer (Windows) WICED Studio 4.1.3 (OSX) WICED Studio 4.1.3 (Linux 64-bit) WICED Studio 4.1.3 (Linux 32-bit) Release Notes: WICED Studio 4.1.3 New WLAN firmware (7.45.98.38) added for BCM43364/BCM43438/BCM4343W that includes KRACK WPA2 and Broadpwn fixes. New WLAN firmware (6.49.22) added for BCM943340 that includes KRACK WPA2 and Broadpwn fixes. New WLAN firmware (5.90.230.22) added for BCM943362 that includes KRACK WPA2 and Broadpwn fixes. New WLAN firmware (7.15.168.101) added for BCM94390x that includes KRACK WPA2 and Broadpwn fixes.
thumbnail
Recently, most of our buyers are worried about WPA2 security problem. So can you please let us know the following? 1. Do you have a patch for WPA2 security issue? 2. If not, then do you have a plan when you will be able to provide? 3. If yes, then is is possible to get a patch which can be applied to SDK2.4,1? Thank you for your help.
thumbnail
Per the original bulletin here: Security Bulletin: KRACK attack against implementations of Wi-Fi WPA2 security This update includes the promised wpa_supplicant patches.
thumbnail
Cypress is aware and has analyzed the vulnerabilities associated with the recently released KRACK attack (https://www.krackattacks.com) against implementations of the Wi-Fi WPA2 security.Official details of the vulnerability are tracked via a number of Common Vulnerabilities and Exposures, or CVEs. CVEs can be looked up at https://cve.mitre.org.