- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to section 25 of http://www.cypress.com/file/123561/download there are 4 built in timer/counter/pwm peripherals on the PSOC 5lp.
Which header file do I need to include to get access to their functions?
Is there better documentation on said peripherals?
Thanks,
-Morio
Rabbit Hole Computing
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue was I didn't understand that a fixed function Timer, Counter and PWM uses the system peripheral Timer, Counter, PWMs. There are four of them in the PSoC 5LP. I created a fixed function timer and sure enough one of the timers were used as reported by the project rpt file.
Resource Type : Used : Free : Max : % Used
============================================================
Digital Clocks : 7 : 1 : 8 : 87.50 %
Analog Clocks : 0 : 4 : 4 : 0.00 %
CapSense Buffers : 0 : 2 : 2 : 0.00 %
Interrupts : 26 : 6 : 32 : 81.25 %
IO : 46 : 26 : 72 : 63.89 %
Segment LCD : 0 : 1 : 1 : 0.00 %
I2C : 1 : 0 : 1 : 100.00 %
USB : 1 : 0 : 1 : 100.00 %
DMA Channels : 10 : 14 : 24 : 41.67 %
Timer : 1 : 3 : 4 : 25.00 %
Thanks for all your help,
-Morio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you are using PSoC Creator,
#include "project.h"
will do the trick.
If you are new to PSoC, I would recommend you to watch following video tutorials.
http://www.cypress.com/training/psoc-101-video-tutorial-series-how-use-arm-cortex-m0-based-psoc-4
Although the device family is different, we can learn the "Cypress Way" of developing a program.
I just noticed that there is a following URL to start with.
http://www.cypress.com/documentation/application-notes/an77759-getting-started-psoc-5lp
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Like moto says:
If you are using PSoC Creator,
#include "project.h"
will do the trick.
At the same time, there are many code example in the creator IDE, you can open and run it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue was I didn't understand that a fixed function Timer, Counter and PWM uses the system peripheral Timer, Counter, PWMs. There are four of them in the PSoC 5LP. I created a fixed function timer and sure enough one of the timers were used as reported by the project rpt file.
Resource Type : Used : Free : Max : % Used
============================================================
Digital Clocks : 7 : 1 : 8 : 87.50 %
Analog Clocks : 0 : 4 : 4 : 0.00 %
CapSense Buffers : 0 : 2 : 2 : 0.00 %
Interrupts : 26 : 6 : 32 : 81.25 %
IO : 46 : 26 : 72 : 63.89 %
Segment LCD : 0 : 1 : 1 : 0.00 %
I2C : 1 : 0 : 1 : 100.00 %
USB : 1 : 0 : 1 : 100.00 %
DMA Channels : 10 : 14 : 24 : 41.67 %
Timer : 1 : 3 : 4 : 25.00 %
Thanks for all your help,
-Morio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Morio-san,
I'm very sorry for my poor English Reading skill.
To access Fixed Timer's registers, I would do
(1) Enter a schematic using Timer (Fixed), or probably yours already has one.
(2) Generate Application by selecting "Generate Application" icon.
(3) PSoC Creator Generates drivers etc according to your schematic setup.
(4) Among the Generated_Source > PSoC5, there is a folder named "Timer" or
whatever name you assigned to the Timer
(5) By un-folding the Timer folder, you will see the header and soruce(s) generated for your project.
(6) You can open and/or edit any of these, but please note that your modification to these file will be over written by the next "Generate Application"
(7) From the main.c only including "project.h" will take care of including necessary headers generated for your project. (This was my first answer).
Best Regards,
25-Jan-2019
Motoo Tanaka