Hardware enabled timer issue

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ToDo_281356
Level 1
Level 1
5 replies posted Welcome! First question asked

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?

0 Likes
2 Replies
Anonymous
Not applicable

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.

0 Likes
ToDo_281356
Level 1
Level 1
5 replies posted Welcome! First question asked

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

0 Likes