- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From memory:
Extract the archive to your disk. Open your project, in the workspace explorer select the 'components' tab.
On your project node, right click and then 'import componment item'. Select the saved project from above as source project, the you can select the component to import in your project.
It should show up under 'community component' in the component list...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice work!
I'm looking forward to create my own compnents, too. Does anybody know how I can find a tutorial or something else about this? It´s difficult for me.
Regards,
Flo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look here, videos, docs -
http://www.cypress.com/?rID=40410
http://www.cypress.com/?id=4&rID=54777
http://www.cypress.com/psoccreator/ Look at the various tabs, documentation.....
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much!
Regards, Flo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When compiling in RELEASE, i get the following warnings:
.\Generated_Source\PSoC5\SysTimers_1.c:352:29: warning: array subscript is above array bounds [-Warray-bounds]
.\Generated_Source\PSoC5\SysTimers_1.c:353:29: warning: array subscript is above array bounds [-Warray-bounds]
I think the index range in the for() loop inside _ReleaseAllTimers is incorrect:
for(index = 1; index <= SysTimers_1_TIMERS; index++)
Should be:
for(index = 0; index < SysTimers_1_TIMERS; index++)
Very helpful component anyway 🙂
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mark,
I very happily found your SysTimers component. This is exactly what I needed.
But because I'm using a PSoC 3, I added a PSoC 3-specific implementation using a Timer component instead of the PSoC 5-native SysTicks feature.
I also added some CriticalSection locks which are imho necessary.
Please find the updated code attached.
Thank you,
Best regards,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
This demo project works well. Now when I tried to introduce the systimer in another project it does recognize systime. I am not able to install systimer on my topdesign. There is no component systimer exist on my updated psoc creater. Is it a user component? How to transfer the component?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To use the SysTimer component in your own project, right click on your project under the workspace window on the left. Select "Dependencies...". Under "User Dependencies" select the folder icon then navigate to the location where the library is stored. The folder will be "SystemTimers.cylib" and inside there will be the file "SystemTimers.cyprj", select it, hit "OK" on the bottom of the Dependencies pop-up window. You should now see a "Community" tab in the Component Catalog window on the right. I usually keep all my custom libraries in one common place so they don't get lost.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. It works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the example if I want only 2 times to blink, how to stop the loop. The following program did not work.
for(count=1;count<4;count++)
{
if( SysTimers_GetTimerStatus(green_timerID))
{
P02_Green_Write(P02_Green_Read() ? 0 : 1); // Toggle Green
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The SystemTimer will only tell you if a period has expired. If you want something to only occur for n periods, you will have to implement that counter yourself. I have been thinking of adding callback functions, but you want these functions to be very small and quick. The user's callback function would have it's own counter so it would know that it would only occur n times then kill it's own timer. This way if you just wanted to toggle an LED n times, your callback function would know this and it would do this automatically in the ISR. Hmmm maybe I will add the callback function as an option, might be more useful than I was thinking.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Mark. That will be useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
here is an important fix for the updated component that I posted in February.
Please update the initialization code in Start() to:
(...)
#if CY_PSOC3
#if `$INSTANCE_NAME`_SYSTICK_PERIOD <= 65536
`$INSTANCE_NAME`_SysTick_Timer_Init();
`$INSTANCE_NAME`_SysTick_Timer_WritePeriod(`$INSTANCE_NAME`_SYSTICK_PERIOD-1);
`$INSTANCE_NAME`_SysTick_Timer_Enable();
#else
#error SysTimers (instance `$INSTANCE_NAME`): Invalid timer resolution. Use a higher resolution please!
#endif
#else
SysTick_Config(`$INSTANCE_NAME`_SYSTICK_PERIOD);
#endif
(...)
Best regards,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached to the post is version 3.0 of my SysTimers component. I have added callback functions to the timers as an option. I find the callbacks handy for simple quick periodic functions I don't want to deal with in my main loop. For example, blinking an LED at a 2 Hz rate, Blink an LED for 5 times then stop, or scan a button or keypad. Since these callbacks execute in an ISR they should be kept small.
I have attached two documents, "SysTimers.cylib.zip" which is just the library, and "SysTimersDemo2.zip" that contains a couple examples and the library. Both the library and the demos were generated with PSoC Creator 4.2. The demo "SysTimers_PSoC4_RGB_Demo" blinks the RGB LED on the pioneer board without callback functions. Demo "SysTimers_PSoC4_RGB_Demo_wCB" is the same demo but with the use of callback functions.
Enjoy,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mark,
I needed the SysTimers component for the Creator 4.0 project. It appears that all latest versions pf the SysTimers: 1.2a, 2.0 and 3.0 were created using Creators 4.1 - 4.4, which are not compatible with older Creator 4.0.
Attached below is a latest version 3.0 of the SysTimers, which I re-created using Creator 4.0. It can be used in Creator 4.0 and some lower versions.
Thank you for the component.
odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I assume that you know that the systick firmware that comes it PSoC4 has 4 builtin callbacks...
And people can read about the APIs in chapter 12 of the System Reference Guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I know about the systick APIs in the PSoC library. When I originally wrote the component, they did not exist. I now allow the user to replace the standard SysTick ISR or to just put the SysTimer ISR as one of the 4 entries. The sysTimer component is really for events that occur at a slower rate than SysTick period. The SysTimer callbacks may only be executed once ever 10 seconds if you want. In the Fast mode it just handles the math for you with very little overhead at the SysTick ISR.
It was never meant as a replacement for the SysTick APIs. I use SysTimer Component for my own non-RTOS based projects and thought that other people might have a use for it as well.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been trying to use this with PSoC 6, and the cytypes.h is a problem. I am not a greatly experienced Cypress dude, so is this component/library suitable for PSoC 6 or do I need to make major modifications?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Mark!