You are here

Hardware enabled timer issue | Cypress Semiconductor

Hardware enabled timer issue

Summary: 2 Replies, Latest post by MrLogic on 15 Apr 2011 03:12 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_151885's picture
User
8 posts

I made a 'hardware only' enabled UDB timer that flashes an LED according to the attached schematic. The main() routine contains nothing but an endless loop. I can't get this to work unless I put 'Timer_1_Start()' in the main routine. According to the data sheet this should not be necessary. Any suggestions?

Attachments: 
U2
uday's picture
Cypress Employee
569 posts

In PSoC Design, the "Timer component " is placed on Topdesign, it's parameters are configured using the configuration GUI and necessary connections are made to connect the Timer to other components on the TopDesign. However the initial parameter set in the Timer configuration GUI, needs to be written in to appropriate registers for it's operation. This is what the Timer_1_Start() API does. Most of the components in PSoC will need this API for initialisation. However there are few exception like Pins, Control Register, Status Register, Gates etc, which do not need a start API. 

As seen in the Timer datasheet the description for the Start API is, Initializes the Timer with default customizer values. Enables the Timer operation by setting the enable bit of the control register for either of the software controlled enable modes. 

The API Timer_1_Start(), makes calls to multiple other functions that sets appropriate registers, the same can be seen in "Timer_1.c". 

Every component on the Topdesign is associated with a component.c and component.h that has relevant definitions for the functions.

user_151885's picture
User
8 posts

Many thanks. It's all very clear to me now.

Log in to post new comments.