PSoC Creator News and Information | Cypress Semiconductor
This is my last “new feature” article for PSoC Creator 4.0. I am getting ready to do a bunch more in our next release! This one is about a pair of new files that complement the schematic file (TopDesign.cysch).
Regular users of the tool know how useful it is to make design changes in the schematic file without writing a line of C code. You can change the initial conditions of a PWM or change the speed of a UART and a rebuild just makes it happen. It is tricky, though, to track changes to a design when they are made graphically so we now enable you to save text-based (XML format) descriptions alongside the schematic source file.
There are actually two files with different extensions. The CYVIS file records the visual features in the schematic; features like shape position and size, line color, width, and style, text location and content, and so on. The CYSEM file records the semantic meaning of the design such as the component instances, wires, and parameter values. You can use these files to compare designs. The CYVIS file tells you if something has been moved, added, removed, re-sized, re-colored or otherwise cosmetically changed. The CYSEM files tells you if the design has a material change and helps you track down where it occurred.
You enable the creation of these files from the Project-Properties dialog…
Let’s take a simple design to show you how it works. Here I have a clock driving a PWM. Next to it I have a modified design where the PWM compare value has been changed (you cannot see that) and an annotation modified accordingly.
When I compare the visual files I see just one change. The original documents the annotation like this.
<Annotation shapeName="Shape_2" zorder="2">
<Location x="344.4896" y="319.9385" />
<Text>PWM_1: 50% Duty Cycle</Text>
<SolidBrush color="0, 0, 0" />
<Font value="Microsoft Sans Serif, 10pt" />
<TextAlignment value="TopLeft" />
In the new file the change is <Text>PWM_1: 25% Duty Cycle</Text>.
In the semantic file you can see the edit that was invisible in the schematic file.
In the new file the change is pretty obvious.
You can compare the files in any editor or diff tool that you like – one that understands XML is a real bonus – and you have a great way to compare designs, track revision changes, and work in teams with less risk of using the wrong, or an out of date, schematic.
Hello out there!
We have been preparing for the upcoming CES 2017 show. The show will take place in Las Vegas, Nevada, from January 5th to January 8th.
Cypress's booth will show off our latest and greatest technologies and demos for the IoT.
We will have our 32-bit ARM® Cortex®M based PSoC and FM MCUs, our Bluetooth Low Energy (BLE) offerings, as well as other innovative products displayed at our booth.
Some cool demos of our technology we will be showing at CES 2017 include:
- CapSense® capacitive-sensing demos for slim and stylish designs, with liquid tolerance and seamless touch
- BLE Smart Umbrella and toothbrush demos
- TrueTouch Fingerprint Reader demo
- MFI (Made For iPOD) microphones using our PSoC MCU
So feel free to drop by and check out our booth, we will make sure to make your visit worthwhile!
You might be getting tired of all these "new feature" posts but we really packed a lot into the latest release. This one is really simple but I love it. It is just a change to how the Workspace Explorer presents the resources file (CYDWR). We have just added links to all the tabs in the file so you do not need to open it and then pick the tab for the resource you wish to edit - you just click on the resource and go straight there.
It is amazing how such a simple change is making the tool so much easier to use. A bunch of internal users have made the same comment to me lately, which inspired me to write this post. What do you think? Are you looking forward to trying this feature out (or do you already love it)? Do you have other ideas that could be as effective?
Over the past few weeks I have been talking about the new features in PSoC Creator 4.0 and now, at last, it is time to spend some time on my favorite - support for flexible microcontrollers (FM0+ devices)!
FM0+ is a portfolio of microcontrollers designed for ultra-low-power and cost-sensitive applications such as white goods, sensors, meters, HMI systems, power tools and Internet of Things (IoT) battery-powered or wearable devices. Application development is supported by the Peripheral Driver Library (v2.1.0), which includes C language source code for the on-chip peripherals, and any of the popular software IDES, such as ARM MDK, IAR Embedded Workbench, iSYSTEM WinIDEA and Eclipse. We have now added PSoC Creator to that list.
If you are a long-time microcontroller user you probably already have a favorite IDE and we don’t want to make you change the habits of a lifetime. So, while you can use PSoC Creator as a complete development environment, just like you would with PSoC, it also works as a convenient project setup tool. It is really easy, for example, to start a project in PSoC Creator, add and configure your peripherals, build the project to generate the supporting firmware, and then switch over to one of the supported IDEs to write the application code.
That's the real benefit of PSoC Creator - it helps you through the process of initializing the peripherals and making pin connections. The secret to this is what we call "pins-in" design. To use a peripheral, say a UART, in a traditional microcontroller you have to pick the block (there are typically a number of them to choose from) and live with the pins that it is connected to. It's backwards! You should be able to pick the pin that suits your board and have a software tool figure out the right block to use. Without the pins-in approach you have to constantly refer to the device manual to figure out how to get a peripheral working on a given pin. As you add functionality to the design the problem of finding a pin solution just gets harder and harder. To reverse this approach we use the peripheral firmware generation and guided pin selection features of PSoC Creator.
FM0+ peripherals are supported in PSoC Creator with components. To enable a function you simply drag the component into the schematic.
Double-clicking on the component instance pops up the customizer dialog that lets you choose values for the peripheral parameters. It's hard to make mistakes when you use this interface because the choices are validated by the component or constrained to only present legal values.
When you configure the component in this way and build the application, two useful things happen. First of all the driver module for the UART (strictly it is a multi-functional serial (MFS) block) is pulled into the project so you do not need to go find the source code, set the header file include path, and all those headaches.
Secondly, PSoC Creator generates some supporting firmware for the peripheral. There are macros to identify the MFS block used and to make the pin connections (more on this later). Most importantly, it generates a configuration data structure for the peripheral. In this code snippet you can see how the selections from the dialog are used to populate the struct. The firmware is always neatly documented and you cannot get the struct member initialization wrong.
|The next step is to choose the pins and the design-wide resources (CYDWR) editor makes this really simple. The editor presents all the pins and you just drag them onto the pin you want (or use a drop-down menu). The legal choices are shown in green and the tool will not let you pick an inaccessible pin. In this picture I have chosen pin 31 (aka port 3 pin 1) for the Rx pin (MFS block input).|
|A UART has two pins and so, as soon as one choice is made, the tool determines which MFS block to use (in this case it is block 0) and filters the available choices for the other pin. In this device the output from MFS block 0 only goes to pin 32 (port 3 pin 2) so only that pin is shown in green.|
That is all you need to do to set up the peripheral. It is time to write your application. This is made simpler than usual because all the initialization code is generated by the tool.
The PDL drivers have _Init() functions, in this case Mfs_Uart_Init(), which require a pointer to the MFS block and the configuration data. Both of these are generated and so the first line of C code is obvious. Note how the code would not change if you used a different MFS block - the generated code defines "UART_HW" to be MFS block 0 (UART0) so you do not have to care which actual block is used.
The pin routing macros - "SetPinFunc" - are also generated by PSoC Creator and are independent of the actual pin address. Need to move the UART to new pins? Simply change the choices in the CYDWR editor and rebuild your application. There is no need to change a single line of C code.
Using PSoC Creator to set up FM0+ peripherals is really convenient. As I mentioned above, you can easily use the tool just as a firmware generator and do the bulk of your application development in your preferred IDE. All you need to do is create a project in the IDE, add the source files generated by PSoC Creator, point to the linker script file, set the include path, and you are ready to go. If you make modifications to the design in PSoC Creator they are immediately reflected in the IDE. If add or remove components then you just need to add or remove the driver and generated firmware files from the IDE project.
I am really proud of our FM0+ integration into PSoC Creator. It's a great example of reusing technology that we developed for PSoC devices to eliminate some of the real difficulties associated with MCU-based development. We wrote thorough and well-documented Code Examples for just about every peripheral supported by the PDL and so I encourage you all to download PSoC Creator 4.0 and try out some FM0+ designs today.
I posted this a while ago but wanted to remind you that, in 2017, we shall be discontinuing support for Windows XP and Windows Vista in PSoC Creator. Microsoft has discontinued support for these Windows platforms and is not maintaining compatibility with them in the .NET framework. PSoC Creator support shall be maintained fully for all public releases in 2016 and early 2017 but the first major feature-based release shall discontinue support entirely.
We constantly seek to improve PSoC Creator by adding new features and improving the user interface. Increasingly, the latter is becoming difficult because older Windows platforms cannot support the new versions of .NET that we need to use in order to keep the interface modern, intuitive and reliable. We are discontinuing support for the older platforms so that we can take advantage of new technologies and continue to improve our product.
Note that this change does NOT apply to PSoC Programmer. There is no plan to discontinue support for Windows Vista or Windows XP in that product.
- 1 of 44
- next ›
ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.