• Simplified Chinese
  • Japanese
  • Korean
   
Home > Cypress Developer Community > Blogs > PSoC Creator News


PSoC Creator News
Apr 11, 2014
Just over a  month ago, at Embedded World, we gave away about 1500 of the new PSoC 4 Prototyping Kits. These $4 kits are a great way to get to know PSoC 4 and do some speedy proof-of-concept designs. The board can be snapped in two with one part serving as a programmer and the other, with the on-board PSoC device, mounted on your prototype board.
 
If you are one of the guys from the conference who I forced to watch a demo just so you could get a kit... drop me a line in the comments. Ask me a question. Tell us what you've done with it. Or just say hello!
 
I've been using the kit for a while and the first thing I did was figure out a way to re-program the board without having to remove it from the USB port. Here's my design - I think it is quite handy. Give it a try and let me know how you get on.
 
When you plug the board into a USB port it boots into the application. But if you want to re-program the board you hold the SW1 button down as you insert it into the port. That forces the board to run its bootloader and you can re-program the application using the Cypress Bootloader Host tool (below).
 
 
This all works just fine but if you want to quickly modify your application and re-program it, you need to remove the board from the USB port and re-insert it with the button held down.
 
That got a bit boring. So I figured out a way to reset the board, into the bootloader, from any application.
 
 
My PSoC Creator Bootloadable design (top right) uses a simple Timer that is controlled from the SW1 button (the same one you have to hold down to enter the bootloader normally). I'll break down the image so you can understand what it does.
 
The Timer - which is called ResetTimer - is clocked at 12kHz and the switch is attached to the start, reload and stop inputs (more on that in a while). There is also an interrupt output from the Timer component and that is connected to an ISR. It is this ISR that causes the board to reset into the bootloader.
 
As with many PSoC components the really cool part is the dialog that lets you configure all the parameters (just double-click on the component).
 
Below, you can see how I configured ResetTimer as a one-shot down counter with a period of 24000. That means when it starts it will count down from 24000, stop when it reaches zero, and assert the interrupt (terminal count). The period of 24000 equates to 2 seconds with the 12kHz clock.
 
 
In the above picture I connected SW1 to all the inputs. You'll notice that I set them up as follows; start and reload occur on a falling edge, whereas stop happens on a rising edge. The switch is grounded on the board so when it is pressed the input goes low (falling edge). This reloads the period into the counter (to 24000) and starts the down counter. If the switch remains pressed for 2s then the terminal count is reached and the interrupt fires. If the button is released then a rising edge occurs and the counter is stopped. The interrupt does not fire and the application continues to run. If I press the button again the whole process restarts (from 24000) - so you always have 2 seconds to change your mind.
 
 
You only need a tiny amount of code in your application to make this work.
 
Firstly, you need the write the ISR, which just has to call "Bootloadable_Load()" to re-enter the bootloader (assumes your Bootloadable component is called, simply, "Bootloader").
 
Then, in main() you just start the ResetTimer, install the ISR and enable interrupts. After that you can write your application normally and the reset system will not interrupt or interfere in any way.
 
#include
 
/* Prototype the ISR handler */
CY_ISR_PROTO( ResetISR_Handler );
 
/* Implementation of the ISR handler */
CY_ISR( ResetISR_Handler )
{
    Bootloadable_Load();        /* Force a bootloader restart */
}
 
int main()
{
    /* Start the timer - only runs when SW1 is pressed */
    ResetTimer_Start();
 
    /* Install the ISR handler and make sure none are pending */
    ResetISR_ClearPending();
    ResetISR_StartEx( ResetISR_Handler );
 
    CyGlobalIntEnable;
 
    for(;;)
    {
        /* My actual application does nothing - waits for a reset !!! */
    }
}
 
One last thing to mention. This design does not mean you cannot use the button for other purposes. Here's an example of the switch getting routed straight to the blue LED on P1.6 as well as driving the timer. Because the switch is active low and the LED active high I put an inverter (not-gate) between the two. Now when I press the switch the LED goes on... just don't hold it down for 2 seconds unless you want to reboot!
 
 
 
Add this to your applications and you'll be able to re-start the bootloader in just a couple of seconds. The Bootloader Host reconnects immediately and you can download a new application in no time at all.
 
Happy bootloading!
--Mark Saunders
 
This is a re-post.  This blog was originally posted by Mark Saunders on the Cypress ARM Community blog.
Rating: (3.3/5) by 3 users
Comments (2)
Apr 09, 2014

As a PSoC user, one of the things I run into is being able to find the right piece of documentation for the specific task I am trying to accomplish.  Cypress has a ton of documentation, but sometimes I feel like I need to be a search expert to find it all.    To the rescue comes the document manager in PSoC Creator.  You call it from the Help menu in PSoC Creator. See the picture below:

 

 

You can also call it from the Windows start menu (it's called PSoC Document Manager). The Document Manager will launch in a separate window and allows you to search through a variety of resources including:

  • The standard PSoC Creator Help,
  • Component Datasheets,
  • Application Notes,
  • Reference Guides, and even
  • Device Datasheets.

If you are connected to the internet, documents from the Cypress website will be included automatically.  You can even set up Bookmarks for things you bring up frequently (for me it's the keyboard shortcut bindings, see my previous blog entry). Give the PSoC Creator Document Manager a try and hit me up in the comments with your thoughts.  Happy PSoC Creating.

--Matt


Matt Landrum, PSoC Software Customer Advocate

Cypress Semiconductor - Portland, OR

 

P.S. Here is a screenshot of the Document Manager.  Note the Find box on the right (yellow highlight)

Rating: Be the first to rate
Comments (1)
Apr 02, 2014
Cypress just posted up some demos on FreeRTOS Interactive. If you are thinking of trying out FreeRTOS I think these are a good place to start. There are four packages to choose from - two for PSoC 4 and two for PSoC 5LP. For each device there is a package for the GNU GCC compiler and ARM MDK compiler.
 
The PSoC 4 packages target the CY8CKIT-042 Pioneer kit but will also work on the new CY8CKIT-049 prototyping boards (if you have a 4100 just change the device and rebuild). The demo program shows you how to use a task to periodically scan the CapSense slider and post that data to a client task that varies the brightness of the RGB LED. The program also uses an event group (with just one event) to signal button presses. The client task uses that information to change the LED color.
 
 
For the PSoC 5LP packages, which are built for the CY8CKIT-050 Developers Kit, the program is a bit more interesting because there is an LCD on the board. The main task displays a menu of different demos on the LCD. You can scroll through them using the CapSense slider and start/stop them with the on-board buttons. Each of the five demos is an individual task that shows off RTOS features like events and message queues.
 
 
I hope some of you are interested enough to give these demos a try. They come with a comprehensive user guide and a document describing the PSoC design with all the component settings and APIs. If you have questions or suggestions, ask them on the site - or post a comment here - and I'll try to answer.
 
This is a re-post.  This blog was originally posted by Mark Saunders on the Cypress ARM Community blog.
Rating: Be the first to rate
Comments (3)
Mar 28, 2014

Buy PSoC 4 for $1.00 today.  Cypress is offering specially-created PSoC 4 part numbers from our Cypress Webstore or our catalog partner websites (DigikeyMouser, Newark) for $1 through the end of September. The special promotion part numbers are listed below:

 

Promotion MPN Base MPN

CG799AA

CY8C4245LQI-483

CG8000AA

CY8C4245AXI-483

CG8001AA

CY8C4245PVI-482

 

Now is a great time to purchase your first PSoC 4 silicon for your prototype and accelerate your design to production.

 

Until the end of September, you can buy under this limited-time promotional offer by visiting the Cypress Store or one of the three catalog distributor websites: Digikey, Mouser, or Newark.  This price is only valid through the specified catalog distributors. These special part numbers do not reflect in the Cypress Quoting System and cannot be quoted by any other distributor.

Rating: (5/5) by 2 users
Comments (1)
Mar 20, 2014

One of the most common questions I get regarding PSoC Creator goes something like the following:

Why doesn't [Ctrl+key] do [some function] like it does in [some other environment]?

 

PSoC Creator, like many programs, will allow you to set up your own keyboard shortcuts.  In spite of this, I get that comment often enough that I must conclude we haven't made this ability apparent in our documentation (the cohesiveness and integration of our documentation will be the subject of another blog post).  The PSoC Creator team is taking steps to make the key customization process more visible.  Until then, my good buddy in the global applications group, Naman Jain, has written a Knowledge Base (KB) article on the subject.  You can read the full KB article here:  http://www.cypress.com/?id=4&rID=91821

For convenience, I will include the first screen shot in the article because I think that will be enough for many of you reading this.  Essentially, keyboard shortcut customization in Creator works the same as in many other Windows applications. The only thing you might find tricky is finding the right place to rightclick.  In this case, just rightclick in the gray banner area at the top where the menus are.  See the top arrow shown in the screen shot below.

 

 

Also, my PSoC Creator compatriot, Robyn Weil, posted a PDF with a partial list of shortcuts.  See here http://www.cypress.com/?app=forum&id=2492&rID=88740.

So how many of you have used this capability?  How many of you didn t even know it was there? Hit me up in the comments.

Thanks,

--Matt

 

This was originally posted by Matt Landrum on the Cypress PSoC Today! blog.  Matt also has tips on using the PSoC Creator Document Manager.

Rating: Be the first to rate
Comments (0)

  1 to 5 of 108 Results  |   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.

 
 
FB1.png Twitter1.png linkedin youtube